Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2005-11-13 06:10:32

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: [plugin] [orphan] glx_gravatar

Paul,
Here’s the old code if you want it back?
<code>
function glx_gravatar($atts) { global $thiscomment; extract(lAtts(array( ‘default’=>’‘, ‘size’=>’‘, ‘rating’=>’‘, ‘border’=>’‘, ‘class’=>’‘, ‘alt’=>’‘, ),$atts));

$border = (!empty($border) ? ‘&amp;border=’.$border : ‘’); $rating = (!empty($rating) ? ‘&amp;rating=’.$rating : ‘’); $size = (!empty($size) && is_numeric($size) ? ‘&amp;size=’.$size : ‘’); $class = (!empty($class) ? ‘ class=”’.$class.’”’ : ‘’);

$email = $thiscomment[‘email’];

$grav_base_url = “http://www.gravatar.com/avatar.php?gravatar_id=”.md5($email).$rating; $grav_url = “http://www.gravatar.com/avatar.php?gravatar_id=”.md5($email).$rating.$size.$border;

$image = getimagesize($grav_base_url); // check url with only gravatar_id & rating if ($image0==1 && $image1==1 && $image2==1) { // is it 1×1 & gif? return (!empty($default)) ? ‘<img src=”’.$default.’” alt=”’.$alt.’”’.$class.’ />’ : false; }

return ‘<img src=”’.$grav_url.’” alt=”’.$alt.’”’.$class.’ />’;
}
</code>


Offline

#12 2005-11-14 02:11:11

pear-i
New Member
From: Ontario, Canada
Registered: 2005-08-10
Posts: 7
Website

Re: [plugin] [orphan] glx_gravatar

hms anyone have any ideas for teh error it spat out?

Offline

#13 2005-12-12 21:34:35

avantis
New Member
From: Latvia, Riga
Registered: 2005-12-01
Posts: 5

Re: [plugin] [orphan] glx_gravatar

Jup…same with me : Fatal error: Call to undefined function: file_put_contents() in /public_html/textpattern/lib/txplib_misc.php(455) : eval()’d code on line 66

what should we do?

Last edited by avantis (2005-12-12 21:34:50)

Offline

#14 2005-12-13 01:35:02

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [orphan] glx_gravatar

You can still get the original version and see if that’s OK for you. I’m still using it at the moment.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#15 2005-12-13 10:31:35

shafi707
Member
Registered: 2005-12-01
Posts: 17
Website

Re: [plugin] [orphan] glx_gravatar

I don’t know how to use this, I tried but failed, I install it (plugging Install) but how to make it working? Help would be appreciated..


http://tech-resource.info

Offline

#16 2005-12-13 12:33:36

avantis
New Member
From: Latvia, Riga
Registered: 2005-12-01
Posts: 5

Re: [plugin] [orphan] glx_gravatar

thebombsite – thanks! :) the original plugin really worked! so i dont know what graumeister (no offence) is improving…and how.., but it seems that none of his plugins work as it should…

Offline

#17 2005-12-13 14:15:37

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [orphan] glx_gravatar

Which version are you using shafi707? If it’s the version I point to above you need a tag similar to this where ever you want them to appear:-

<code><txp:glx_gravatar size=“40” default=“http://yoursite.com/images/521.jpg” class=“gravatar” alt=“gravatar” /></code>
<br />

“size” is the size that you want for the gravatar. “default” is the URL for a default gravatar that will appear for visitors that don’t have one. “class” and “alt” are your own choice.

Last edited by thebombsite (2005-12-13 14:16:12)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#18 2005-12-20 03:54:19

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [plugin] [orphan] glx_gravatar

the problem with the compatibility is known and we work on an improved version. the error with the file_put_contents comes on php < version 5.

@avantis: “but it seems that none of his plugins work as it should…” which of the plugins you use and what are your problems with it? you have 6 posts in the forum and only one plugin-problem as thread, this one here. i can only fix what comes to my attention.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#19 2006-01-23 20:31:32

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [orphan] glx_gravatar

On the attribute “default” the plugin help says:
“You can specify the full path to the image or the path relative to your serverroot, if it is saved under your current txp-installation.”

That seems to be wrong. When I disabled the cache to get rid of the above reported errors, I had to put a full http://xxx.com/images/8.gif kinda path to make it work. Took me a while to figure out …

Thanks for developing the plugin though ;-)

Offline

Board footer

Powered by FluxBB