Automatic Acronyms
Automatically convert common acronyms like XML, HTML, TXP without having to define them via the ACRO method. You can still define your own acronym’s.
It isn’t really a plugin, but just replaces the classTextile.php file. What I added was a function (acronym($a, $t)) that now is called everytime Textile finds an acronym. The other thing I changed were the regex’s in glyphs($text), I added 2 character acronyms (like UN), the ability to actually call my acronym function, and a cutoff range of 8 characters for an acronym.
To add an acronym, go to the $acronym_list array and add the acronym you want in the form: ‘ACRONYM’ => ‘TITLE’,
Everything seems to work perfectly (atleast for me), it will disregard non-acronym’s that you haven’t defined. Speed wise it might start to take up a lot of memory as $acronym_list increases in size, but any suggestions on how to make it faster/better would be appreciated.
To install:
Rename “acronym_patched_classTextile.src” to “classTextile.php” (no quotes)
Replace current textpattern/textpattern/lib/classTextile.php with your renamed classTextile.php (textpattern is where you installed textpattern).









If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:
Commented (2)
The difference between the use of
@ and@ are that screenreaders read out the long form of the@ (i.e. NATO -> North Atlantic Treaty Organization), but merely spell out the contents of the@ (i.e. X-H-T-M-L) regardless of what the title=”” contains.The title is required for and
@, but not for an@.Bad Download link and BAD Information URL!
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site. Get a Gravatar.