Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[plugin] [orphan] glx_gravatar
Notice: This plugin is no longer officially maintained, but nevertheless there’s a more current version available than the one below, see Michael Pate’s post here)
Original announcement post:
**********************************************************
Hi all,
I took ownership of this plugin by osei and updated it. Some small optimization of code and an empty alt-attribute if no alt-text is given. more information on grauhirn.org.
new version: glx_gravatar 2006.1
greetings
Last edited by uli (2013-01-12 21:47:38)
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [plugin] [orphan] glx_gravatar
> graumeister wrote:
> caching of the images will follow.
Huzzah!
Cheers,
Jon VC#9
Offline
Re: [plugin] [orphan] glx_gravatar
there it is. the new version caches the gravatar-images locally. it works on my sites, please test it and send bugreports to me, if it dont work like intended.
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [plugin] [orphan] glx_gravatar
NOOOOOOOOOOOOOOO…
My host doesn’t allow url file-access! How can I get the old version?
Offline
Re: [plugin] [orphan] glx_gravatar
can you specify the problem? which errormessage comes up? if you are able to upload images, there must be a possibility to use the cache. i try to work around.
There is a new version available where you can disable the cache with the attribute cache set to 0
Last edited by graumeister (2005-10-22 06:33:34)
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [plugin] [orphan] glx_gravatar
Here’s the errors/warnings:
<code>
Warning: file_get_contents(): URL file-access is disabled in the server configuration in /textpattern/lib/txplib_misc.php(429) : eval()’d code on line 23
Warning: file_get_contents(http://www.gravatar.com/avatar.php?gravatar_id=e1644eab1be15e0e775e0d8186300f72&size=40): failed to open stream: no suitable wrapper could be found in /textpattern/lib/txplib_misc.php(429) : eval()’d code on line 23
Fatal error: Call to undefined function: file_put_contents() in /textpattern/lib/txplib_misc.php(429) : eval()’d code on line 60
</code>
I know that quite a few people around here use Dreamhost servers (like me) and I believe that they will all end up with this same problem.
Last edited by paularms (2005-10-22 06:24:14)
Offline
Re: [plugin] [orphan] glx_gravatar
hi paularms, i made a new version where you can disable the cache. please use this, because some other small changes beside the cache are in code and documentation.
i dont think i can solve the problem, when the file-access is disabled, but i will look for it. maybe someone else has a solution.
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [plugin] [orphan] glx_gravatar
I replied to your email. Yes, curl is enabled on my server and I have used that before for some things to get around the url file-access problem. I’m going to try and find out if my host would be so kind as to turn on url file-access though.
Thanks!
Offline
Re: [plugin] [orphan] glx_gravatar
hey there,
i just tried installing glx_gravatar (pasted plugin & activated it)
and added :
<txp:glx_gravatar />
<txp:glx_gravatar size=“60” default=“http://www.pearbox.net/images/gravmage.jpg” class=“gravatar” />
into my comments form
when i go back to a comment on my site it pops up and throws this at me
Fatal error: Call to undefined function: file_put_contents() in /home/osimile/public_html/pearbox/textpattern/lib/txplib_misc.php(429) : eval()’d code on line 66
is this an implementation problem on my part or some sort of bug?
thanks.
Offline
Re: [plugin] [orphan] glx_gravatar
graumeister,
I installed and now it does not recognize my email address to give me my gravatar, and it changed all the old gravatars to default.
Any thoughts?
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
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) ? ‘&border=’.$border : ‘’); $rating = (!empty($rating) ? ‘&rating=’.$rating : ‘’); $size = (!empty($size) && is_numeric($size) ? ‘&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>
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: [plugin] [orphan] glx_gravatar
hms anyone have any ideas for teh error it spat out?
Offline