Lowdown Plugin for Movable Type

// March 10th, 2006 // Web Design Software

While this blog uses Wordpress, at work I still have a few sites built using Movable Type. One of those sites is an events calendar, and I had been working on a iCAL template so that I could easily import the events into other calendars. Getting the file to work with “iCalShare”:http://www.icalshare.com/ was pretty easy, but one of the older systems at work was a bit fussy. It didn’t like any of the special characters, like accented vowels or curly quotes that invariably crept into the event descriptions.

I spent quite a while looking for a way to remove all of these characters, but all the existing plugins and filters seemed to leave some of them behind. I spent some time thinking about using Brad Choate’s “Regex plugin”:http://www.sixapart.com/pronet/plugins/plugin/regex.html, but after double-checking “Movable Type’s Global tag attribute filters”:http://www.sixapart.com/movabletype/docs/3.2/b_global_filters/ I found what I was looking for. Sort of.

bq. _dirify_ also converts certain high-ASCII characters (accented characters, etc) to low-ASCII characters, meaning that something like crudité will be converted to crudite. For example, if the value of the tag without this attribute were Foo “Baz” is< br /> Bar!, the dirified version would be foo_baz_is_bar.

Yes — that’s what I wanted, but without the underscores, and usable for much longer blocks of text.

Fortunately “Adam Kalsey”:http://kalsey.com/blog/ and “Crys Clouse”:http://www.sixapart.com/pronet/plugins/plugin/dirifyplus.html had written code to improve the dirify feature, and using that as a starting point I made the changes to create the new global filter I needed. Something that would convert the high-ASCII characters down to low-ASCII, and strip out all the extra characters and line-breaks I didn’t need.

Lowdown.pl
_Version 1.0_
Lowdown removes extra information to displays plain text in Movable Type. It converts certain high-ASCII characters (accented characters, etc) to low-ASCII characters, strips HTML tags, and changes line breaks to spaces.

Installation: save Lowdown.txt as Lowdown.pl and upload it to your Movable Type ‘plugins’ directory

Usage Example: < $MTEntryBody lowdown="1"$>

This can be helpful when generating some types of feeds (eg. iCAL, RSS). If anyone is interested, I could also post the iCAL template for Movable Type that I developed that uses the Lowdown plugin.

Update

You can now get the lowdown directly from Six Apart’s Plugin Directory.

6 Responses to “Lowdown Plugin for Movable Type”

  1. [...] Lowdown Plugin for Movable Type will subscribe to published iCals. [...]

  2. Dylan says:

    I would appreciate seeing how you have MT reading the ical feed! Thanks for this plugin.

  3. AcidZero says:

    Hi! I would like to know a example of how can I strip certain html tags using this plugin. I have a mouseover code that I would like to replace when exibiting a print version of the page.

    Thank you

  4. I wrote lowdown to create an iCal file from our MT based events calendar and use that iCal file in other applications (not MT). I think a few people, including the folks at Six Apart, were experimenting with iCal to Blog scripts back in 2002… but I haven’t been able to find any updates since then.

    AcidZero — I think the best way to do what you’re considering is with a Print Style Sheet.

  5. Matt says:

    I would love to see your MT template for your ICS file. I’m trying to piece one together myself.

  6. Branden says:

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.