Extension:NamespacePaths/zh
Appearance
From mediawiki.org
This page is a translated version of the page Extension:NamespacePaths and the translation is 33% complete.
发行状态: 稳定版 |
|
|---|---|
| 描述 | Allows custom article paths to be mapped to namespaces of the wiki |
| 作者 | Daniel Friesen @ Redwerks (Dantman 留言 ) |
| 最新版本 | 1.2.0 (2022年10月07日) |
| MediaWiki | 1.35+ |
| 数据库更改 | 否 |
|
$wgNamespacePaths |
|
| 许可证 | GNU General Public License 2.0 or later |
| 下載 | |
| 前往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.
安裝
- 下载文件,并解压
NamespacePaths文件夹到extensions/目录中。
开发者和代码贡献人员应改从Git安装此扩展,输入:cdextensions/ gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/NamespacePaths - 請新增下列代码到您的LocalSettings.php 文件的底部:
wfLoadExtension( 'NamespacePaths' );
- Configure the
$wgNamespacePathswith 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$wgArticlePathstyle 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.phpis run for these extra article paths as long as your webserver setsREQUEST_URIcorrectly the extension will take it from there and extract the correct title on it's own.
- Yes 完成 – 請导航至您的wiki上的
Special:Version,以验证此扩展已成功安装。
致MediaWiki 1.39或更早版本的用户們:
上面的指示描述的是使用wfLoadExtension()安装此扩展的新方法。
如果您需要在早期版本(MediaWiki 1.39和更早版本)中安装此扩展、而不是wfLoadExtension( 'NamespacePaths' );,您需要使用:
require_once "$IP/extensions/NamespacePaths/NamespacePaths.php";