Movable Type plugins

Movable Type is a great tool for creating personal sites (and some other types of sites as well), mainly due to its flexible template system and its many features like trackback, image upload & write functionality, sanitising,…

Regular readers (are there any?) of this site know that I did not need a lot of time to set up this site. However, I still keep on tweaking parts of the site to make it even better. It started with converting the templates from XHTML 1.0 to XHTML 1.1. After that I moved a little bit around with the different items shown on the pages, and adjusted the style sheet.

And soon I ran into the limits of Movable Type. Some things are simple not possible, are they? Fortunately, I am never the only one facing the limitations, and usually one of the guru’s out there solved the problem for me, always with a plugin.

Plugins are the feature making MT such a great tool. If MT cannot do it, there is always a plugin that can do it for you!!!

The following list describes the plugins I am using at the moment, and why I am using them:

BlogCopyright I could have created the functionality of this plugin by using a template module, but this is simply easier. BlogCopyright automatically creates the copyright message at the bottom of each page. It uses the year of the first and the last post and the author of the first message on the page. This means that I don’t have to change anything when we enter the year 2004.

ifEmpty This is more a programmers tool. It allows me to hide certain elements when they are empty. I use it in the definition of the file location of my Static Contents section. There, the category gives me the directory in which the file is placed. If there is no category, the file has to be placed in the root of the site.

macros Another tool to automate things. I use this plugin to create automatically the right code for some common abbreviations and acronyms. For example, MT becomes <abbr title=“Movable Type”>MT</abbr>. By the way, the macros are automatically created from a short list using the MTPerlScript plugin (idea shamelessly stolen from Mark Pilgrim).

otherblog Normally the sections are completely separated; you cannot access data like the name or the contents from an entry from outside a section. I am using a special section to manage my static contents, but would like to use some elements like the banner from my main section in the templates of the static contents. This plugin allows me to do this.

perlscript Again a very low-level plugin. This plugin allows me to execute Perl scripts from my templates. I use it to create my yearly archive pages, since MT only offers monthly archives. I am writing since 1997, so the list of monthly archives is way too long, therefore I created the yearly archive pages.

simplecomments There are two ways to react to my writings: you can leave a comment, or you can write about it on your own site and notify me using TrackBack. By default, MT keeps them separated, providing a list of comments and a list of trackbacks. In my point of view, comments and trackbacks are basically the same, but in different places. Therefore, I prefer to have a single comments list, with both the comments residing on my site as the comments written on other sites. SimpleComments does this for me.

