* How To Add Tags To Your Movable Type Blog With Tagwire, or Tagmogrify Your Blog, or Burn Your Feed Without FeedBurner, or Mr. Pibb + Red Vines = Crazy Delicious

Sometimes you just can’t come up with the perfect title, or the perfect tag, but fear not, there is hope.

In one of Steve Martin’s early (circa 1973) standup comedy routines, he used to comment about how hard it is to learn the French language because “those French have a different word for everything.” So it is with taxonomy, or folksonomy, or tagging (see what I mean?), or with the title of this entry/article/post. There is more than one way to describe, categorize, and classify information. The most popular way may not be best for you, your way may not be best for you, or for someone else, or their way may not be best for you, or for them, or for some third party who has not yet entered into this stream of consciousness.

In one embodiment, this is an article about how to transmogrify (http://en.wikipedia.org/wiki/Transmogrifier) (or tagmogrify) your Movable Type Weblog into a tag-rich, folksonomy-friendly, taxonomy-enabled weblog.

In another embodiment, this is an article about how to add links and tags to your Movable Type weblog content and feed without having to use third-party services like FeedBurner (http://www.feedburner.com/). FeedBurner calls the bells and whistles it adds to feeds FeedFlare (http://www.feedburner.com/fb/a/publishers/feedflare), I have called them “feed fun,” just for fun. By the way, just because I am saying that you can do this without FeedBurner doesn’t mean that you should. Some people like the full-service plan, others prefer the do-it-yourself plan. Or, to put it another way, Mr. Pibb + Red Vines = Crazy Delicious (http://en.wikipedia.org/wiki/Lazy_Sunday). I acknowledge that FeedBurner adds value to its target market, but I am not that target market. Sometimes you need professional help, and FeedBurner is good for folks who don’t want to do it themselves. (For example, there is no trademark on file at the USPTO for FeedFlare, which I’ll gladly do pro bono. Sometimes you need professional help. Rick, give me a call.)

In yet another embodiment, this is an article that is written in the style of a patent specification. Actually, I’m just trying to see how screwed up I can make the tags for this entry. The tags, Technorati links, and del.icio.us links are all added automatically. What is needed, therefore, is an explanation of how to do all of this.

Step 1. Clear your Movable Type keywords. I’ve been using Movable Type (http://www.sixapart.com/movabletype/) for a long time (https://www.giantpeople.com/181), and I had a couple of hacks installed to give me control over the filename that Movable Type automatically generates for individual archives. That hack involved putting the desired filename in the Keywords field of each entry and modifying the generated filename template (not what Movable Type calls them – they call them “Archive Map File Paths”) with Brad Choate’s MTIfEmpty plugin (http://www.bradchoate.com/weblog/2004/10/20/mtifempty). Well, at some point (with v3.0 of MT, I believe), Six Apart smartened up and allowed you to edit the default filename via the Basename field. So I had to move all of my filenames from the Keyword field to the Basename field and change the MT filename templates (“Archive Map File Paths”) from:

<$MTEntryDate format=""$><MTIfEmpty var="EntryKeywords">
<$MTEntryID pad="1"$>.html</MTIfEmpty>
<MTIfNotEmpty var="EntryKeywords"><$MTEntryKeywords$>



If you have other info that you need in the Keywords field, now is the time to figure out what to do about it. You could move it to hidden HTML text in the EntryBody or EntryMore (extended entry) fields. I only used the Keywords field for the filename, so I didn’t have this issue.

I also removed all of my now unused MT plugins, in case one plugin conflicts with another.

Step 2. Add keywords to your blog with MT-KeywordExtractor. In this step, you’ll automatically populate the Keywords field of each entry on your weblog with keywords generated by Yahoo’s Term Extraction API (http://developer.yahoo.com/search/content/V1/termExtraction.html). See How To Add Keywords To Your Blog With MT-KeywordExtractor (https://www.giantpeople.com/557).

Step 3. Turn MT keywords into linked Technorati and del.icio.us tags with Tagwire. Tagwire is a very useful Movable Type tagging plugin (http://www.sixapart.com/pronet/plugins/plugin/tagwire.html) and there is excellent documentation on the Tagwire developer’s website (http://as-is.net/wiki/Tagwire_Plugin). I chose Tagwire because it supports comma-delimited lists of keywords and doesn’t interfere with Movable Type categories, features that are missing in other MT tagging plugins, namely Tags (http://www.sixapart.com/pronet/plugins/plugin/tags.html) and mt-tagslite (http://www.sixapart.com/pronet/plugins/plugin/mttagslite.html).

I won’t go into detail about how to install and configure Tagwire, because their documentation is more than adequate. But I will point out that Tagwire installs itself as a system-level plugin, so don’t despair if you don’t see the Tagwire plugin on the MT plugins page; it should be there on the system-level plugin page. It’s actually a good idea to always check system-level and blog-level plug config pages to make sure that plugins are activated system-wide and blog-wide.

Once you have Tagwire installed (don’t forget to chmod 755 tagwire.pl), all you’ll need to do is add some Tagwire tags to your MT templates, such as your Individual Entry Archive template (the only place I added Tagwire stuff). Here’s the code I added to my Individual Entry Archive template to make Technorati links from my MT keywords:

<b>Technorati</b> Tags 
(via <a href="https://www.giantpeople.com/557.html" 
target="new">Yahoo API</a>): 
<MTEntryTags glue=" | " case_sensitive="0">
<a href="http://www.technorati.com/tag/<$MTTag encode_urlplus="1"$>" 
rel="tag" title="Technorati tag: <$MTTag$>"><$MTTag$></a>

To add del.icio.us tags, I added this code to my Individual Entry Archive template:

<b>del.icio.us</b> Tags 
(via <a href="https://www.giantpeople.com/557.html" 
target="new">Yahoo API</a>): 
<MTEntryTags glue=" | " case_sensitive="0">
<a href="http://del.icio.us/tag/<$MTTag encode_url="1"$>" 
rel="tag" title="del.icio.us tag: <$MTTag$>"><$MTTag$></a>

The del.icio.us tags are not perfect, because del.icio.us prefers single-word tags (a rather bizarre design decision, IMHO), but I’m going to start tagging two-word tags to del.icio.us using “%20” as the space character.

To add links to related entries (related by common tags), I added this code to my Individual Entry Archive template:

<b>Related Entries</b> 
(via <a href="https://www.giantpeople.com/557.html" 
<MTMostRelatedEntries lastn="7"><a href="<$MTEntryPermalink$>" 
target="new"><$MTEntryTitle$></a> | 

The “most related entries” feature is really cool. Because often you will not realized that articles are related. I found an article that I had written about WiFi (https://www.giantpeople.com/431.html) linked to a bunch of my Red Sox articles, because I wrote about watching Red Sox games wirelessly from our tree house in that article, a connection that I had forgotten about. So tagmogrifying your weblog (in general) – and Tagwire (in particular) – is a very cool way to find related entries written by you or by others.

Step 4. Cool your feed (or burn your feed, take your choice). In order to add all of the tags to my weblog’s feed, I had to add one line to my atom.xml template (the “MTInclude” line in the following code snippet):

<content type="html" xml:lang="<$MTBlogLanguage ietf="1"$>" 
xml:base="<$MTBlogURL encode_xml="1"$>">
     <$MTEntryBody encode_xml="1"$>
     <$MTEntryMore encode_xml="1"$>
     <$MTInclude module="my-feed-fun" encode_xml="1"$>

The trick here is that I make use of MT modules, discussed below.

So after installing two Movable Type plugins and making some minor changes to my templates, I added most of the functionality (e.g. I have no usage statistics for these features) of FeedBurner’s FeedFlare, including “Add a comment,” “Add to del.icio.us,” and “Subscribe to this feed” links in my weblog feed and on each weblog entry.

Step 5. Use Moveable Type Modules. Any time you have common chunks of code being used in multiple Movable Type templates, you should create a module for that code and then include the module in the templates. By using modules, you can simplify your weblog (and feed) design, adding and changing functionality by deciding which modules to include in your templates.

For a more detailed description of Movable Type modules, see my Movable Type Brain Dump (https://www.giantpeople.com/427.html).

The following table shows the template modules that I use (and their general position on the page) in my Individual Entry Archive template:

1. my-meta
2. my-javascript
3. my-header
1. my-left-menu, a module that contains other modules, currently:
1.1 my-subscribe
1.2. my-recent-entries
1.3. my-about
1.4. my-categories
1.5. my-archives
1.6. my-blogroll
1. MTEntry-related template tags
2. my-article-body
3. my-feed-fun, a module that contains other modules, currently:
3.1. my-feed-fun-posted-by
3.2. my-feed-fun-categories
3.3. my-feed-fun-permalink
3.4. my-feed-fun-technorati
3.5. my-feed-fun-delicious
3.6. my-feed-fun-related-entries
3.7. my-feed-fun-random
4. my-comments
5. my-links (trackbacks, currently disabled)
6. my-post-a-comment
1. my-right-menu, a module that contains other modules, currently:
1.1. my-ads
1.2. my-favorites

Summary. At the end of this process, I was able to automatically add Yahoo-generated keywords to all 500+ of my entries, and then automatically add links to third-party tag-related sites (Technorati and del.icio.us) and to related (by tag) articles on this weblog. All of my weblog’s content is now more connected, more interrelated, and hopefully more relevant and useful to its target audience. By my count, each entry has about 40 new links, so I have added about 20,000 links (internal + external) to my weblog. Will that make the site “better” (whatever that means)? Only time will tell. If it helps me find one piece of content that I otherwise wouldn’t have found, then it was worth the effort.

Print Friendly, PDF & Email

4 Replies to “* How To Add Tags To Your Movable Type Blog With Tagwire, or Tagmogrify Your Blog, or Burn Your Feed Without FeedBurner, or Mr. Pibb + Red Vines = Crazy Delicious”

  1. In step three, the code you refer to is for the “Tags” field, not the “Keywords” field… So if I’ve had comma separated Tags in there for ages, what’s the code to keep using the keywords field?

  2. Pingback: David Yin's Blog
  3. There doesn’t seem to be a way to get two-word tags (or multiple-word tags) into del.icio.us, so I’m going to remove the my-feed-fun-delicious module for now.

    Am I the only one who thinks it’s ironic that Yahoo’s API (https://www.giantpeople.com/2005-05-08-mt-keywordextractor.html) generates multi-word comma-delimited keywords but that del.icio.us (owned by Yahoo as of 12/2005) only accepts single-word space-delimited tags (http://del.icio.us/help/tags)?

  4. If there are no related entries, then the “related entries” data at the end of each entry will be blank. Except for the link to the “About Related Entries” page (this page).

Leave a Reply

Your email address will not be published. Required fields are marked *