MovableBlog: Archives: August 2003

A weblog about the Movable Type Publishing Platform and other geekery

August 10th, 2003

Plugins Work in Archive File Templates »

If anybody's wondering how Mark Pilgrim has shorter permalinks to his posts (like the URL for this entry), the answer lies in using Movable Type's Entry Keywords field and the MTIfEntry plugin. He may do it differently: the following worked for me in an experimental installation of MT. He did tip me off to his using the Entry Keywords, however.) Plugins, as I found out recently, can be used in the Archive File Templates.

Update Aug. 14, 11:25 PM: Mark has written up an article on how he did it.

This is how I have the Archive File Templates, for the Individual Archive, setup in my experimental installation:

<MTIfEmpty var="EntryKeywords"><$MTEntryTitle dirify="1"$>.php</MTIfEmpty><MTIfNotEmpty var="EntryKeywords"><$MTEntryKeywords dirify="1"$>.php</MTIfNotEmpty>

You can get rid of cruft even further, even if you rely on PHP inside the Individual Entry archives. One could take permalinks come tantalizingly close to permalinks for the Ultimate Blogging System. The Individual Archive File Template would look something like this:

<$MTEntryDate format="%Y/%m/%d/"$><MTIfEmpty var="EntryKeywords"><$MTEntryTitle dirify="1"$></MTIfEmpty><MTIfNotEmpty var="EntryKeywords"><$MTEntryKeywords dirify="1"$></MTIfNotEmpty>

To parse as PHP (my host automatically parses .php files, but it's not automatic for other files), one could put the following line in .htaccess, and your archives folder would be a good candidate for the file's location:

ForceType application/x-httpd-php

So the link to this entry, instead of being fairly crufty (and lacking the year in it), would, if I had typed the word "Permalinks" in the Keywords field (without quotes), look something like But if there's no words in the Entry Keywords field, the Entry Title is used to create the filename. Of course, that depends on actually putting in something for the Title, but that's never a problem for me.

But the moral of this story is that plugins work inside the Archive File Templates, which means a lot of fun can be had with constructing MT blog's URLs.

While on the subject of permalinks, I'm actually considering using the above code to change the permalink structure. Don't worry, I'll use mod_rewrite, but probably using MT to generate a rather large .htaccess, then leave it as a static file, using the MT tags found here (just above the "ErrorHandler" heading). It's the least worst way of reducing cruft while keeping all links (including links to individual comments inside entries) valid.

Posted by Richard at 07:39 PM | Category: MT | Comments (5)

August 3rd, 2003

TypePad: A Review »

Let's start this off with a disclaimer, shall we? I have an emotional attachment to Movable Type, having used it daily since October 2001, so I'm necessarily biased towards it and its creators, Ben and Mena Trott. I also think Anil Dash is a funny guy.

I'll post links to other TypePad reviews here. Feel free to Trackback this post if you have a review.

First the not-so-good, then the good.

I had the full-meal deal when using the TypePad Beta, so I'm unfamiliar with the experiences of those who chose the Basic or Plus versions at the outset. Looking at the features list, I'm a little surprised that some things that I take for granted in the free version of Movable Type (like per-post options and search & replace) are not in the Basic version of TypePad. Also, Anil, in the title element of his link to the TypePad features, notes that he pays more to host his site than it costs to host at Well, it would cost more for me to host at TypePad with the level of service I get at Verve Hosting: $10 a month gets me the same 200 MB as TypePad Pro but with email accounts up the wazoo, CGI, addon domains, and 10 GB of bandwidth. Now, granted, I have to setup MT my damn self, or, if I wasn't sufficiently technically inclined, get someone else to do it. The whole point of TypePad is to avoid the installation and configuration hassles. So it's for the reasons that a) I currently pay less to get more, and that the free version of MT does what I need it to that I'm hesitant to move to TypePad. (Of course, there are extras in TypePad that aren't in MT, and hopefully these extras make their way into future versions of MT, pay or otherwise.)

However, and this is a pretty big however, there are a ton of webloggers and potential webloggers who are not as technically inclined as myself, and TypePad is very well suited to them. Here's why: Features I didn't try:

Posted by Richard at 01:36 PM | Category: TypePad | TrackBacks (7) | Comments (11)