• &reg_id is not ®_id

    Another reason to hope Microsoft gets it right in IE 7, seeing as they are reluctant to fix IE 6: I was making changes to a website for a client and mostly tested the site in Mozilla Firebird 0.6 - I forgot to test the site in IE, but that was a fault on my part on thinking it would be alright. It wasn't. The JS popup loads an invalid page because of the query string, which had become file.php?event_id=3®_id=12345.

    Apparently, IE was being _too_ smart in converting the ® into ® even though the ending semi-colon ';' was missing. Changing to &reg_id didn't help either. It is a subtle bug though, since it only happens when loading via window.open(this.href). I had to fix it by making reg_id the first query string parameter.

  • Meaningful URLs in MovableType

    Thanks to this entry at Contact Sheet, this blog now features friendly, meaningul URLs. Previously, individual entry archives (permalinks) were named like so: 00034.html. With simple changes to the archiving configuration, individual archives are now named like so: https://chuyeow.wtf/archives/2003/07/26/button_maker.html, monthly archives like so: https://chuyeow.wtf/archives/2003/07/index.html, and category archives like so: https://chuyeow.wtf/archives/Blogging/index.html.

    ... this blog now features friendly, meaningul URLs.

    There isn't a trick to it. In fact it's in the MovableType documentation itself. If you have a MT blog yourself, go to 'Weblog Config', then 'Archiving', and click on the question mark next to 'Archive File Template'. It's all there, even with examples.

    How to do it:
    - go to 'Weblog Config'
    - go to 'Archiving'
    - for 'Individual', under 'Archive File Template', enter: <$MTArchiveDate format="%Y/%m/%d/"$><$MTEntryTitle dirify="1"$>.html
    - for 'Daily', enter: <$MTArchiveDate format="%Y/%m/%d/index.html"$>
    - for 'Monthly', enter: <$MTArchiveDate format="%Y/%m/index.html"$>
    - for 'Category', enter: <$MTArchiveCategory$>/index.html
    - rebuild!

    Of course, you are free to tweak the names of the archive files. Some of you may want to keep your archives by category instead of by date, so something like <$MTEntryCategory dirify="1"$>/<$MTEntryTitle dirify="1"$>.html would give 'category_name/entry_title.html' for individual entries.

    Rest assured that your old permalinks that have been spidered by Googlebots and linked to by other sites will be safe - MT does not delete the old files, but leaves them intact. It is prudent though to make this change as soon as possible , if you ever intend to do so.

  • Button maker

    I recently came across this great button maker at minimal verbosity written in PHP by Bill Zeller. The source is here - images are generated using the GD 2 library.

    Adam Kalsey has also written a user interface to that script here, so you don't have to play around with the query string (which I did). I came up with this in a few seconds playing around with the query string: redemption in a blog button

    Cool stuff.

  • Back from the dead

    There've been some recent problems with hosting, primarily because of my sites (I'm on a shared hosting plan with 8 other domains being hosted). I do have no idea why this is so though, but it seems my robots.txt and favicon.ico files caused the server to go into very high loads (more than 90%). Funny thing is there weren't any in the paths provided in the logs, but I went ahead and deleted all that I could find. Guess I'll never know the exact cause of that, unless my webhosting service provider has a clue.

    Anyhow, my recent installation of Drupal on CodeFront.net caused my MovableType blogs, including this one, to be uneditable - no new entries or comments. It was only until recently that I discovered the problem was due to the .htaccess file in the Drupal installation, which prevented .cgi files from being executed.

    So I'm back, not from the dead, but nevertheless with a vengeance, of sorts.

  • MovableType for your site (not blog)

    Beyond the Blog walks through the modification of MovableType for use in managing entire sites. Boxes and Arrows is a prime example of an entire website powered by MT.

    This is very interesting to me, because I've been searching high and low for a free, lightweight, usable Content Management System (CMS) for CodeFront.net but all my experimentation and evaluation has turned up naught. Perhaps it would be good for me to do a little under-the-hood tweaking of MT myself.

subscribe via RSS