Gravatar support

I added support for Gravatars today. If you own a gravatar, it will be displayed aside your comment. The following images have a special meaning:

Gravatar for users without gravatar This is displayed, if you do not have a gravatar. It show's a plant called "Sonnentau" in German, scientifically it is called Drosera something. It grows in the bog and eats insects. Nothing about your character or your favourite meal is implied by that.
My gravatar And this is me ;-).
Posted on November 25, 2005 in |


Comment by Marc

November 29, 2005 - 12:01

Hi Gerd,

Just arrived here at your site, after reading an interesting post at drupal.org (http://drupal.org/node/36817).

Looks good, this gravatar thing! Is it hard to implement gravatar with Drupal?

I would like to implement gravatar on my Drupal site as well - but didn't study it yet. Do you know if there is some good documentation around?

Compliments for the rest of your site too, especially for the navigation; it works like a charm!

BTW
Is the village where you were born pretty close to the Netherlands? In the northern part namely, we have bogs too. (had to search for the word in a dictionary :-D )

Cheers,
Marc


Comment by Gerd Riesselmann

November 29, 2005 - 15:28

Hello Marc,

the village I grew up is quite close to the Netherlands, indeed. It is located right in the middle between Papenburg and Oldenburg, the nearest larger town in Netherlands is Groningen. There indeed is a belt of bogs spanning from Bremen to the Netherlands. The bog that gave this blog its name, however, is located more south, half way between Bremen and Osnabrück. My grandfather bought it when he was young. I used to spend summer holidays at my grand parents when I was a child, exploring the bog, feeding the pigs etc. And it is still one of the places on earth I love most.

Implementing a Gravatar is simple, have a look at the Gravatar implementation guidelines. You need the email address of the commenter to compute the gravatar url, which you get by calling $comment->mail in the comment.tpl.php template file.

There is one difficulty though, and this is comments of Drupal users. These usually have no email assigned. I solved this by just checking, if the commenters name is me (as the only active user on this page). If so, I output my own Gravatar. A more general approach would be to load the assigned user and check out its email address.


Comment by Marc

November 29, 2005 - 16:53

Thanks for your reply! Not just the reply about the gravatar thing, but the reply at drupal.org as well.

About the gravatar thing: looks not too difficult indeed; good to have the link!

About the active class thing (at drupal.org): I just read the code instructions you suggested and like to thank you for the effort. Don't have time right now to dive into it too deep, but as soon as I manage to get it done, I'll let you know!

Cheers,
Marc


Comment by Martin

March 31, 2006 - 14:52

Just checking to see if my grav is working....Thanks


Comment by Martin

March 31, 2006 - 14:53

It does, thanks, u can delete this now.....


Comment by Evan

February 9, 2007 - 01:29

Looking good, this gravatar thingy! Going to implement gravatar with my drupal installation.

Wish me luck.

Great site layout btw. Makes me think I could earn a living off adsense too if I can get your high readership posts.