« Second-guess | Main | Comet Machholz »

Staying with Movable Type

A while ago, I considered moving from Movable Type to WordPress for my weblog application. Among the reasons were its open source nature, its mechanisms for fighting comment spam and the fact that jr switched to it and seems to like it. Thus, I installed WordPress, imported my entries from Movable Type and started installing plug-ins and modifying the templates to get the same look and behaviour I have with Movable Type. This includes, among others, Markdown, SmartyPants and and such details as a full archives page with the title of every entry to date, links to the daily archive page anywhere the entry date is displayed, etc.

Unfortunately, I didn't realise quickly enough that WordPress doesn't fit my needs. Since I had no particular intention of fitting my needs to WordPress, I ended up spending too much time trying to bend the latter to the shape of the former.

What I tried to do is of no interest but for the records, I will detail here what I like and dislike in both weblogging applications.

Note: The version of WordPress I used when I considered switching was 1.3 alpha. I just read that version 1.5 came out, but funnily, I never heard about 1.3 stable or 1.4. Anyway, given the time I invested in 1.3 alpha for nothing, I have no intention whatsoever of trying WordPress again unless I see proof that version 1.5 is an order of magnitude better than Movable Type.

Movable Type 3.1

Movable Type is a commercial product by Six Apart. A limited free version is available allowing a single author to create up to three weblogs. This version is not supported (in the sense that no technical support is offered) but is otherwise fully functional and no different from the paying personal and commercial editions. So there is no reason why it shouldn't work as well, which is already a kind of guarantee regarding the efforts put into development and testing.

There has been a lot of noise around the new licensing scheme when Movable Type 3.0 was released. I don't remember the details but some things have since then been clarified by Six Apart and some points have been modified so the majority now seems satisfied. The paying editions all allow unlimited weblogs and the price increases with the number of authors. There are four pricing scales: personal, commercial, education and not-for-profit. At $70 for five authors, the personal edition is affordable for situations where several writers contribute to the site or where more than three weblogs are needed. The only case I see where this licensing scheme might be a problem is for a small company with a very tight budget that cannot afford to put $200 in a web publishing tool.

Dynamic pages — I was looking forward to dynamic page support. Having to rebuild the whole site whenever you change something in a global template (like the left-side menu) before you can see the result is rather painful and if your site is not heavily visited, there is not much need for static pages.

Unfortunately, I am disappointed with the dynamic page implementation in Movable Type 3. Whereas Movable Type and its plug-ins are written in Perl, dynamic pages are rendered using PHP, which has the unpleasant side effect that any Perl plug-in you use on static pages must have a PHP counterpart for dynamic pages.

On the other hand, all the plug-ins I use either already have a PHP version, for use with WordPress, or I wrote them myself. In Bö's case, both. Moreover, switching to WordPress means needing PHP plug-ins as well, so as disappointing the feature might be, it's no reason for switching.

I have not yet started using this feature in Movable Type 3.1 but I know what I would like to use it for. If I could make a copy of all my templates and set them to be rendered dynamically, I would get a dynamic copy of my weblog that I can modify in real time whenever I want to make a change to the templates or the style sheet, and this without affecting the static copy that visitors see. When the edit is finished, I just copy the new templates over the old ones and rebuild the site.

Documentation — Movable Type's documentation is all right. Installation instructions are detailed (maybe a bit too much) and the contextual help in the administration section usually helpful. My only gripe is with the template tag documentation that is not very comfortable to use and that does not include all the new tags of version 3, for example MTCommentFields.

Localisation — When reading the documentation, one has the impression that Movable Type is easy to localise in another language. It supports date formats for many countries and several language packs.

Unfortunately, these features are too incomplete to be any use. The language packs only translate the administration section, which is not very useful. As for the date formats, they only concern the names of the months and days. Even though the %x and %X formats are described as "The language-aware date/time representation", using them on a weblog configured for French will result in a date looking like "février 13, 2004 07:20 PM" instead of the correct "13 février 2004 19:20". That's a bit far from my definition of "language-aware". The title of the daily archives exhibit the same problem. Finally, there is no setting to make the side bar calendar start on Monday.

