Extension:Disambiguator
Disambiguator リリースの状態: 安定 |
|
---|---|
実装 | 特別ページ |
説明 | 曖昧さ回避ページの指定をマジックワードで決める拡張機能 |
作者 | Ryan Kaldari (Kaldariトーク) |
最新バージョン | 継続的な更新 |
互換性ポリシー | Snapshots releases along with MediaWiki. Master is not backwards compatible. |
MediaWiki | 1.28+ |
PHP | 5.4+ |
ライセンス | MIT ライセンス |
ダウンロード | |
|
|
translatewiki.net で翻訳を利用できる場合は、Disambiguator 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
Disambiguator 拡張機能はプログラム上で動作しやすい曖昧さ回避ページを簡単に作成するよう設計してあります。 すべての曖昧さ回避ページの指定は__DISAMBIG__ マジックワード (もしくは同等の別名) で実行でき、データベース上の指定を変更します。 これにより、通常ページとみなされているものが、曖昧さ回避ページという別の種類のページとして扱うことが可能になります。
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のDisambiguator
という名前のディレクトリ内に配置します。 - 以下のコードを LocalSettings.php の末尾に追加します:
wfLoadExtension( 'Disambiguator' );
- 必要に応じて設定します。
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
利用者のLocalSettings.phpファイルから以下の設定変数を書き込みます。
- $wgDisambiguatorIndicateLinks - 'mw-disambig' CSS クラスを追加し、曖昧さ回避ページへのリンクを作るかどうか (既定は true)
特徴
この拡張機能は以下の機能を提供します:
- プログラム上で__DISAMBIG__ マジックワード を使い、曖昧さ回避ページを検出
- 特別ページを新設して曖昧さ回避ページと、それにリンクするページをすべてまとめる
- 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)
使用法
ウィキ上で
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.
さらに2つの特別ページ を生成します。それはこちらです:
- 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.)
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 DisambiguationPageLinks are limited to a certain number of results (typically 1000–5000).
To see if an individual page is a disambiguation page:
api.php?action=query&titles=Bug&prop=pageprops&ppprop=disambiguation
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.
今後の開発案
- Add an option to hide disambiguation pages from:
Special:AllPages (task #9936), Special:PrefixIndex (task #11319), Special:WhatLinksHere (task #9935), Special:AncientPages (task #76287)
- Consider extending link dialog in wikitext editor with ability to detect disambigs in search results and pull a list of links
![]() | この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |
- Stable extensions/ja
- Special page extensions/ja
- MIT licensed extensions/ja
- Extensions in Wikimedia version control/ja
- AncientPagesQuery extensions/ja
- GetDoubleUnderscoreIDs extensions/ja
- GetLinkColours extensions/ja
- LonelyPagesQuery extensions/ja
- RandomPageQuery extensions/ja
- ShortPagesQuery extensions/ja
- WgQueryPages extensions/ja
- All extensions/ja
- Extensions used on Wikimedia/ja
- Disambiguation extensions/ja