Extension:SelectCategory



The SelectCategory extension provides three functions:
 * It shows a list of all categories (unless a custom root category is configured) in their hierarchical structure on the edit page.
 * It strips all categories linked within a page upon editing and selects them in the category list list.
 * It adds selected categories from the list to the text body of the page on saving.

Stable release (recommended for most uses)
To use the stable release, download the tarball linked in the box on the right, and uncompress it. Copy the SelectCategory directory into the extensions folder of your MediaWiki installation. Then add the following lines to your LocalSettings.php file (near the end):

Download from git
To use the current git version, which might be unstable and full of bugs, run the following git command: git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SelectCategory.git

$wgSelectCategoryNamespaces
This is in your SelectCategory.php file

Defines in which namespaces the Extension should be active.

All namespaces are already predefined in the array. Set a specific namespace to true to enable or to false to disable the extension.

Active per default are: Media, Main, Project, Image, Help, Category.


 * Example:


 * Or:

$wgSelectCategoryRoot
Set a specific root category depending the namespace. Only categories within this root will be displayed when editing a page in a certain namespace.

Useful on big wiki sites to keep the database load down.

If not set (default) the extension searches for all root categories and displays them including all children.

$wgSelectCategoryEnableSubpages
Defines if the extension should be active when editing subpages.

Style
To customize the design of the select box use the CSS id "SelectCategoryBox" and attach your own settings to MediaWiki:Monobook.css or your users User:USERNAME/Monobook.css.

Bugs & Feature Requests
Please file bugs and feature requests in the bug tracker on phabricator.wikimedia.org. You might just use this direct link that has these two settings pre-defined:


 * Bug list: https://phabricator.wikimedia.org/tag/MediaWiki-extensions-SelectCategory
 * Report bug: https://phabricator.wikimedia.org/maniphest/task/create/?projects=MediaWiki-extensions-SelectCategory