TypeKey and templates — TypeKey is a new feature in Movable Type 3 that provides a central user registration process for comment posting. It's nice but it makes the comment form template a nightmare of complexity. There are two different forms depending on whether registration is required for comments and a fair amount of JavaScript to alter the forms when the user is logged-in. Imagine having to translate this into another language. On the other hand, the default template for comment previewing is extremely simple. The whole comment form is generated using a single MTCommentFields tag. The problem is that it makes customisation impossible. I would like something in-between the two, clean to define but reasonably flexible.

Speaking of TypeKey, I had an unpleasant surprise the firt time I used my account to post a comment on a weblog: my nickname appeared as Ölbaum. Those who know me will have guessed that this kind of thing gives me the shivers. On the other hand, it does not appear to happen if the character encoding of the weblog is UTF-8, so it should be safe to use TypeKey on this weblog. For weblogs that use another encoding, a fix is probably needed to tell TypeKey in which encoding the user name is expected. I am sure Six Apart will address the issue with efficiency.

SQLite — Movable Type supports SQLite for its database back-end. I am really fond of this feature because it makes it very easy to set-up a local Movable Type installation, e.g. for plug-in development or template design. Backup is dead easy too as the database consists of just one file.

Fighting comment and trackback spam — Movable Type has a number of features that help fight comment and trackback spam.

Movable Type 3 can require TypeKey registration for users who want to post a comment. It would likely reduce comment spam but I didn't enable it (TypeKey sign on is possible but not mandatory) because I don't want to discourage people by making them create yet another web site account.

Comment moderation gives a chance to the author of the entry to approve a person's first comment (according to the comment pending page, but it must really be every comment as all the comments I post on my own weblog are delayed for moderation) before it appears on the site. It is a nice feature because it does not require you to permanently check for comment spam to remove. Instead, you can quietly let it accumulate, without it appearing on the site, until there's a sufficient quantity to be worth deleting.

I only wish there were a similar feature for trackbacks. Instead, they show up immediately after they're received, which is not very consistent with the comment features. I recently took measures to reduce trackback spam and it seems to work (ask nicely and I will tell you how, I am not going to write instructions here) but moderation would be better.

While on the subject of trackbacks, there are two features I miss: I would like to be able to edit trackbacks, because it is sometimes necessary to clean up the excerpt of the markup it contains, and I would like a link to the pinged entry on the trackback list of the Movable Type administration section.

Last but not least, MT-Blacklist 2 is part of the Developer's Contest Plugin Pack: 2004. It uses an automatically updated list of URLs that are advertised in comment spam to block the comments and trackbacks that contain them. It can also force moderation of comments that contain more than a given number of URLs and match the text against regular expressions.

It works well enough but it could do with a bit more flexibility. Black list strings and regexes apply to the full comment or ping content but would allow smarter filtering if the could be matched against the ping title only, for example. Also, after I manually de-spam a comment or ping, I would expect to be able to search for other recent items that match the black list, so I don't have to manually check all the comments pointing to the same domains that were posted in the last batch.

WordPress 1.3 alpha

WordPress is open source and free to use even for commercial sites. It can only handle one weblog with several authors. It is written in PHP but the only extension it requires is MySQL support so this time you can pass on the all too common e-mail to your hosting provider asking if they can recompile PHP and add extension foo. WordPress is entirely dynamic. Every page is generated on each visit. It is quite comfortable during redesigns but sometimes the site slows down to a crawl with no apparent reason. There is a caching plug-in in development state but its description alone is sufficient to scare you off of trying it.

