Custom Quickcode Tags for MoveableType

One of the new plugins we installed on the new weblog server is the [url=http://mt-stuff.fanworks.net/plugin/quick_code_version_10.phtml]Quickcode plugin[/url] for [url=http://www.moveabletype.org]Moveabletype[/url]. This is a simple plugin that uses bracketed tags to make it easy to mark up posts.


Instead of typing:[code]mesh@macromedia.com[/code]I can type:

[qcescape][email]mesh@macromedia.com[/email][/qcescape]

The syntax is easy to use, which is the main reason I installed it.Once I began using it, I realized it would be useful to create a number of other tags, so I opened up the plugin file (written in Perl) and hacked around until I got some new tags working. I wanted to post them here in case anyone else found them useful.Here are the new tags:

[qcescape][mxna]TERM[/mxna] - Links the term for a search at the Macromedia XML News Aggregator (MXNA)[google]TERM[/google] - Links the term for a search at Google[wikipedia]TERM[/wikipedia] - Links the term for a search / link at wikipedia[url2]TERM[/url2] - Links the included URL, with the URL as the link.[/qcescape]

Here are some examples:This searches for [mxna]mesh[/mxna] at MXNA.This searches for [google]Mike Chambers[/google] at Google.This search for [wikipedia]Macromedia Flash[/wikipedia] at wikipedia.org.This creates a link to my new weblog at [url2]http://weblogs.macromedia.com/mesh/[/url2]To install these, [url=http://mt-stuff.fanworks.net/plugin/quick_code_version_10.phtml]download and install[/url] the quickcode.pl file. Open the file in a text editor, and search for the following lines inside of the maincode sub:[code]$s =~ s!\[email\](.*?)\[/email\]!$1!gis;[/code]Insert the following lines after the line above:[code]$s =~ s!\[mxna\](.*?)\[/mxna\]!$1!gis;$s =~ s!\[google\](.*?)\[/google\]!$1!gis;$s =~ s!\[wikipedia\](.*?)\[/wikipedia\]!$1!gis;$s =~ s!\[url2\](.*?)\[/url2\]!$1!gis;[/code]Save the file. Now when you make a post using Quickcode formatting, you can use the new tags.If you can think of any useful tags to create, post them in the comments.