How to implement Gravatar in Frog CMS

Posted by on Thu, 20 Mar 2008

To implement gravatar in Frog CMS, it is really easy. In the backend there is a section called Snippets. In this section there is a snippet call comment-each. If you have comments enabled on your page, this gets called for each comment. Find the part in the snippet right after the:

<?php foreach ($comments as $comment): ?>

You will see all of the html code used for the comment, insert this piece of code where you would like the gravatar image to show up.

<img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php echo md5($comment->email())?>" alt="Gravatar"/>

Copyright 2012 A.J. Cates - Valid HTML5 - Powered by Wolf CMS