Extension:NamespacePaths
現在、この拡張機能は積極的な保守が行われていません! それでも機能する可能性はありますが、バグ報告や機能の要望は無視される可能性が高くなります。 この拡張機能の開発や保守の作業を引き受けることに興味がある場合は、リポジトリの所有権を申請できます。 礼儀として、作者に問い合わせることをお勧めします。 保守を引き継いだ場合、このテンプレートは除去すべきです。また、拡張機能ページの {{extension}} 基礎情報ボックス内のリストにあなたの名前を保守担当者として追加してください。 |
![]() リリースの状態: 保守されていない |
|
---|---|
説明 | Allows custom article paths to be mapped to namespaces of the wiki |
作者 | Daniel Friesen @ Redwerks (Dantmanトーク) |
最新バージョン | 1.1.0 (2017-10-30) |
MediaWiki | 1.23+ |
PHP | 5.4+ |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
$wgNamespacePaths |
|
translatewiki.net で翻訳を利用できる場合は、NamespacePaths 拡張機能の翻訳にご協力ください | |
The NamespacePaths extension extends custom article paths to allow namespaces to be mapped to extra paths separate from the article path. For example mapping the help namespace to /help/$1
so pages like "Help:Contents" go to /help/Contents
.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のNamespacePaths
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:require_once "$IP/extensions/NamespacePaths/NamespacePaths.php";
- Configure the
$wgNamespacePaths
with the paths you want to use for namespaces, the key is the namespace id (you can use the NS_ constants), and the value is a$wgArticlePath
style string like "/help/$1". - Configure your webserver to pass the extra paths to MediaWiki. Consult the short URL documentation you set the article paths for your wiki and extend it to map the extra paths to "index.php".
- Note: You don't want to try mapping things to
⁄index.php?title=$1
, doing so will break the paths. If you just make sure that⁄index.php
is run for these extra article paths as long as your webserver setsREQUEST_URI
correctly the extension will take it from there and extract the correct title on it's own.
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。