Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-05-02 00:57:19

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Automatic Acronyms

Automatic Acronym’s Project Page

This hasn’t been updated in a while. Though neither has Textile.

I just wrote this up while wondering there is no way to have common acronyms defined automatically. Stuff like XML, HTML, TXP, etc. You can still define their 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 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.

The enhanced classTextile.php can be found at:

acronym_patched_classTextile.src

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.

Automatically title acronyms:
acronym_patched_classTextile.src

To install:
1. Rename “acronym_patched_classTextile.src” to “classTextile.php” (no quotes)
2. Replace current textpattern%/textpattern/lib/classTextile.php with your renamed classTextile.php (%textpattern is where you installed textpattern)

Last edited by greenrift (2004-10-24 05:34:19)

Offline

#2 2004-06-09 17:18:21

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Automatic Acronyms

Does this need to be updated with the 1.19 release since it’s a hack?

Offline

#3 2004-06-10 02:06:49

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: Automatic Acronyms

> Remillard wrote:

> Does this need to be updated with the 1.19 release since it’s a hack?

Nope works fine for me on 1.19. The Textile library wasn’t changed at all between the versions, so as long as that doesn’t then it will work.

Offline

#4 2004-06-10 04:23:05

Hans
Member
From: Everywhere
Registered: 2004-03-07
Posts: 99
Website

Re: Automatic Acronyms

Beautiful. Excellent work, Greenrift. I will be testing this out tomorrow morning. You’ve read my mind.


Lumilux – A Photoblog

Offline

#5 2004-09-16 05:42:59

Cantide
Member
From: Wellington, New Zealand
Registered: 2004-03-03
Posts: 27
Website

Re: Automatic Acronyms

Greenrift, can you detail what was added to classTextile.php so we can add it to our classTextile.textilephp.php files? Thanks!

Offline

#6 2004-10-24 03:17:05

arakune
Member
Registered: 2004-10-23
Posts: 13

Re: Automatic Acronyms

I’m very interested in this hack, but…. http://www.engineering.uiowa.edu/~mdpotter/acronym_patched_classTextile.src 404s :( Does anyone know where one can find a copy of it nowadays?

TIA!

~A.

Offline

#7 2004-10-24 03:55:32

codyjack
New Member
Registered: 2004-09-27
Posts: 3

Re: Automatic Acronyms

Check out http://greenrift.textdrive.com/projects

Offline

#8 2004-10-24 17:40:13

arakune
Member
Registered: 2004-10-23
Posts: 13

Re: Automatic Acronyms

> codyjack wrote:

> Check out http://greenrift.textdrive.com/projects

Thanks so much! :)

Offline

#9 2004-11-05 03:51:25

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Automatic Acronyms

I am wondering if anyone could use a centrally configured list of acronyms to go with this mod. I’m thinking of adding an admin page similar to the links page under Content that would allow the addition and deletion of acronyms that would be used by this mod when it does its thing.

Offline

#10 2004-11-06 23:53:14

danielk
Member
Registered: 2004-03-04
Posts: 24

Re: Automatic Acronyms

I would be all for a central list, if your offering. ;)

Offline

#11 2004-11-07 08:58:35

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Offline

#12 2004-11-08 00:24:01

danielk
Member
Registered: 2004-03-04
Posts: 24

Re: Automatic Acronyms

For a test, it works great!

Offline

Board footer

Powered by FluxBB