Extension:SaftRedirector
SoftRedirector Release status: beta |
|
---|---|
Implementation | Special page |
Description | Enables the designation o saft redirect paiges wi a magic word |
Author(s) | MJLtauk |
Latest version | 0.13 |
MediaWiki | 1.28+ |
PHP | 5.4+ |
License | MIT License |
Download | |
Example | Special:SoftRedirectPages on MJL Testing Wiki |
|
|
Quarterly downloads | 2 (Ranked 135th) |
Translate the SoftRedirector extension if it is available at translatewiki.net | |
SaftRedirector is fork o MediaWiki extension Disambiguator that is trying tae dae faer Saft redirects what it does faer disambiguation paiges. It should allow you to designate all soft redirect pages with the __SOFTREDIR__ magic word (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.
Installation
- Download and move the extracted
SoftRedirector
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SoftRedirector - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'SoftRedirector' );
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
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 istrue
)
Features
SoftRedirector provides the following features:
- Programmatic identification of soft redirects pages via the __SOFTREDIR__ magic word
- New special pages for listing all soft redirects and pages linking to soft redirects
- New API functions equivalent to the above special pages as well as an API function for querying whether or not a page is a soft redirect
- Modifies Special:LonelyPages to ignore soft redirects
- Modifies Special:Random to ignore soft redirects (requires MediaWiki 1.26.0)
- If VisualEditor is enabled, allows marking a page as a soft redirect via the page properties interface
- If VisualEditor is enabled, shows whether a page is a soft redirect or not in the link inspector
- If VisualEditor is enabled, shows whether a page is a soft redirect or not in the link dialog
- If configured, add a 'mw-softredir' CSS class to links to soft redirect (See #Configuration below)
Uisage
On wiki
Once SoftRedirector is installed, the best way to use it is to add the __SOFTREDIR__
magic word to a template that is then included in all of your soft redirect pages.
Once the magic word is in place, your soft redirects will all have the 'soft redirect' page property assigned to them in the database. This property resides in the page_props table.
You will also have two new special pages :
- Special:SoftRedirectPages - which lists all the soft redirect pages on your wiki.
- Special:SoftRedirectPageLinks - which lists all of the pages on your wiki that link to soft redirect pages.
Wi API
To list all the soft redirects:
api.php?action=query&list=querypage&qppage=softredirectpages
Tae leet aw the saft redirect airts:
api.php?action=query&list=querypage&qppage=SoftRedirectPageLinks
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.
Relatit pages
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. |
- Beta status extensions/sco
- Special page extensions/sco
- MIT licensed extensions/sco
- Extensions in Wikimedia version control/sco
- AncientPagesQuery extensions/sco
- GetDoubleUnderscoreIDs extensions/sco
- GetLinkColours extensions/sco
- LonelyPagesQuery extensions/sco
- RandomPageQuery extensions/sco
- ShortPagesQuery extensions/sco
- WgQueryPages extensions/sco
- All extensions/sco
- Extensions included in Miraheze/sco
- Extensions included in WikiForge/sco
- Redirect extensions/sco