Gravatar + Open ID integration

12 years 7 months ago - 12 years 7 months ago #175287 by divocak
Replied by divocak on topic Re:Gravatar + Open ID integration
Hi,

i try implemented your hack into my site with new version CB (1.7) and it is working in profile but in mod_cblogin i still see default gravatar image. Can somebody help?

Please Log in to join the conversation.

11 years 8 months ago #207078 by bpuschl
Replied by bpuschl on topic Re:Gravatar + Open ID integration
In modules/mod_cblogin/mod_cblogin.php Around line 200 just before
if ($oValue) {
			if ($avatar_position=="default")

add
$query = "SELECT email FROM #__users WHERE id = ". (int) $_CB_framework->myId();
		$_CB_database->setQuery( $query );
		
		// some joomla versions (1.5.1, 1.0.11+ do htmlspecialchars in database!):
		$email = htmlspecialchars( cbUnHtmlspecialchars( $_CB_database->loadResult() ) );
	
		$oValue = "http://www.gravatar.com/avatar/".md5(strtolower(trim($email)))."?d=$oValue";

This inserts the gravatar or if none exists the default CB avatar

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.186 seconds

Facebook Twitter LinkedIn