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

 * 1) Conflicts with the FCKeditor extension.  (The editor modifies the content of the Terminology page such that the extension can not parse it correctly.)