Buy Now
Sign in


thiagovagostelo , April 12 2009, 20:34
thiagovagostelo 3
April 12 2009, 20:34 #29602

I'm Trying to put Gravatar in my ChronoComments. I use this code in comment-item.html.php

$email = "{comment_email}";
$email = strtolower($email);
$size = 80;
$default = "";
$grav_url = "".md5($email)."&default=".urlencode($default)."&size=".$size; ?>
<div id="ver"><?php print $email;?></div>
<img src="<?php echo $grav_url; ?>" alt="avatar" class="avatar"/>

This print to me the email from comment but the gravatar don't work. If I change "{comment_email}" for my email the gravatar work perfect, so, you have any idea whats goin on? I can pick the email from comment if php and not if {comment_email}?


Thiago Vagostelo
thiagovagostelo 3
April 13 2009, 04:20 #29604

After hours trying I find a answer =D

If anyone want gravatar in your comment system you have to do this:

In /components/com_chronocomments/chronocomments.php find:
'avatar' => $avatar ? $avatar : JURI::Base().'components/com_chronocomments/images/avatar1.png',
and replace it with:
'avatar' => ''.md5( strtolower($commentx->email) ).'&default=',

three times in this file. Save and up!

In /plugins/content/ChronoComments.php

'avatar' => $avatar ? $avatar : JURI::Base().'components/com_chronocomments/images/avatar2.png',
and replace it with:
'avatar' => ''.md5( strtolower($commentx->email) ).'&default=',

twice in this file. Save and up!

Ok, your gravatar is working =P I put 80px x 80px in mine but you can put the size you want =)

Sorry my english, I'm brazilian =P And great component =D


Thiago Vagostelo

[[>> edited for clarity : greyhead <<]]
admin 33
April 15 2009, 05:47 #29827
Hi Thiago,

obrigado! this is really helpful, in the last few days I was not active here because of Chronoforms upgrades, I will make this better soon!

Maxvn 15
April 25 2009, 05:14 #30769
thank so much

I got it