Gravatars or (Globally Recognised Avatars) are a service used by many blogs and social media sites on the internet. It lets a user upload an avatar (or various avatars, each with their own rating, similar to those of movies)
and have it linked to their email address. So wherever they post comments or connect socially on the internet they will have Gravatar shown instead of a blank image (as long as the site is using the Gravatar service).
As I am building this blog myself I decided to create a Gravatar helper which will help me to post Gravatars next to comments on my blog articles.
var $helpers = array('Html', 'Javascript', 'Gravatar');e.g. $gravatar->image('test@example.com', array('size' => 50, 'rating' => 'r'), array('alt' => 'Sidebar Avatar', 'width' => 50, 'height' => 50));
Download cakephp-gravatar-helper-1.1.zip (<2kB) OR
Pull the latest source from my GitHub project page.
If you would like to know how the code works, or have any comments, suggestions or bug reports please post them in the comments section below.
Updated Oct 2, 2009: current version 1.1