Installation — Installation goes without a hitch and within the promised five minutes. The only problem is with the download. Many people agree that WordPress 1.3 alpha is useable and has many improvements over the stable 1.2 version, especially concerning Unicode support (and I'm inflexible regarding Unicode support).

However, at the time of writing, the alpha version was only available as nightly builds, the last six to be accurate. Since the nightly builds are released, well, every night, their quality is highly random. If you are very unlucky, you might download a version that's right in the middle of a big bug fix and it won't even run. I would greatly prefer using a version from two weeks ago if the developers would label it as "mostly useable".

(Lack of) template system — WordPress doesn't use templates (although, for the sake of simplicity, I will use the term 'templates' in this article to speak of the mechanism WordPress uses to emulate them). Instead, you modify index.php in which you call PHP functions to display the content of your entries. The result is a mix of markup and code which is terribly old fashioned isn't it? Or isn't it?

Moreover, the said functions are not very flexible. You have to pass a lot of text as arguments (like link text or snippets of HTML to wrap the value into) and it seems to require the use a bunch of undocumented global variables and functions as soon as you want some control over the behaviour of your weblog.

I never really liked coding Movable Type templates but at least it's relatively easy to do. With WordPress, I feel ashamed about some of the PHP code I had to write in order to make my weblog behave as I wanted.

Plug-ins — WordPress plug-ins consist of PHP scripts that are included on execution. The problem with this method is that a problem in a plug-in (e.g. a syntax error or call to an unavailable function) breaks the whole weblog; public pages, administration section, everything. This makes every WordPress plug-in a potential time bomb. The example plug-in below breaks a WordPress weblog on Friday the 13th:

<?php

/*
    Plugin Name: Jason
    Description: Crashes a WordPress installation on Friday the 13th.
    Author: Olivier Scherler
    Author URI: https://ithink.ch/blog/
*/

if( date( 'wj' ) == '513' ) crash_on_friday_the_13th();

?>

It is an extreme example, but it shows that a plug-in can work correctly most of the time and one day have a problem that kills your site because of a typo in a function call.

Documentation — The WordPress documentation is mostly inexistent. There is a five minutes installation guide that does its job quite well and an incomplete reference of template functions. There are also two wikis (or so I think; I once saw the second one, the developer wiki, but never found it again) and a forum but I found nothing concerning my problems.

In the end, the only efficient way of coding your WordPress templates is to search the sources for the functions you need and read their code to understand how they work. Also, since the "cruft-free URIs" in WordPress are achieved using mod_rewrite, a basic guide on how WordPress uses URI parameters to determine how to build a page would be welcome.

Fighting comment spam I didn't get far into my investigation of comment spam fighting in WordPress because I realised it was not the right tool for me before I started addressing this issue. However, I am not really convinced by what I saw, be it on my test installation or on other WordPress-based weblogs. Apparently, you can force moderation of comments, but the person who posts a comment is not notified that their comment is behing held up for review and everything behaves like comment posting doesn't work. There does not seem to by anything like MT-Blacklist for WordPress either, meaning you have to moderate every comment that shows up. There is some throttling mechanism, though, but knowing that spammers constantly change their IP and the text of their messages, I don't see how useful it can be.

Conculsion

The reason so many people switched to WordPress 1.2 seems to be that they didn't want to waste all the work they put into migrating their Movable Type weblog. I have no problem giving up something when it's not important and it starts to bore me, however, so I will stay with Movable Type.

TrackBack

TrackBack URL for this entry: https://ithink.ch/blog/tb.cgi/94.

Make sure JavaScript is enabled before using this URL. If you would like to ping my blog but can't, please do send me an e-mail at os3476 at this domain.

I am pinging this entry about Wordpress and Movable Type to test if trackback works.... [Read More]

Post a comment

Make sure JavaScript is enabled before posting a comment. If you would like to post a comment but can't, please do send me an e-mail at os3476 at this domain.

Do not meddle in the affairs of Coding Ninjas, for they are subtle and quick to anger.