Working With MediaWiki
something that makes installing and upgrading the code much easier.
Some extensions define their own special pages; some define their own parser functions, tags, behavior switches, etc.; and some add their own tables to the database. The more involved extensions may do all of these things: use hooks, add tables to the database, define special pages to (in some cases) display and modify their data, and define various commands, like parser functions and the rest.
Finding extensions
This book covers a fairly large number of extensions, but it doesn’t cover all of them — and the “ecosystem” of extensions keeps changing, with new extensions being created, others becoming unnecessary due to changes in MediaWiki, and others becoming unusable as they stop being maintained. So it’s important to know how to find extensions, and how to determine which ones are useful.
The site mediawiki.org is the main resource for finding out about extensions. Every extension is meant to have a page there, so you can do text searches to find specific functionality you’re looking for. You can also use the“Extension Matrix”, which is actually a collection of pages, which hold different views of the full collection of extensions:
https://www.mediawiki.org/wiki/Extension_Matrix
If you do find an extension, it’s useful to know whether it will work on your system. There are a few clues you can use for that. Every extension page should have an infobox, listing important information about that extension. One of the fields is “Status”, which can be either “Experimental”, “Unstable”, “Beta”, “Stable” or “Unknown”, with “Stable” of course being the preferred one. This status is usually just set by the extension’s authors, though, so it may be out-of-date, and it may not have been reliable in the first place.
Extension pages usually also list what versions of MediaWiki the extension is compatible with. This information can again be out of date (especially if it reads something like “MediaWiki 1.11 and higher”), but it can also be useful information.
A useful way to check the viability of an extension is to look at its talk page. If the extension hasn’t worked with versions of MediaWiki from the last two years, there will probably be at least a few messages to that effect. You can also get a sense from the talk page of how committed the authors or maintainers are to maintaining the code and supporting users.
Conversely, if there are no or few talk-page messages, that’s quite possibly a sign that people don’t find the extension useful (or comprehensible).
Finally, whether or not an extension’s code is contained on the MediaWiki Git repository is generally an indicator of how well-maintained it is.
Gadgets
“Gadgets” is one of the extensions that come pre-bundled in MediaWiki. It lets an administrator define pieces of JavaScript that users can then make use of, usually for help with editing or other wiki tasks. You can see the full list of gadgets installed on any wiki by going to that wiki’s Special:Gadgets page, which lists all the gadgets and a brief description of each.
To install a gadget on a wiki, if it already exists on another wiki, go to that wiki’s Special:Gadgets page, click on the gadget’s “Export” link, and follow the instructions.
Any user can then use any installed gadget by going to the “Gadgets” tab within their Preferences page, checking the gadgets they want installed, and hitting “Save”.
There are many gadgets defined; two notable ones, both available on Wikipedia, are:
Navigation popups — lets users see the top contents of a page, and a menu of action items for that page, when they hover over a link to it.
HotCat — provides autocompletion when adding or editing categories for a page.
You can read about the Gadgets extension here:
https://www.mediawiki.org/wiki/Extension:Gadgets
There is a plan in place to make the installation of gadgets more automatic, via a central repository of gadgets — this may happen sometime in 2013. You can read more about this effort here:
https://www.mediawiki.org/wiki/RL2#Gadget_Manager
CategoryTree
CategoryTree extension is another popular extension. It adds the ability to drill down into large category trees from within a single category page — it’s used on Wikipedia for that purpose. Earlier there was an image of the default listing of subcategories in a category page; but Figure 11.1 shows that
Weitere Kostenlose Bücher