« Back to blog

Blog: Comment Posting and Gravatars

Graham Weldon

23 October, 2008

Slow progress lately. There is a tonne of stuff to be done at work, and I've actually been doing this site a little slow on purpose. Today I have achieved my own spin on the implementation of a Gravatar helper, and Comment posting is complete with filtering an censoring to clean up potentially abusive responses.

This site is intended to be a proof of concept, not only of my skills, but of the CakePHP framework and its ease of use. Its also a showcase of the new CSS that I have learnt.

The site being slow to develop means that I am actually taking some time to consider my requirements overall, rather than just 'at the time', as well as the requirements of others. This potentially leads to the release of various helpers and components that I have developed into the community.

Today I developed a Gravatar helper.

If you haven't heard about Gravatars, I won't be too suprised. They are Globally Recognised Avatars. The Gravatar site explains this better than I can. Basically it gives you the ability to control what avataris displayed on blogs all over the place, through one central system. Of course, this only works on blogs that implement the gravatar system for people that comment on blog entries.

It uses an MD5 hash of your email address to uniquely identify you and grab your preferred image from the gravatar database. It also includes some funky defaults in case someone is commenting and has not yet setup a gravatar.

Go ahead and comment on this post as a test. Head over to Gravatar and setup and configure your account. You'll see the changes as you adjust your account settings, on this site.

At time of writing, the Gravatar Helper for CakePHP has been submitted to the CakePHP Bakery, and is awaiting approval.