« US Federal Communications Commission, and the DMCA Part II | Main | A fool and his money... »

Modifications to the Acronym plugin...

October 27, 2003

I've made a set of modifications to the Acronym plugin for Movable Type. These do three things:

1) Allows the Acronym plugin to work for users who are using mod_perl;

The path to load the acronym.db file assumes pathing information which isn't accurate in a mod_perl config; as a result, it's impossible to actually *get* to
the db file using the path currently in the source.

That path needs to be changed to:
MT::ConfigMgr->instance->PluginPath.'/acronym.db'

2) Supports multiple database files;

Specifically, an acronym.db, an abbr.db, and a dfn.db now exist which support filling in acronym tags, abbr tags, and dfn (definition) tags. I use these on my site to pull together a 'glossary' of referenced terms automatically, using the MTCollect plugin.

3) A fix, of sorts, for a problem whereby once a match is found in a given string, it continues to match other terms. Some of my acronyms collide with definitions in the acronyms file, or in other files; in order to ensure that those references don't get recursively expanded, and create broken HTML, I break off after the first match is found in a given token. No doubt that there are problems with this; a better fix would be a more complex regex that ignored any text inside quotes in tags, but this seems to do enough of the job to at least improve the probelm.

4) An offshoot plugin provides an 'autolink' plugin. This plugin is used, much like the acronym plugin, to find specific words and create around them link tags which link to the site listed in the autolink.db file. I use this in the glossary section specifically, in order to link terms and definitions mentioned in the glossary to further information on other websites.

Download my Acronym modifications (Tar/GZip)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Article

This page contains an article posted on October 27, 2003 10:03 PM.

The previous post in this blog was US Federal Communications Commission, and the DMCA Part II.

The next post in this blog is A fool and his money....

Many more can be found on the home page or by looking through the full article list.

www.flickr.com
gblock's items Go to gblock's photostream
Creative Commons License
This weblog is licensed under a Creative Commons License.

PS3 ID: CTOForADay
Wii: 1974 6313 6054 0208