Page 1 of 1

serendipity_plugin_comments and Gravatar / Favatar?

Posted: Sat Jul 07, 2007 3:49 pm
by blog.brockha.us
Hi.

I recently added the gravatar plugin to my blog. Nice, I like it.
I configured it, that it first tries Favatar. The result is, that the comments directly below my articles use Favatars first and only if not found, try to get a Gravatar. This is, what was intended.

But the sitebar plugin serendipity_plugin_comments uses Gravatars only! The sidebar plugin definitly is affected by the Gravatar plugin, as it doesn't display any Avatar w/o the Gravatar Plugin. But it seems, that the Gravatar Plugin only hands Gravatars to the Sidebar.

On this page of my blog you can reproduce this problem.

P.S.: And Gravatar is not working at all at the moment at my site. I have a Gravatar, but the sidebar only displays the default Gravatar. But this seems to be a problem in the Gravatar service, as the image URL looks okay.

Posted: Sat Jul 07, 2007 3:57 pm
by blog.brockha.us
Aaah! I found the reason! :-)

The serendipity_plugin_comments plugin only hands the email of the commenter and not the url. Gravatar needs an email, Favatar needs an URL. Without the URL information, Favatar is not working, so the Gravatar Plugin directly falls back to Gravatar.

So serendipity_plugin_comments.php has to be patched at line 190:

Code: Select all

                $entry = array('comment' => $comment,
                               'email'	 => $row['comment_email'],
                               'url'	 => $row['comment_url'],
                               );
After this, Favatars are shown at the sidebar, too.

Posted: Sat Jul 07, 2007 4:23 pm
by blog.brockha.us
I've added some missing German translation to the serendipity_event_gravatar language file:

Code: Select all


@define('PLUGIN_EVENT_GRAVATAR_CACHING', 'Gravatare zwischenspeichern?');
@define('PLUGIN_EVENT_GRAVATAR_CACHING_DESC', 'Wenn Gravatar Bilder zwischengespeichert werden sollen, muss hier die Anzahl an Stunden eingetragen werden, die Bilder vom eigenen Server anstatt vom Gravatar Service abgeholt werden sollen. Dies wird mehr Traffic auf diesem Blog Server verursachen, dafür macht es die Avatar Darstellung unabhängiger vom Gravatar Service. "0" stellt das zwischenspeichern ab.');

@define('PLUGIN_EVENT_GRAVATAR_METHOD', 'Bitte den bevorzugten Avatar Typ wählen');
@define('PLUGIN_EVENT_GRAVATAR_METHOD_DESC', 'Gravatare werden von einem zentralem Server anhand der EMail Information des Kommentators abgeholt, Favatare sind die favicons auf der Homepage, die der Kommentator angegeben hat.');
Feel free, to add this to the CVS.

Posted: Sun Jul 08, 2007 8:35 pm
by garvinhicking
Hi!

Awesome. Keep cool stuff like this coming :-)

Committed and best regards,
Garvin

Posted: Sun Jul 08, 2007 11:07 pm
by blog.brockha.us
I rechecked both of the repositories, everything looks fine.
Thanks for comitting!

The NEWS file in the SVN only lists changes in the core code, right? Else the comment_plugin fix is missing. :-)

Posted: Sun Jul 08, 2007 11:25 pm
by garvinhicking
Hi!
The NEWS file in the SVN only lists changes in the core code, right? Else the comment_plugin fix is missing. :-)
True, NEWS is only for internal code. For plugins, we only sporadically have a ChangeLog. :-/

For the NEWS file, I often only list things there that readers of the NEWS file can make sense of. For things like the patch for a new variable, I usually don't list it in the NEWS file because of the small relevance. But if you think it's better to list it, you can now add it for yourself, if you like? :)

Best regards,
Garvin

Posted: Sun Jul 08, 2007 11:58 pm
by blog.brockha.us
Well, the reader could be interested, that the comments sidebar plugin now supports favatars, too. :-)
(I wouldn'd mention the change of variable handling, as this realy makes no sense to the normal user.)