Release status: stable
|Description||Enables the designation of disambiguation pages with a magic word|
|Author(s)||Ryan Kaldari (KaldariDiskussion)|
|Latest version||Continuous updates|
|Compatibility policy||Snapshots releases along with MediaWiki. Master is not backward compatible.|
|Quarterly downloads||259 (Ranked 39th)|
|Public wikis using||2,561 (Ranked 43rd)|
|Translate the Disambiguator extension if it is available at translatewiki.net|
|Issues||Open tasks · Report a bug|
The Disambiguator extension is designed to make disambiguation pages easier to work with programmatically.
It allows you to designate all disambiguation pages with the
__DISAMBIG__ magic word (or an equivalent alias), which then marks them as such in the database.
This allows other extensions to optionally handle disambiguation pages as a separate class of page, although they are still considered "normal" pages.
- Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens
- Folgenden Code am Ende Ihrer
wfLoadExtension( 'Disambiguator' );
- Configure as required.
- Done – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.
The following configuration variables can be set from your LocalSettings.php file.
- $wgDisambiguatorIndicateLinks - whether to add a 'mw-disambig' CSS class to links to disambiguation pages (default is true)
- $wgDisambiguatorNotifications - whether to warn the user when they type a link to a disambiguation page in wikitext editors (default is false)
Disambiguator provides the following features:
- Programmatic identification of disambiguation pages via the __DISAMBIG__ magic word
- 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 VisualEditor is enabled, allows marking a page as a disambiguation page via the page properties interface
- If VisualEditor is enabled, shows whether a page is a disambiguation page or not in the link inspector
- If VisualEditor is enabled, shows whether a page is a disambiguation page or not in the link dialog
- If configured, adds a 'mw-disambig' CSS class to links to disambiguation pages (See #Configuration above)
- Warns a Erweiterung:WikiEditor user when linking to a disambiguation page, and allows them to fix the link.
Once Disambiguator is installed, the best way to use it is to add the
__DISAMBIG__ 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 page_props table.
You will also have two new special pages:
- 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.)
To list all the disambiguation pages:
To list all the disambiguation page links:
Note that on wikis running in MiserMode (all WMF wikis), both the special page and API interface for DisambiguationPageLinks are limited to a certain number of results (typically 1000–5000).
To see if an individual page is a disambiguation page:
If it is a disambiguation page it will include 'disambiguation' in its pageprops. Note that the disambiguation pageprop, if present, will have its value set to an empty string, so be careful about testing it as a boolean.
To see if an individual page is a disambiguation page, check the
page_props table for the presence of a
pp_propname = 'disambiguation'. Pages that are not disambiguation pages will not have this
pp_value isn't important.
SELECT page_title, pp_propname FROM page LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'disambiguation' WHERE page_namespace = 0 AND page_title IN ('John', 'COVID-19') -- John is a disambiguation page on enwiki, COVID-19 is not
Possible future plans
- Add an option to hide disambiguation pages from:
- Consider extending link dialog in wikitext editor with ability to detect disambigs in search results and pull a list of links
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|
|This extension is included in the following packages and/or wiki farms:|