Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Gravatar + Open ID integration

  • divocak
  • divocak
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
13 years 3 months ago - 13 years 3 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?
Last edit: 13 years 3 months ago by divocak.

Please Log in or Create an account to join the conversation.

  • bpuschl
  • bpuschl
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
12 years 4 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
Code:
if ($oValue) { if ($avatar_position=="default")

add
Code:
$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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum