Adding Gravatar Support to a Graffiti Theme

I recently updated the Monochrome Graffiti theme to support Gravatar but I thought I'd do a separate post on how to add support for it to your own themes. The good news is Graffiti already has support for Gravatar built it so all you need to do is add the image to your theme. Simply add the following line inside the #foreach($comment in $comments) loop in your post page.

$macros.gravatar($comment.Email, $comment.Username, $comment.IPAddress, "%{size ='60'}")

If the user doesn't have a Gravatar, it will automatically handle it and display a generic image. Of course, you can change the size attribute to make the image larger or smaller, but that's all there is to it. :)

3 comment(s) so far

 avatar

Damn, didn't even realize it supported it out of the box! :)

 avatar

Awesome and thanks for sharing this!

 avatar
Kev wrote on January 23, 2008

You're going down at football tonight you big girl

Post your comment