Categorization is hard. There's a reason library science is a recognized degree program. Blosxom gives you all the flexibility of a hierarchical filesystem to use to categorize items, but with a drawback — if you change a category hierarchy, then old category-based links (whether they're internal links, peoples' bookmarks, links from other weblogs, or search engines) don't work.
Until now.
If a category-based link is used that doesn't correspond to an existing file, the AutoCorrect plugin will look for where it's moved to. If it's reasonably sure it's found the right thing, it simply displays it, almost as if the URL were still right (with the standard templates, a note is added that the item has moved). If it finds some good possibilities but can't make up its mind, it offers a list. If it can't even find good possibilities, it at least offers a semi-explanation and an apology.
Installation is almost as simple as a Blosxom plugin's can be:
- download and unzip the plugin.
- Copy the plugin to your plugins directory
- Test it. Browse your blog, follow permalinks, make sure they work as expected. Edit an URL to remove a directory from it, rendering it invalid; see if you get the right story any way. Maybe create stories with duplicate filenames, and repeat the test with that name.
- Look at your error log. Verify you have lines like the following. If it's missing, the plugin isn't getting enabled for some reason &mdash it may not be in the right directory, may not be readable, may have an illegal character in its filename, or may be something else we haven't discovered yet. If you do have that line, but it doesn't seem to be working, set $debug_level to 2 and try again, and send me the results.
autocorrect debug 1: start() called, enabled
- Once you're satisfied it's working, edit the plugin's only configuration variable — change
$debug_levelfrom 1 to 0. Important: if you don't do this, it will continue to fill up your error log with debug information. - Verify once more it's working satisfactorily. If not, your text editor may not be getting along well with perl -- did it change permissions on the file? Did it change line endings?
- Drop me a note letting me you're using it and how things are working for you.
- Enjoy!
Limitations, bugs, and to do:
- Requires at least Blosxom 2.0 beta 3
- Not useful with static-only setups
- Only recognizes exact filenames. I should investigate what mod_speling does; is there a standard 'fixing typo' algorithm?
You can try it out in my test bed, if that happens to be working at the moment.