1 joshua Jan 03, 2009 12:20
3 arunprasad Oct 11, 2009 10:18
Hi,
Your tip really useful. I made the necessary corrections in my php and css files and now my avatars were working fine. Thanks a bunch for such a nice and useful information.
I slightly increased the width and height of the image by 10 pixels and added a margin of 3px to the image so that it looks pretty cool in all the posts.
Thanks again for the trick!
-Arunprasad.R :D
4 slamp Dec 07, 2009 00:03
I use this hack on b2evolution 2.4.7
It shows gravatar for non-logged user but not for logged-in users.
Do you have any idea ?
5 sam2kb Dec 07, 2009 03:26
If you are using b2evo 3.x, install [url=http://skins.b2evolution.net/two.php/2009/09/16/pyrmont]Pyrmont[/url] skin, it supports gravatars out-of-the-box
Or if you're brave enough install b2evo 4 ;)
6 slamp Dec 07, 2009 08:17
Nice skin.
7 fplanque Dec 08, 2009 18:05
For what it's worth: gravatar support is built in in b2evo v4/CVS. That was contributed by sam2kb if I'm not mistaken.
8 slamp Dec 11, 2009 21:11
I adapted the hack for b2evo 2.4.7 skins glossyblue
Edit the file
Add around line 165
<!-- ========== START of a COMMENT/TB/PB ========== -->
<li id="comment-<?php $Comment->ID(); ?>" class="<?php echo $oddcomment; ?>"><?php $Comment->anchor() ?>
<? // slamp_091206_begin_gravatar
if( $Comment->get_author_User() )
{ // This comment is from a registered user:
if( empty($Comment->author_User->email) )
{ // We have no email for this Author :(
$grav_email = $Comment->author_email;
$grav_title = "Your avatar on www.gravatar.com";
}
else
{
$grav_email = $Comment->author_User->get('email');
$grav_title = "Avatar of " . $Comment->author_User->get('preferredname');
}
}
else
{ // This comment is from a visitor:
$grav_email = $Comment->author_email;
$grav_title = "Your avatar on www.gravatar.com";
}
$grav_url = "http://www.gravatar.com/avatar.php?rating=G&size=40&gravatar_id=".md5($grav_email)."&d=identicon";
?>
<div style="float:right"><img class="show_gravatar" src=<?php echo $grav_url; ?> width="40" height="40" alt="gravatar" title="<?php echo $grav_title; ?>" /></div>
<!-- slamp_091206_end_gravatar -->
<?php
switch( $Comment->get( 'type' ) )
{
Good tip!