Extension:CategoryMagicWords

What can this extension do?
This extension allows you to hide the pages and/or the subcategories from category pages, if you want to replace them with some custom code (e.g. using Extension:Semantic MediaWiki). The extension overrides some MediaWiki functions, and will probably interfere with other extensions working in the same way (notably Extension:CategoryTree).

Usage
The magic words __CATEGORYNOPAGES__ and __CATEGORYNOSUBCATS__ on a category page will supress the pages and subcategories respectively. For image galleries, there is already a builtin magic word for that, __NOGALLERY__.

You might want to change the message in MediaWiki:Category-empty if using this extension.

Installation
To install this extension, download it ( tar.gz | zip) and unpack it in your extensions folder, then add the following to LocalSettings.php:

You can also cut and paste the code from CategoryMagicWords.php and CategoryMagicWords.i18n.php.

Changelog

 * 0.1.1
 * Cleaned up the code
 * Removed support for MagicWordMagicWords (MW <=1.6.0)
 * i18n-file


 * 0.1 First version

Todo

 * Don't output MediaWiki:Category-empty if category is not really empty.
 * Is it possible to achieve this using the CategoryView hook? Would be good, so that this extensions does not interfere with CategoryTree or other extensions, that might now see some of their category page functionality overriden.
 * Check compatibility with other MediaWiki versions.