A MovableType PlugIn for MicroIDs


Yesterday's entry on MicroID got me thinking that to be truly useful, blogs and other sites are going to have to including MIDs (as I call them) in every entry and comment as a matter of course. For that, you need a plugin. I've been wanting to learn to write plugins for MovableType for sometime, so I set out to do so this morning.

The result is microid, a MovableType plugin that can be used inside MT's template system to add MicroIDs to entries and comments. If you look at the source for this entry, for example, you'll see a MID inside a <meta/> tag in the header and a <div/> for the entry body as well as any comments that are there.

The header MID is calculated from an email address and URL given to the tag as attributes. The entry MID is computed using the entry author's email address and the URL of the page. Comment MIDs are computed from the email address given by the commenter. This is all explained with examples in the documentation.

I found Timothy Appnel's tutorial on writing MT plugins very helpful as well as this documentation on template contexts.

Most of my time was spent learning how to write MT plugins. The computation is dirt simple. I suspect someone who knows how to write a plugin already could have done it in 20 minutes. Anyone know how to hack WordPress?


Please leave comments using the Hypothes.is sidebar.

Last modified: Thu Oct 10 12:47:18 2019.