Wavatars Broken

By Shamus
on Mar 24, 2008
Filed under:
Projects

An update on Wavatars:

Yes, I know recent changes to Gravtar functionality (actually, a complete re-write from Ruby to PHP) has broken my Wavatars plugin. I haven’t found time to fix it yet. This is doubly annoying because WordPress 2.5 is coming out very soon, and it will have built-in support for Gravatars. I have no idea how my plugin will work with a system like that. My worry is that it won’t, or that my plugin will become an ugly hack that runs independent of the integrated system. I might need to make small changes, or I may need to re-write the blasted thing. I dunno.

I don’t really have time to spend on it, and now I’m facing a situation where I might fix the plugin only to have the whole thing become obsolete in a week. Or perhaps require a re-write. I could install the upcoming WordPress 2.5 release candidate and find out, but that would take more time I don’t have.

Anyway, all of this whining is here to you know that:

  1. Yes, I’m aware of the problem.
  2. No, I can’t fix it right now.

Several people have fixed my plugin themselves. Someone actually sent me a .diff this morning, which resolved the problem and also cleaned things up a bit. If I manage to get time I’ll update the plugin, but I can’t make any promises.

Enjoyed this post? Please share!



7A few comments. Call it seven-ish.

From the Archives:

  1. Zanfib says:

    Eh, We’ve done without Wavatars before, I’m sure we can learn to do so again.

    EDIT: Maybe you could collabertate with the gravatars people? Just a thought.

  2. John Lopez says:

    Could you simply post the diff file somewhere?

  3. scragar says:

    it’s acutaly very helpfull shamus, use the d= atribute to redirect it back to your site, and load the gravitar’s hash from there, using that to generate the image. I’ll code a basic demo in a few minute’s and let you see it.

    just wrote this up quickly, in no way’s perfect, but still:
    http://pastebin.com/m5e681bbb

  4. Tuck says:

    gravatar_id=$md5.jpg&rating=$rating&size=$size&d=$url

    You’ll have to put an extra semicolon (;) after each & in the above quoted “correct” code.

    Otherwise you’ll lose the semicolons as they’re part of the code for the ampersand.

    Try this?

    gravatar_id=$md5.jpg&;rating=$rating&;size=$size&;d=$url

    Disclaimer: I know nothing about gravatars, wavatars, wordpress or blogging.

  5. ScottS-M says:

    It looks like they built the new WP2.5 built-in avatars so they’d be pretty easy to modify. The get_avatar function is in pluggable.php (all functions inside if (!function_exists( $functionName))) so a plugin can just define the function and automatically overwrite the default function. Also, they include a nice filter to catch the default gravatar output and overwrite or mess with it (apply_filters('get_avatar', $avatar, $id_or_email, $size, $default);). It looks like a plugin could hook into that filter and check if $avatar contains $default and if so change to a plugin generated avatar (or just rewrite all avatar’s to use plugin generated ones if the user doesn’t like gravatars).

  6. Tuck says:

    My above comment is incorrect due to losing the important bits when posting. Please see my comment for the next post! :)

  7. ArchU says:

    Don’t have time? Didn’t you mention in your previous post that you’re using up 5 hours* a week on a treadmill with nothing else to do at the same time? Figure out a way to update and stumble simultaneously, you whiney bum! =p

    *Yes, 6 hours but one is spent thoughtfully reviewing FtB podcasts.

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>