MicroID Plugin for MovableType

microid is a plugin for MovableType that adds a tag for computing MicroIDs for an MT entry or comment. A MicroID is a microformat that allows authors to claim ownership of Web pages or even portions of Web pages using an email address that they control.

microid makes the <$MTComputerMicroID$> template tag available for use in either a Header, Entry, or Comment context.

Header Context

When used in a header context, <$MTComputerMicroID$> uses information supplied in email and url attributes to compute the MID.

<meta name="microid" 
      content="<$MTComputeMicroID 
                   email="phil@windley.org" url="http://www.windley.com"$>" />

Entry Context

When used in an Entry context, <$MTComputerMicroID$> uses the entry author's email address (as stored in the MT Author database) to compute the MicroID. The tag can be used inside the individual entry template by wrapping the code that generates an entry, like so:

<div class="microid-<$MTComputeMicroID  $>">
<h1><$MTEntryTitle$></h1>

<$MTEntryBody  smarty_pants="1"$>

<div id="a<$MTEntryID pad="1"$>more"><div id="more">
<$MTEntryMore  smarty_pants="1" $>
</div></div>

<p class="posted">Posted by <$MTEntryAuthor$> on <$MTEntryDate$></p>
</div>

Comment Context

When used to compute a MicroID for a comment, the comment author's email address is used to compute the MicroID. The tag can be used in a class attribute in a <div/> wrapping the comment. Here is a portion of an individual entry template showing this use:

<MTComments>
<div id="c<$MTCommentID$>"
         class="microid-<$MTComputeMicroID $>">
<$MTCommentBody$>
<p class="posted">Posted by: <$MTCommentAuthorLink default_name="Anonymous" spam_protect="1"$> 
<MTCommentAuthorIdentity> at <$MTCommentDate$></p>
</div>
</MTComments>

Download and Installation

The microid plugin is available for download. After you have downloaded it, put it in the $MTHOME/plugins directory of your MT installation. You should be able to check the installation by visting the page that displays registered pluging in MT. You should see something that looks like this:

Dependencies

microid used to depend on the Digest::SHA1 library, but that is no longer true. The only dependency is MT 3.0 or greater.

Version

This document describes version 1.0.

If you enjoyed this article, consider subscribing to my RSS feed or signing up for my free newsletter.

Last Modified: Tuesday, 28-Mar-2006 16:07:49 MST