Extension:SimpleTerms

A partial rewrite of Extension Lingo.

Local tests with 2000 Terms and definition lengths of ~200 chars caused no noticeable slowdowns, even when running the replacements on each page view.

Do note that this is very experimental, simple replacements work more difficult ones (with html) or definitions containing other terms can cause problems.

Usage
The usage is mostly borrowed from Extension:Lingo. But supports only one definition.

The Terminology page
By default SimpleTerms will mark up any page with the terms and definitions defined on the Terminology page of your wiki.

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.

To give some structure to the Terminology page you are allowed to have Terms and Definitions on separate lines. Any lines not starting with a ; or a : are ignored, so go ahead and insert empty lines, headlines, explanatory text.

Using this format you may 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 States of America

Pull in more terminology from elsewhere:

Example settings
wfLoadExtension('SimpleTerms'); $wgSimpleTermsPage = 'Glossary'; $wgSimpleTermsNamespaces = [ NS_MAIN ]; $wgSimpleTermsDisabledElements = [ 'table', 'h1', 'h2', ]; $wgSimpleTermsAllowHtml = false; $wgSimpleTermsEnableApprovedRevs = false; $wgSimpleTermsDisplayOnce = false; $wgSimpleTermsRunOnPageView = false; $wgSimpleTermsWriteIntoParserOutput = true; $wgSimpleTermsBackend = 'BasicBackend';