Login  Register

Gravatar support

Posted by Jim Westergren on Jan 14, 2011; 3:16pm
URL: https://support.nabble.com/Gravatar-support-tp5922084.html

Gravatar has now become widely used. Not only by WordPress but for example by the Disqus comment system and many big websites such as stackoverflow.com.

I would like to have it enabled in Nabble and it is actually really easy to implement.

The coding could go like:

If (user don't have any avatar uploaded to nabble) {
$emailhash = md5( strtolower( trim( "MyEmailAddress@example.com " ) ) );
$img_src = "http://www.gravatar.com/avatar/".$emailhash."?s=100&r=pg&d=".urlencode("http://n2.nabble.com/images/avatar100.png").";
}

Notice that images are retained at 100px x 100px and that the same default image is shown if the user has no gravatar.
Owner of the free website service N.nu