MT-MyBlogLog

I've been trying to 'Voxify' my media blog of late. That's included comment threading, relative dates, changes to stylesheets, etc. But the biggest change has been to include avatars. It's also been the biggest obstacle.

Movable Type has no built-in support for avatars. But there are third-party avatars services out there, including Gravatar. Gravatar - short for 'globally recognised avatar' - looked like the natural choice. There are plug-ins for both dynamically and statically published MT pages, for one thing. However, the service is just too slow - page load time for anyone who hadn't cached the avatars already was on the order of 10 seconds or more which is just hopeless. It's also very hard to convince people to go to the trouble of getting a Gravatar when all they get for their effort is a little picture of themselves on a comment.

So I decided to switch to MyBlogLog. This is owned by Yahoo! so is practically instantaneous. It also offers users things for their own blogs, such as widgets that show who's been visiting the blog as well as web analytics functions.

Trouble is, although the service does claim to support adding avatars to comments on MT blogs, it requires the inclusion of the MyBlogLog widget on your blog and I don't particularly want to do that. So I wrote my own MT plug-in: MT-MyBlogLog. Here's how I went about it.

As mentioned there are two plug-ins for enabling Gravatars to work on MT blogs. One works for dynamic pages, the other works for static pages. So the obvious thing to do was to adapt them, rather than start from scratch.

Finding out how MyBlogLog generates avatars was another issue, since I couldn't find any documentation for developers. However, there is a WordPress plug-in, MyAvatars, from which I was able to find out what options there are for avatar generation and how the avatar URL is formed.

Turns out there are far fewer options. Importantly, unlike Gravatar which uses an MD5 hash of the email address as part of the URL, MyBlogLog uses a regular encoded URL, either for a specific web site or email address. Since I didn't especially want to create a plug-in that throws out people's email address to the spambots, and because people are more inclined to give out their blog URL than their email address, I decided only to use the URL encoding for creating avatars.

Since my PHP coding isn't that bad, it was relatively easy to put together the dynamic plug-in. Perl, I know nothing about, so that was far harder and I had to look at some other Perl MT plug-ins to find out certain parts of the Perl syntax.

Still it all works now. There are bound to be issues with it, but fingers crossed, others will get some use out of it, too.

1 TrackBack

MT-MyBlogLog from The Word is Not Enough on September 16, 2007 12:46 PM

My first plug-in for Movable Type is now available.

Read More

2 Comments

Rob,
Just thought you should now that MyBlogLog no longer supports URL encoding of avatars. Looks like it is now some sort of "hash" instead. i.e. something like this:
<img src='http://www.mybloglog.com/buzz/yimg.php?tp=u&id=2006061316071858'>

I believe the Yahoo acquisition is what caused the change.

Ah well.

Well, it does and it doesn't. The old method seems to be either deprecated or just being badly tended, so that some Avatars work and some don't (so mine, for instance, works fine on this comment), and it doesn't seem to matter whether the user signed up for MyBlogLog recently, a long time ago, or not at all. Indeed, MyBlogLog is still suggesting the WordPress MyAvatars plug-in as a good alternative for putting avatars by comments in WordPress blogs, even though it uses the same method as this plug-in

The 'hash' in the new widget is technically the MyBlogLog user's user id, but there's no way as far as I can tell – and I've been looking through the new MyBlogLog API closely – to work out what someone's ID is from their URL. However, it might be possible to extract the avatar or ID from the MyBlogLog widget's 'latest visitor' item.

Leave a comment

Recent Entries

  • MT 4.1 now out

    Movable Type 4.1 is now available, I notice. I gave it a try today and while there are obvious improvements everywhere, there are a couple...

  • MT4: Finally made it

    Finally. I've done it. I've made the switch. With the slight exception of MT Blogroll, which I can do without for now (but which...

  • MT4: nearly there

    Tried again with my bi-weekly MT4 upgrade attempt. We're nearly there now, I reckon. Simply Threaded was giving me some problems and not showing...

  • MT-MyBlogLog

    I've been trying to 'Voxify' my media blog of late. That's included comment threading, relative dates, changes to stylesheets, etc. But the biggest change...

  • MT4: not yet

    The observant will have noticed that I've still not migrated my blogs over to MT4. I did have an abortive attempt at it last...

Close