Content last modified Monday 6 March 2017
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:
23 Mar 2005

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:

Commenting is closed for this article.

Commented (2)

I believe that this plugin should have two parts: one that replaces acronyms, and one that replaces “abbreviations.”

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.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern