Webdev: September 2004 Archives

When I read about the Jukebox that Lijn created, I got this feeling inside...
I copied the two files to my server, made some changes to the configuration, and there it is: the Brain Tags Jukebox!!!
It needs a little bit of decoration, but the functionality is there. All songs will stay available for 96 hours, after which they will automagically disappear.

At this moment you can find You Learn About It from The Gathering, and of course the wildly popular new song from the Pixies Ain't That Pretty At All.

Happy downloading!

[Update 2004.09.24] I added some echo statements to the PHP code, and the results looks a lot better. It is also valid XHTML now.

[Update 2006.11.9] More than two years later, the jukebox became obsolete and has been removed from this site.

On my individual entry pages, I show two dates: the date on which I created the entry, and the date on which I modified the entry. Today, after making some changes to an entry, I noticed that the modification date was not updated.

I found some information about this problem in earlier versions of Movable Type on the Tweezer's Edge, but they state that this error has been fixed in the 3.x versions. I guessed that the same solution should work on my version (MT3.11 at the moment), I only needed to find out the right line in the scripts to fix. I tried some options, and found that the following fixes the problem:

Edit /lib/MT.pm, and add the text shown on line 598:

596 $ctx->stash('entry', $entry);
597 $ctx->{current_timestamp} = $entry->created_on;
598 $ctx->{modification_timestamp} = $entry->modified_on;
599 $cond{EntryIfAllowComments} = $entry->allow_comments;

If you want to leave a comment on this site, you have the option to identify yourself using your TypeKey account. TypeKey is a centralized authentication service from Six Apart, the makers of Movable Type. It was developed as a measure against comment spam, and made available in version 3.0 of MT. After TypeKey was released I changed my templates to include this system. I do not force commenters to use TypeKey, since my spam problem is not that big.

This was in May. Now after some months more, I have some observations:

  • Besides me, only onetwo commenters used TypeKey to comment on this site;
  • No other MT--powered site I comment on has TypeKey activated;
  • A Google search on the default TypeKey comment link --- TypeKey Profile Page --- returns only 21000 hits. So only 21000 pages on the whole web have TypeKey authenticated comments --- remember that some sites have many pages, with many posts.

To me it looks like TypeKey is not used a lot.

Why can that be?

I think the main reason is that most of the sites using Movable Type never update their templates. They might update to a newer version of MT, but leave their templates alone. And they are right in doing so; I remember that it was quite a puzzle to add the TypeKey code to my template.

So TypeKey is a failure?

After only four months, it is very early to make this kind of conclusions. Every new site that starts using MT will probably have TypeKey activated, so I expect more and more sites to use is. And when the base grows, other sites might benefit more from this service as well.

Pixies

Recently my server logs show a big increase in requests for a single image --- the one shown above. Somebody must be hotlinking this image! Hotlinking is when somebody uses an image on their page, but does not put a copy of the image on their server. Each time somebody views that page, the image is requested from my server. In general, hotlinking images is not polite, since you use bandwidth of somebody else. This specific image is not mine, I found it on somebody else's page and copied it to my server to use it.

There are several methods to stop hotlinking. You can block all requests that do not come from your own site, so all visitors of that site will see is a red x. Or you can server another image instead, with a text explaining why hotlinking is bad, or with the Goatse man... I decided not to do so. First of all, since I have enough bandwidth to serve these sites, and secondly because I thought it would be better to use the image to make some advertising for my site. So I added this site's address to the image, so it will be shown on all sites using this image from my site.

That's it! The upgrade went flawless. Everything seems to work fine until now. Of course I haven't tried out any of the new features yet. There are two features I would like to have a look at.

The ability to create subcategories look really sexy, however I have doubts whether my writings need a more complex category structure. I will have to review all items to decide on that.

The feature everybody waited a long time for is dynamic publishing. It simply means that the pages are created on the fly, which makes posting entries and comments more faster since you don't have to wait for all pages to generate. However, the downside is that each normal view will be slightly slower, since the pages are not cached on the server. I will have to play a little bit with this to see what works best.

Today, six apart launched version 3.1 of Movable Type, the software I use as the motor of this site. Since I am an early adaptor, I immediately downloaded the latest version, and will install it as soon as possible. I already heard about some problems in the update scripts, so we'll see how it goes...