Extension:SoftRedirector

SoftRedirector is fork of MediaWiki extension Disambiguator that is trying to do for Soft redirects what it does for disambiguation pages.

It should allow you to designate all soft redirect pages with the  __SOFTREDIR__  (or an equivalent alias), which then marks them as such in the database.

It is currently unclear if this will allow other extensions to handle soft redirect pages as a separate class of page.

Configuration
The following configuration variables can be set from your LocalSettings.php file.
 * $wgSoftRedirectorIndicateLinks - whether to add a 'mw-softredir' CSS class to links to soft redirect pages (default is true)

Features
Disambiguator provides the following features:


 * Programmatic identification of disambiguation pages via the  __DISAMBIG__ 


 * New special pages for listing all disambiguation pages and pages linking to disambiguation pages


 * New API functions equivalent to the above special pages as well as an API function for querying whether or not a page is a disambiguation page


 * Modifies Special:LonelyPages to ignore disambiguation pages


 * Modifies Special:Random to ignore disambiguation pages (requires MediaWiki 1.26.0)


 * If  is enabled, allows marking a page as a disambiguation page via the page properties interface


 * If  is enabled, shows whether a page is a disambiguation page or not in the link inspector


 * If  is enabled, shows whether a page is a disambiguation page or not in the link dialog


 * If configured, add a 'mw-disambig' CSS class to links to disambiguation pages (See 2>#Configuration</>|#Configuration below)

On wiki
Once Disambiguator is installed, the best way to use it is to add the <tvar|1> </> magic word to a template that is then included in all of your disambiguation pages.

Once the magic word is in place, your disambiguation pages will all have the 'disambiguation' page property assigned to them in the database.

This property resides in the <tvar|1></> table.

You will also have two new <tvar|1></>:
 * Special:DisambiguationPages - which lists all the disambiguation pages on your wiki.
 * Special:DisambiguationPageLinks - which lists all of the pages on your wiki that link to disambiguation pages. ( This is a replacement for the old Special:Disambiguations page which is deprecated. )

With API
To list all the disambiguation pages:

api.php?action=query&list=querypage&qppage=DisambiguationPages

To list all the disambiguation page links:

api.php?action=query&list=querypage&qppage=DisambiguationPageLinks

Note that on wikis running in MiserMode (all WMF wikis), both the special page and API interface for SoftRedirectPageLinks are limited to a certain number of results (typically 1000–5000).

To see if an individual page is a soft redirect page:

api.php?action=query&titles=Bug&prop=pageprops&ppprop=softredirect

If it is a soft redirect page it will include 'softredirect' in its pageprops.

Note that the softredirect pageprop, if present, will have its value set to an empty string, so be careful about testing it as a boolean.