mediawiki/lingo

Provides hover-over tool tips on wiki pages from terms defined on a wiki page

2.0.1 2016-03-12 19:54 UTC

README

Build Status Code Coverage Code Quality Dependency Status Latest Stable Version Packagist download count

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.

See http://www.mediawiki.org/wiki/Extension:Lingo for online documentation.

Requirements

  • PHP 5.3.3 or later
  • MediaWiki 1.26 or later

Installation & Activation

The recommended way to install this extension is by using Composer.

  1. Add the following to the MediaWiki composer.local.json file

    {
      "require": {
          "mediawiki/lingo": "~2.0"
      }
    }
  2. Run php composer.phar update mediawiki/lingo from the MediaWiki installation directory.

  3. Add the following code to your LocalSettings.php:

    wfLoadExtension('Lingo');

Updating

Run php composer.phar update mediawiki/lingo from the MediaWiki installation directory.

Customization

The following settings may be used:

  • $wgexLingoPage to specify the name of 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.

Usage

By default Lingo will mark up any page that is not in a forbidden namespace. To exclude a page from markup you can include NOGLOSSARY anywhere in the article. In some cases it may be necessary to exclude portions of a page, e.g. because Lingo interferes with some JavaScript. This can be achieved by wrapping the part in an HTML element (e.g. a span or a div) and specify class="noglossary".

Terminology page

Create the page "Terminology" (no namespace), and insert some entries using the following syntax:

;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

Reporting bugs

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

Credits

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

License

GNU General Public License 2.0 or later.