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 8 (Ranked 167th)
Translate the CategoryTagSorter extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

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

DescriptionEdit

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.

InstallationEdit

  • Download and place the file(s) in a directory called CategoryTagSorter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    wfLoadExtension( 'CategoryTagSorter' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'CategoryTagSorter' );, you need to use:

require_once "$IP/extensions/CategoryTagSorter/CategoryTagSorter.php";

User preference optionEdit

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;

ReferencesEdit

  1. Thanks goes to Matma Rex for this trick.

See alsoEdit