Submitted by jean-paul on Tue, 05/08/2012 - 19:54

Have you wondered how some people's blog and news stories turn up in Google's search results with their picture beside it? It's called claiming authorship, and with Drupal, It's not as difficult as you might think. Here is one way you can claim authorship in Google's search results with Drupal. If you have a GMail account, enable your Google+ profile. When you aren't logged in to Google, the link at the top left will show "+You", and it will show "+" when you are. In Google+, set a profile picture. This is the picture that will be returned in Google's search results for your Drupal content. You can do this by clicking on the "Profile" button on the left side (below Home), then on the blue "Edit Profile" button above your banner image. After that, it works like most other sites. Click on the link that says "Change Profile Photo" and upload a new photo. The second change you have to make to your profile is a little farther down. Look for the entry that is labelled "Contributor to", click on it, and enter the full URL to your Drupal site. Then go back to the top anc select "Done Editing" in order to save your changes. For the next part, install Drupal 7's Social Media module. Follow the project's instructions for enabling and configuring the module. Wherever you place the Social Media icons, make sure that they are on each page of your content. The last part is the easy part. In order for Google to recognize your content as belonging to the same person as your Google+ profile, the link to your profile has to have an additional HTML tag, namely rel="author". Of course, it's possible to just place a link on your page somewhere, perhaps in a block, but this way is more elegant. On Drupal's Dashboard, click "Structure" (/admin/structure) and then "Widgets" at the bottom. You will end up with a list of the widget's machine names. You need to click on "edit" to the right of "socialmedia_profile-default", or the corresponding edit button if you chose to create a custom widget set when you installed the module. If you haven't yet made any changes on this page, click on the "Override" button at the bottom of this page to unlock the options. Click on "edit" to the right of "Socialmedia Google+ profile button" to display the options. The last text field should be labelled "Link rel", and in this box type the word "author". You don't need to put in the "rel=" or the quotes, as the module will ensure the tag is entered properly. Click the "Update Element" button, and you should be returned to the previous page. Click the "Update Set" button on this page, and your link should now be modified. Reload your page, and you should see the tag there when you view the HTML source. Now it's just a matter of time before your picture ends up beside your content!