Extension:Lingo

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Lingo

Release status: stable

Lingo.png
Implementation Extended syntax, Skin
Description Provides hover-over tool tips on pages from words defined on a wiki page
Author(s) Barry Coughlan
Stephan Gambke
Last version 0.3 (2011-12-03)
MediaWiki 1.16+
Database changes no
License GPL 2.0 or higher
Download Last released version
Development version (Git) [Help]

CHANGELOG
Parameters

$wgexLingoPage
$wgexLingoDisplayOnce
$wgexLingoUseNamespaces

Hooks used
OutputPageBeforeHTML

ParserAfterTidy

Check usage (experimental)

Lingo is a glossary extension to MediaWiki, that lets you define abbreviations and their definitions on a wiki page. It displays these definitions whenever an abbreviation is hovered over in an article.

The extension is still in early stages, so please report bugs. It was tested on 1.16 w/ PHP 5.3

Contents

[edit] Usage

By default Lingo will mark up any page with the terms and definitions defined on the Terminology page of your wiki (or the respective page in the language of your wiki). Just create that page and insert some entries using the following syntax:

;FTP:File Transfer 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

You are also allowed to have Terms and Definitions on separate lines. Additionally you can assign one definition to multiple terms, e.g. to cover grammatical variants (See the U.S.A. example below).

;FTP
:File Transfer Protocol

;AAAAA
:American Association Against Acronym Abuse

;ACK
:Acknowledge

;U.S.A.
;USA
:United Stated of America

You can use any characters in a term (including punctuation, spaces, all UTF-8 characters, but excluding the colon (:) of course), you are not limited to only letters.

You can exclude an article from markup by including the magic word __NOGLOSSARY__ anywhere in that article's text.

In some cases it may be necessary to exclude only portions of a page, e.g. because Lingo interferes with some JavaScript. This can be achieved by wrapping that part in an HTML element (e.g. a span or a div) and specifying class="noglossary".

The extension is pretty well internationalized by now, thanks to the efforts of the volunteers on http://www.translatewiki.net. (If your language is not supported yet, get an account there and help yourself. It's easy!) To find out the name of the Terminology page and of the __NOGLOSSARY__ magic word in your wiki's language, have a look at the Lingo.i18n.php and Lingo.i18n.magic.php files.

[edit] Installation

  1. Get a released version or the current development version
    Alternatively you can download Lingo using git
  2. Create a directory Lingo in your $IP/extensions directory
  3. Extract the files to this $IP/extensions/Lingo directory
  4. Add to the end of LocalSettings.php:
    require_once("$IP/extensions/Lingo/Lingo.php");
  5. Do some customization if necessary (see below).
  6. Installation can now be verified through Special:Version on your wiki
  7. Create the page Terminology (no namespace) and insert some entries.

[edit] Customization

The following settings may be used:

  • $wgexLingoPage to specify a different name for the terminology page; Example: $wgexLingoPage = 'Glossary';
  • $wgexLingoDisplayOnce to specify that each term should be annotated only once per page; Example: $wgexLingoDisplayOnce = true;
  • $wgexLingoUseNamespaces to specify what namespaces should or should not be used; Example: $wgexLingoUseNamespaces[NS_TALK] = false;

If you want to use these settings, just include them in LocalSettings.php after the require_once("$IP/extensions/Lingo/Lingo.php");

Lingo also provides an interface to plug in alternative dictionaries (backends). If you are interested in that, see Semantic Glossary for an example. You can also drop me a mail.

[edit] Showcases

QMRAwiki: http://wiki.camra.msu.edu

[edit] Version history

[edit] Credits

Lingo is a rewrite of extension Terminology, written by BarkerJr with modifications by Benjamin Kahn. Lingo was originally written by Barry Coughlan and is currently maintained by Stephan Gambke.

[edit] Reporting bugs

Comments, questions and suggestions should be sent or posted to:

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox