Adding Gravatar Support to a Graffiti Theme Monday, March 17 2008 on My Blog
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. :)










