Serendipity-Buch

Handbuch für Serendipity bestellen

Das offizielle, umfassende Serendipity-Handbuch für Einsteiger und Profis ist nun im Handel und kann online bei Amazon oder OpenSourcePress, oder auch bei jedem Buchhändler, bestellt werden!

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins serendipity_plugin_comments and Gravatar / Favatar?

Creating and modifying plugins.
User avatar
blog.brockha.us
Regular
 
Posts: 467
Joined: Tue Jul 03, 2007 3:34 am

Postby blog.brockha.us » Sat Jul 07, 2007 3:49 pm

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.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
- s9y twitter plugin - http://7ax.de/s9ytwitter

User avatar
blog.brockha.us
Regular
 
Posts: 467
Joined: Tue Jul 03, 2007 3:34 am

Postby blog.brockha.us » Sat Jul 07, 2007 3:57 pm

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.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
- s9y twitter plugin - http://7ax.de/s9ytwitter

User avatar
blog.brockha.us
Regular
 
Posts: 467
Joined: Tue Jul 03, 2007 3:34 am

Postby blog.brockha.us » Sat Jul 07, 2007 4:23 pm

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.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
- s9y twitter plugin - http://7ax.de/s9ytwitter

User avatar
garvinhicking
Core Developer
 
Posts: 26735
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Sun Jul 08, 2007 8:35 pm

Hi!

Awesome. Keep cool stuff like this coming :-)

Committed and best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
blog.brockha.us
Regular
 
Posts: 467
Joined: Tue Jul 03, 2007 3:34 am

Postby blog.brockha.us » Sun Jul 08, 2007 11:07 pm

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. :-)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
- s9y twitter plugin - http://7ax.de/s9ytwitter

User avatar
garvinhicking
Core Developer
 
Posts: 26735
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Sun Jul 08, 2007 11:25 pm

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
blog.brockha.us
Regular
 
Posts: 467
Joined: Tue Jul 03, 2007 3:34 am

Postby blog.brockha.us » Sun Jul 08, 2007 11:58 pm

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.)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
- s9y twitter plugin - http://7ax.de/s9ytwitter



Return to Plugins

Who is online

Users browsing this forum: No registered users and 0 guests