Extension:NamespacePaths/zh

This page is a translated version of the page Extension:NamespacePaths and the translation is 33% complete.
Other languages:
English • ‎Türkçe • ‎français • ‎中文 • ‎日本語
MediaWiki擴充功能手冊
OOjs UI icon advanced.svg
NamespacePaths
发布状态: 未维护
描述 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
翻譯NamespacePaths擴充功能如在translatewiki.net可用
检查使用和版本矩阵。

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";
    
  1. 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".
  2. 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 sets REQUEST_URI correctly the extension will take it from there and extract the correct title on it's own.
  •   完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。