Content last modified Monday 3 September 2018
hop to #bottom
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

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).

Article Request Count:
Initially released:
Posted here:
24 Mar 2005

You know you want to visit the Archives.
Published with Textpattern