Extension:CategoryTagSorter

MediaWiki extensions manual
CategoryTagSorter
Release status: stable
Implementation User interface, MyWiki
Description Alphabetizes category links at the bottom of an article
Author(s)
Latest version 0.4.0 (2018-02-05)
MediaWiki 1.29+
PHP 5.3+
Database changes No
License Apache License 2.0
Download
Quarterly downloads 11 (Ranked 133rd)
Translate the CategoryTagSorter extension if it is available at translatewiki.net

The CategoryTagSorter extension alphabetizes category links at the bottom of an article.

Description edit

A MediaWiki page typically displays the list of category links in the order in which they appear in the article. For articles with many categories, it can be difficult for readers to find the category they're looking for. This extension fixes this by alphabetizing category links.

Sorting is ascii-betical, which usually works out OK as most wikis are configured to have the first letter of a title be uppercase (see $wgCapitalLinks .)

This extension includes a user preference for individuals who prefer MediaWiki's default behavior.

Installation edit

  • Download and move the extracted CategoryTagSorter folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTagSorter
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'CategoryTagSorter' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

User preference option edit

This extension provides a user-preference option added in the Appearance section which allows users to turn off the alphabetizing of the categories. By default this extension is enabled. To set the default behavior to disabled (a opt-in type of extension), set the categorysortdisabled preference to 1 in the default user preferences.[1] Like so:

$wgDefaultUserOptions['categorysortdisable'] = 1;

References edit

  1. Thanks goes to Matma Rex for this trick.

See also edit