Working With MediaWiki
activity, every day. That’s when another page becomes crucial: the Watchlist page, at Special:Watchlist.
Every user has their own watchlist, which others can’t see. You can add pages to your watchlist in various ways:
There’s a “watch” tab at the top every page, which lets you add that page to the watchlist (or, if it’s already on your watchlist, remove it). On Wikipedia, this is instead just a clickable star icon — that’s a nice interface enhancement available by adding the following to LocalSettings.php:
$wgVectorUseIconWatch = true;
It only works when using the Vector skin, however.
When you edit a page, you can check the “Watch this page” checkbox, which adds that page to your watchlist. This checkbox is checked by default if you’re creating a new page.
You can directly edit the set of watched pages at Special:EditWatchlist/raw. You can also use the interface at Special:EditWatchlist, although that one only allows for removing pages, not adding them. Both pages are linked to from the top of Special:Watchlist.
Logs
Most of the non-editing administrative changes, like the blocking of users, are logged, so that the history of those changes is preserved. (In most cases, these actions also show up in the Recent Changes page.) Each type of action is contained within its own log. You can see all of the logs at the page Special:Log, which is publicly-viewable.
Actions that are logged include creation of user accounts, blocking of users, page moves, page deletions, page protections, page imports, and file uploads. Some extensions also define their own additional logs, including Approved Revs, FlaggedRevs and LiquidThreads.
Statistics
The Statistics page, at Special:Statistics, holds some nice top-level information about the wiki: the number of pages, the number of edits, the number of users in the various user groups, and so on. Figure 10.1 shows the top of the Statistics page for mediawiki.org.
Figure 10.1 Special:Statistics page on mediawiki.org
Note the distinction between “Content pages” and regular “Pages”. The text that explains the two here is specific to mediawiki.org, though it’s fairly similar to the default text. This is often a cause of confusion, because the number given for “Content pages” tends to undercount the true number of content pages. This number only includes pages within the “content namespaces” (by default, this is only the main namespace, though that’s settable via $wgContentNamespaces). And it only counts pages that contain at least one wiki-link. Pages that don’t are considered “stubs”, and not counted. It’s not a perfect system, and it can end up undercounting severely, depending on the type of content you have.
11 Extensions
A crucial part of the MediaWiki system is the plugins, or extensions, that have been developed to be added to the MediaWiki core application. Over 1,500 publicly-released extensions exist in some form currently; though many of these are obsolete or redundant, and many never fully worked in the first place, so the number of extensions that could conceivably be used at the moment is probably closer to several hundred. Extensions in MediaWiki cover a very wide range of functionality. Some of it is rather essential functionality, which could easily belong directly within MediaWiki but was never added for one reason or another. An example is the Cite extension, which defines tags that can be used to show footnoted references; it’s heavily used on Wikipedia, and there’s no strong reason why it’s not part of core MediaWiki.
Almost all MediaWiki installations include at least a few extensions; Wikipedia uses dozens of them.
The core MediaWiki code is structured in a way that makes it easy to install extensions, and develop them: the key element is the widespread use of hooks. Hooks are lines in the code that outside functions can register themselves to be called at. When a hook runs, every function that has registered itself with that hook is called, and each one can then perform its own actions. A simple example of the use of hooks would be an extension that displays ads on each wiki page. The extension would most likely register with one or more hooks in the code that are called when the the display of the page is generated, in order to add its own snippets of HTML to the page. The big advantage of hooks is that they let extensions run without the administrator having to modify the core MediaWiki code —
Weitere Kostenlose Bücher