smartypants Smartypants fixes the typographic punctuation of my entries. It converts straight quotes ( " and ’ ) into “curly” quote HTML entities, dashes (“–” and “–”) into en- and em-dash entities and three consecutive dots (“…”) into an ellipsis entity. Just to make it more perfect…

Something personal

I just noticed that I have only written technical texts during the lasts weeks, and since this is a personal page, hereby a short update on my life:

Things are going regular. I am very busy at work, and go home to relax. Despite of the heat in the city, we manage to keep our house cool by blocking any ray of sun during the day (our 30 cm thick walls also help a lot…). In our free time, we mainly relax: in the sofa, on a terrace, in the cinema or in the swimming pool.

Not really special, and that certainly is the reason you haven’t read much about it.

Use a better browser

A month ago, I wrote about the shortcomings of Internet Explorer and how this might stop innovation on the Internet in the coming years.

All over the web, people have expressed their worries, and a lot of web designers are afraid to have to deal with an obsolete browser for many many years. And of course, an action has been started to convince users to switch to another browser: Use a Better Browser. They ask site owners to place a button on their site, linked to a page explaining why other browsers are better than IE.

Use a better browser

Although I agree with them that IE is quickly becoming a dinosaur, I don’t think that a button will let many users change their browser. However, they will change because of (lack of) features. If other browsers have features IE does not have, users might switch.

Therefore, the best way to convince IE-users to show them the tabbed browser interface and pop-up blocking of Mozilla and create sites using code that is not supported by IE.

Of course, degrade gracefully. Something as the position:fixed CSS property can serve for this purpose, for example for creating a floating navigation bar which will always be visible on the top of the screen. IE users will simply have to scroll up to navigate (as always), while visitors with newer browsers will have the benefits of having the navigation always at hand.

Other features that can be used to create better sites, are described in Eric Meyer’s css/edge. These won’t work on IE, but won’t make the page unusable.

So go ahead, design your pages using the latest coding possibilities, but degrade gracefully!!

HTTP Error 301: Permanent Redirect

A while ago, I explained how I configured the server to return HTTP Error 410: Gone for all requests for pages created with my old CMS.

After installing Movable Type, all pages of my site moved to another location, and I was not able to work out the new location of the files. In short, error 410 says: The requested file used to exist on this location, but it has gone to an unknown location. This message is more clear than the message returned by default; the famous 404.

I always check the server logs for 404 messages, since it might indicate that a link on the site is wrong and I’ll have to fix that. One of the files coming up regulary in that log is the default MT stylesheet styles-site.css, which I have replaced by my own stylesheet with a different name.

I immediately wanted to add this file to my ‘410–list’, but then I realised that 410 is not the correct code, since I do know where the file went.

Therefore a better solution would be to return code 301 (permanent redirect) together with the new location, so any smart client would simply redirect to the new address.

To implement this, I only needed to add a single line to the .htaccess file:

Redirect permanent /styles-site.css http://www.braintags.com/paz.css

This line tells the server to redirect requests for /styles-site.css with code ‘permanent’ to the file http://www.braintags.com/paz.css. Remember that the destination always has to be a complete URL!!

More on Managing Static content

After yesterdays post I started playing more with Movable Type.

I decided to move some static content from my site to a separate section, as described by Brad Choate. At that moment, the only static content I had were the HTML error pages, displayed in case somebody asks a non-existing page. These pages were implemented as index templates, but with the new method I can treat them as normal texts without having to edit HTML code. I also decided to move the Stylesheet templates to the new section, since they are hardly ever updated.

After entering the texts for the error documents, I ran into a problem. I wanted to use almost the same templates as I am using for the rest of the site, but these templates make use of template modules (text snippets), which are linked to a specific section. So I started looking for a solution to display information from one section into another. And I found exactly what I was looking for: MTOtherBlog.

After this success I created some more static content (a Spambot trap), and fixed my search page with the MTOtherBlog plugin.

I am very happy with my MT static content solution. However, after this experience I realise that MT is not suited for the Fimcap site, since it has too much static content in a more complex directory structure. This would mean that we have to create a seperate category for every subcategory, which would make it difficult to manage.

Managing static content with Movable Type

The buzz started with the redesign of Adaptive Path by [stop]design and Jay Allen. They used the Movable Type blogger software to produce a commercial site. And not only as a CMS to publish their ‘Appearances’, ‘Essays’ and ‘News’, but also to manage the static content of the site! Jay Allen posted a description of how he set up the Adaptive Path configuration.

Other people already had the same idea or started working after reading the above story. Doug Bowman of [stop]design started managing his portfolio with MT, Matt Haughey explains how to use MT in alternative ways, like creating an About page and using the database fields in different ways. He also lists some sites using MT this way.

And finally, master MT-hacker Brad Choate explains how to use the MT-categories to place static content in directories. Managing static content with MT is definitely THE hype of this week!!!

I have been reading all this with a lot of interest. Already for a while Sebastiaan and I are thinking about a CMS for our Fimcap site, since this site is at this moment completely maintained by hand at HTML level.

We do use some Server Side Includes (SSI) to handle general content like the page headers and footers, and NewsPro for some content, but mostly we have to change the HTML code. This makes it also really difficult for others to contribute to the site, since they first have to understand HTML and the organisation of our site.

We have been looking around a while ago, and the best fit I could find at that moment was Plone, but since Plone is so completely different from what we are doing now, this would involve a really steep learning curve.

But now it looks like we can do it in MT. We can manage our static content, create templates, and store our dynamical content. The only thing I have to figure out is how we can implement the site in three languages. I guess I will just set up a demo and start playing…

Mozilla Thunderbird

Yesterday I have installed Mozilla Thunderbird on my computer.

Until now I was using Microsoft Outlook Express to handle my mail, but I was far from satisfied with it. I never have been a great fan of OE, but since my computer is very old (1997) with limited resources (Cyrix P150+, 48Mb RAM), I am very careful not installing too much heavy software on it. Therefore I stick with the default Windows applications as much as possible, unless they are completely unworkable.

A while ago I already switched from IE6 (which was almost as old as my computer) to Mozilla Firebird for obvious reasons, and I never looked back to Internet Explorer anymore.

Outlook Express was also close to unworkable for me. Its limited filtering, habit of creating bloated e-mail and top posting were bugging me all the time.

Time for a change, and my Mozilla experience lead me to Thunderbird. The only problem is that the Thunderbird project is still in a alpha stage, and therefore surely still contains some bugs. I decided to install it anyway, and until now I haven’t found a single bug!

It feels a little bit slower than OE, but it certainly makes life a lot easier. I was able to import my Outlook Express address book and mail without problems, and was able to set up a (Bayesian) Spam filter in no time.

I still have to do some additional configuring like specifying the signatures and adding my certificates, but my experience so-far is more than positive!!!

Fighting Spam

spam

I am receiving a lot of Spam, way too much…

The last years the amount of Spam I receive has been steadily growing, and now I receive about 50 messages per day. But I am not going to sit down and accept it; no, I am fighting Spam. I am fighting Spam because Spam takes away the pleasure and the functionality of a system I like and use a lot. Spam is about to destroy e-mail. I fight Spam in several ways, here is how…

I am very careful with my e-mail address

The most important thing is to make sure that spammers don’t get your e-mail address.

I always try to avoid to fill in an e-mail address in guest books, forums and when requesting online information. If I do have to give my e-mail address, I always make sure I can track down the source.

I can do that, since I have my own domain. If I have to leave my address at example.com, I will use example.com@jeroensangers.com. The moment I start receiving Spam on this address, I can easily block it.

If you don’t have your own domain, this is not possible, but make always sure that you only put your address on-line if you really have to. And never munge your address by adding something like NOSPAM!!!!!

I never let spammers white list my e-mail address

Spammers look for addresses on the Internet, but a lot of them are not used anymore. Therefore they try to verify that somebody is reading the mail; a verified address is worth more to the spammer.

There are two common ways to whitelist an e-mail address. The most common is the ‘Remove me from this list’ message at the bottom of much Spam.

But instead of removing you from their Spam list, the spammer will put you on the verified addresses list, and you will surely receive more Spam. Therefore I never use these links to remove me from a Spam list.

The second method of white listing uses images. The spammer links to an image with a code in the filename, and when you open the message this image is loaded from the spammer’s server. After that the spammer can check the code in the image name and your e-mail address is verified!

I usually use Mozilla mail, which let you select whether you want to view messages in HTML (including images) or as plain text. Although a lot of people send messages in HTML by default, few messages have content that NEED this, so I usually read my messages in plain text. (I also send my messages in plain text, but that is a different story). People using Outlook will have to disable their preview pane to prevent images from being loaded automatically.

I separate Spam from my normal mail

No matter how hard you try to prevent Spam, at a certain moment you will receive some, and it will never stop. In 99% of the cases you can easily recognise Spam from the sender and the subject, which are unknown, strange, in a foreign language and coded (texts like: jbkdk,bjhskda).

I always make sure to directly put Spam messages in a separate folder, so I can continue reading my regular mail, and deal with the Spam later. If you don’t receive many messages, you can do this by hand, but lazy people like me like this to be automated.

The latest technology is based on Bayesian Filtering, and luckily Mozilla has this technique integrated.

I report Spam to the provider of the Spammer

Depending on my time (usually not a lot), I send a complaint to the provider of the Spammer. I open up my Spam folder, analyse all messages and send a message to the provider of the originating mail server and sites mentioned in the text.

It is very difficult to find out who is the responsible, but fortunately this can be partly automated as well. I use the SpamCop notification service, to report Spam. SpamCop analyses the email, works out the likely true sender of the email, looks in the body to find any advertised email addresses or web sites, and then emails the administrators of all the systems involved to let them know about the problem.

SpamCop tells me whom the notification will be sent to, so I can remove any incorrectly targeted reports from the list.

I don't buy

This last one is quite obvious, but essential. Spammers send you messages to sell something. Sending millions of e-mail is cheaper than sending leaflets by snail mail, but still costs money. If I don’t buy anything, they will have the costs but no profit. If we all just stop buying, Spam will stop automatically!!!!

Back to work

The holidays are definitely over; I have spent my first day at the office again. Of course my colleagues wanted to know everything about my trip and of course I recommended them to visit Croatia as well.

Black polo shirts with the company logo arrived during my absence, and everybody except me was wearing those shirts in the office. Wearing the polo is more or less obliged, unless you have a reason to dress more formally. I don’t mind wearing this uniform, since it is a nice shirt and saves me from making some wrong choices in that very difficult first hour of the day.

As expected, the work I left on my desk before leaving was still there, so today I continued working on the English version of the corporate site. I still need to translate some documents and have to create some screenshots of the software, but I hope to finish it this week.

The site is already live but gives 404 errors for the pages that I still have to translate. In my opinion a bad decision, but since my move to the international department I have no influence on the design and technical side of the site anymore. The only way to get rid of these 404’s is to work hard this week!!!

Back home again

Short, but absolutely worthwhile…

That is how I would describe our short holiday to Croatia. We absolutely have the feeling that we should have stayed longer, since the country is sooooo beautiful.

We have seen a lot of nice things, but we missed visiting Split, Dubrovnik, Zagreb and Plitvice national park.

We did visit Rovinj, Pula, Zadar and the Paklenica national park. I could write a lot more about it, but I don’t have the time for it.

Anyway, now that I am back, you can read about my life again.