Lowdown Plugin for Movable Type

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.

X-Ray Update Displays ID and Class Attributes

It’s been a couple of week’s since I posted an update — and time to get things back in gear.

Here’s another update to the X-Ray Extension, bringing us up to version 0.7 and adding display of class and id attributes for elements. This was a frequently requested feature, and now that it’s added I think it really adds to the extension. X-Ray will show the tags, class and id names for content generated by external javascript files, which makes integrating generated content like news feeds into your site’s design a bit easier.

The update.rdf file seems to be behaving a little unpredictably, so if Firefox doesn’t tell you an update to the extension is available you can install from here:

Install Extension Install X-Ray Extension for Firefox

X-Ray is now available from the official “Firefox Add-ons”:https://addons.mozilla.org/extensions/moreinfo.php?id=1802&application=firefox site as well, for the people who only install extensions listed there. As of this post they’re still showing version 0.6, but 0.7 should be available soon.

Thanks again for all the support. :-)