Extension:Terminology

Related Extensions
An alternative version of this extension can be found at Extension:Glossary

What can this extension do?
Ever been reading a technical article with lots and lots of acronyms? Unless you know all the terminology they are using, it can be really frustrating trying to understand what the author means.

This extension allows wiki authors to define a list of acronyms and their definitions on a special page. Whenever that acronym is found, it will be highlighted and mousing over it will reveal the definition in a tooltip.

Additionally, using Walter Zorn's "JavaScript, DHTML Tooltips" library (found at: http://www.walterzorn.com/tooltip/tooltip_e.htm ) you can customize the appearance of the tooltips.

Usage
By default, the page "Terminology" without a namespace will be used as the source of acronyms and their definitions. It's also possible to modify the extension to put the definitions in a protected namespace.

Changelog

 * Patches from May 29, 2009:
 * Better support for the FCKEditor extension
 * Do not show underlines when printing wiki pages


 * Patches from Aug 28, 2008:
 * Make the regex case sensitive for acronyms (Thanks Abrillon)
 * Add support for the FCKEditor extension
 * Allow a single newline in between the acronym and its definition

Installation
1. Create the file:

LocalSettings.php
2. Add the following to the end of your LocalSettings.php:

3. (Optional) If you wish to use the Javascript-based tooltips, you need to download Walter Zorn's "JavaScript, DHTML Tooltips" library. (found at: http://www.walterzorn.com/tooltip/tooltip_e.htm ) Create the directory: extensions/tooltip.

And uncompress the archive "wz_tooltip.zip" into that directory. You should have the latest version of the library (version 5.13 at the time of this writing.) (At the end, you should have 3 files: extensions/tooltip/tip_centerwindow.js, extensions/tooltip/tip_followsscroll.js, and extensions/tooltip/wz_tooltip.js )

4. Create the page "Terminology"

5. Add one line to this page for each acronym. Each line should start with a ';' (semicolon), then the text to be replaced followed by a ':' (colon) followed by the text to replace it with.

Sample Terminology Page
Support single line definitions
 * FTP:File Transport Protocol
 * AAAAA:American Association Against Acronym Abuse
 * ACK:Acknowledge
 * AFAIK:As Far As I Know
 * AWGTHTGTATA:Are We Going To Have To Go Through All This Again

And multi-line definitions
 * HTTP
 * HyperText Transfer Protocol

Parameters
1. To lock down the terminology, modify the terminology.php file.

Find the line:

and change it to:

The Terminology Page will now be located at:

MediaWiki:Terminology

You can also change the name of the "Terminology" page by replacing the quoted name with something else.

2. You can modify the options of the javascript tooltip style by editing the line (89) with the options "STICKY, true, DURATION, -1000" to suit your needs.

3. You can change the number of times a matched word will be defined. (The default is every time.) Find the line that says:

and change the "-1" to 1 or 2.

Known problems

 * Conflicts with the FCKeditor extension.
 * To correct this issue, add the __NORICHEDITOR__ magic word to the top of the Terminology page. This will cause it to never use FCKeditor to edit the page.


 * Any empty lines in the Terminology page will cause "Notice: Uninitialized string offset" errors displayed on Wiki pages.
 * To correct this issue, change $terms[0][0] to @$terms[0][0] on line number 62 of extensions/terminology.php.