Extension:Glossary

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Glossary

Release status: stable

Implementation Extended syntax
Description Enable a Glossary within MediaWiki using tooltips.
Author(s) BarkerJr with modifications by Benjamin Kahn (xkahn <at> zoned <dot> net)
Version 2008-04-18 (3-19-08)
MediaWiki 1.6-1.11 (and maybe above)
Download svn

Contents

[edit] 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.

[edit] Usage

By default, the page "Glossary" 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.

[edit] Installation

Just checkout the code from the svn to /extensions/Glossary/

[edit] LocalSettings.php

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

require_once( "$IP/extensions/glossary.php" );

3. Create the page "Glossary"

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

[edit] Sample Glossary

;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
;HTTP:HyperText Transfer Protocol

[edit] Parameters

To lock down the glossary, modify the glossary.php file.

Find the line:

$rev = Revision::newFromTitle(Title::makeTitle(null, 'Glossary'));

and change it to:

$rev = Revision::newFromTitle(Title::makeTitle(8, 'Glossary'));

The Glossary will now be located at:

MediaWiki:Glossary

[edit] Known problems

Personal tools