Extension:MsCatSelect
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
![]() Release status: unmaintained |
|
---|---|
![]() |
|
Implementation | User interface |
Description | Allows to add a page to an existing or newly creatable category via a drop-down list |
Author(s) | Martin Schwindl, Martin Keyler |
Maintainer(s) | Sophivorus |
Latest version | 7.2 (2021-04-10) |
MediaWiki | 1.29+ |
PHP | 5.3+ |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Quarterly downloads | 22 (Ranked 140th) |
Translate the MsCatSelect extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The MsCatSelect extension adds a visual interface to the edit page that allows you to:
- Add a category to a page by selecting the category in a drop-down on the edit page.
- Remove categories from a page
- Define a custom list of categories
- Set a specific sortkey for each category
- Create a new subcategory in a selected category
Furthermore:
- If you select a category in the drop-down list another drop-down will be created with all subcategories
- The selected categories are received through the MediaWiki API
- User-friendly select boxes with Chosen
Installation[edit]
- Download and place the file(s) in a directory called
MsCatSelect
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'MsCatSelect' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration[edit]
$wgMSCS_MainCategories[edit]
Is an array filled with categories which should be loaded in the first drop-down. If this array is nonexistent all main categories (categories which are not subcategories) of the wiki are loaded automatically. Empty by default.
$wgMSCS_MainCategories = [
'Cat1', // Don't include the 'Category:' namespace
'Cat2',
'Cat3'
];
$wgMSCS_WarnNoCategories[edit]
By default, if you try to save a page that has no categories assigned, MsCatSelect will ask for confirmation. If you wish to avoid this, set:
$wgMSCS_WarnNoCategories = false;
$wgMSCS_WarnNoCategoriesException[edit]
When $wgMSCS_WarnNoCategories
is set to true, you may still want to avoid warnings in certain pages or namespaces. Add those pages and namespaces to the $wgMSCS_WarnNoCategoriesException
array to do so. For example:
$wgMSCS_WarnNoCategoriesException = [ NS_TALK, NS_FILE_TALK, 'Main Page', 'Category:Whatever' ];
By default the array is empty. You can find all the namespace constants here.
API high limits[edit]
MsCatSelect uses the MediaWiki API, which returns a maximum of 500 subcategories for regular users. If some of your categories have more than 500 subcategories, set the following to overcome this limitation:
$wgGroupPermissions['*']['apihighlimits'] = true;
Usage[edit]
Once the extension is installed and configured, edit a page and scroll to the bottom to see the visual interface for adding or removing categories. Select the categories you want from the dropdown menus and save the changes to add the page to those categories.
Known bugs[edit]
- phab:T221442 This extension can't handle pages with more than 10 categories. Pages with more than 10 categories will silently remove the exceeding number of categories when saving the page.
See also[edit]
![]() | This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Unmaintained extensions
- User interface extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- EditPage::attemptSave extensions
- EditPage::showEditForm:initial extensions
- All extensions
- Extensions included in Miraheze
- Extensions included in WikiForge
- Extensions included in WikiTide
- Category extensions