This person wrote a Gravatar plugin for bBlog and I set it up here for the comments. I like the idea of Gravatars a lot, so I’ll try them out and see how it goes.
If you are interested in the procedure, download the function.gravatar.php file from the website above, throw it in your bBlog_functions directory, go to the admin panel, and rescan to pick up the plugin.
Then you have to edit the bBlog/inc/bBlog.class.php file, search for the format_comment function and insert the line $commentr['posteremail'] = $comment['data']->posteremail;
before the return statement.
Then you have to edit your template file to put the gravatar image where you would like. The code should go into the comments section in the post.html file. I added a <img style="margin-right: 10px;" src="{gravatar email=$comment.posteremail}" align="left"/>
line to template and things are working great.
I would actually like to add Wavatar support on top of the Gravatar stuff, but that would take more than five minutes, so it will have to wait until I get more time.
Also, if you want to change any of the default values, you can set them in the call to the gravatar plugin in the template file (e.g., add {gravatar email=$comment.posteremail size=80 default=http://example.com/image.png}).
Leave a Reply