A little while ago Alper Ã‡uÄŸun released an hAvatar plugin, which parses the url left by a comment author, and if it finds an hCard there, looks for an image in the hCard. This is a nice step towards URL-based identifiers rather than email based ones.
The solution, for me at least (and for now) was to take Jan Olsen‘s excellent MBLA plugin and hack it up a bit. I took out the “Google Preview” functionality, and added in support for the hAvatar plugin. (MBLA already handled Gravatar and MyBlogLog, and had a nice caching system to boot, so it made a nice place to start).
So, if you leave a comment below, it should do the following:
- If you leave a url in the url field (doesn’t have to be an OpenID, but it can be), and there is an hCard living at that url, and that hCard has a photo, it should be retrieved.
- If you don’t provide a url, or the url you provide doesn’t have an hCard at it, or that hCard doesn’t have an image in it, then your email address will be checked at both MyBlogLog and Gravatar
- If you don’t provide a url or an email address, you won’t get an avatar associated to your comments
There’s also caching, thanks to MBLA’s nice framework, currently set to just 1 day, for testing – I will pump it to longer timeframe once I’m convinced it all works.
If you’d like a copy lemme know – once I’ve tested a bit I will publish the code.