PunBB already has it’s own Avatar system however I wanted to use the Gravatar site which is a central place to store avatar images.
To add gravatar functionality to PunBB you need to edit your viewtopic.php and look for the following line.
else
$user_avatar = '';
And replace it with..
else
{
$user_avatar = '<img src="http://www.gravatar.com/avatar.php?gravatar_id=';
$user_avatar .= md5($cur_post['email']);
$user_avatar .= '&size=40" width="40" height="40" alt="" />';
}
This will automatically slect the graviatar based on the users email address.