About time! I’ve mentioned multiple times that I wanted to turn the logic I use here for user photos on comments into a plugin. I’ve made two hacks for blogger that do this, after all, why not for WordPress?
My recent work with the DiSo project has caused this interest I had to come back, in the form of two plugins.
Plugin #1 – Avatar from URL
This plugin looks at the comment author’s URL and tries to find a suitable image. This is primarily done by looking for an hCard, but it will also use other images if no hCard I found.
Plugin #2 – AllAvatars
This plugin is what is now powering comment avatars on this blog. It detects if you have the gravatars plugin, the avatars from URL plugin, or the favatars plugin installed and tries to use the avatar those plugins would normally give (in the listed priority order) — thus allowing more avatars to display than with any one of these plugins.
It also detects if there is photo data in the user’s profile (such as data imported by my semi-released hCard Import plugin) and overrides any other plugins with that.
10 Responses
Tsung-Kai Chen •
Great work!! Hope that it would be going to be the default official WP plugin one day!!
Steve Ivy •
Hi Stephen,
Been meaning to subscribe, so I came by to do so and saw your avatar work – I think you’ve got like 3 different plugins I need to try out now!
Thanks for your hard work and interest in DiSo.
Cheers,
–Steve
Pfefferle •
Is one of these plugins working? I got an 404 Error if I klicked the links. I wanted to try the avatar plugin with my hCard-Commenting…
Stephen Paul Weber •
Ooh, sorry, I fixed the broken link 🙂
AllAvatars looks for a photo key in the user’s metadata. You don’t use user logins/profiles for your hCard plugin — but if you import the photo data somehow I can easily add it as another plugin that works 🙂 The goal is kind of to support every possible way to get the avatars, at least eventually.
James Kirk •
Looking real strong, Stephen. You are doing great dev work both for WordPress site owners as well as participation in the DiSo Project. I’m off to NYC tomorrow, and hopefully will have some spare time to install your latests plugs. If not, I’ll definitely get to it over the weekend.
Thanks!
http://johneckman.com/ •
Stephen – can you add a link somewhere to which Gravatars plugin your AllAvatars plug-in is expecting?
II’d like to do something conditional – if Gravatar plug in is installed, but no gravatar is found for the user’s email address, go on to the next check.
Stephen Paul Weber •
It currently looks for http://www.skippy.net/blog/2005/03/24/gravatars/ but I should add support for the “official” one that I just found out about.
It does go on to the next check if no Gravatar is found. It always goes on if no results were found at any point 🙂 That’s the purpose of the plugin 🙂
John Eckman •
Thanks Stephen- I ended up taking a different route for avatars (described at my blog).
For the Avatar from URL plugin, have you considered a tighter approach to parsing the hCard? Applied to http://singpolyma.net/ for example it pulls up other people’s images, since they are tagged with class=”photo fn” – ideally (for me anyway) this would only “catch” images inside hCards on OpenID enabled URLs.
At the end of the day, you want the avatar fetched to be associated with the OpenID used – no some other image which happens to live at that URL, yes?
Stephen Paul Weber •
For tighter integration with hCard/OpenID specifically I have my hCard import plugin, avatar from URL is meant to find the most useful image it can from even non-hCard URLs 🙂
Lecca •
Oi achei bem interessante seu blog.
Gostaria de perguntar se é blogspot?
E as informações que aparece ao lado do autor do comentario, como o a imagem da bandeira do pais, o servidor, navegador é um hack para blogspot?
Obrigada se responder.