Extension:模板沙盒
本頁使用了標題或全文手工轉換
Appearance
From mediawiki.org
This page is a translated version of the page Extension:TemplateSandbox and the translation is 79% complete.
Languages:
这是这个扩展的技术文档。 这也是一个用户文档。
发行状态: 稳定版 |
|
|---|---|
| 实现 | 特殊页面 , 页面操作 |
| 描述 | 使用沙盒模板预览页面 |
| 作者 | Brad Jorsch (Anomie 留言 ) |
| 最新版本 | 1.1.0 (continuous updates) |
| 兼容性政策 | 快照跟随MediaWiki发布。 master分支不向后兼容。 |
|
|
| 许可证 | GNU General Public License 2.0 or later |
| 下載 | |
| 帮助 | Help:Extension:TemplateSandbox/zh |
| 前往translatewiki.net翻譯TemplateSandbox扩展 | |
| 問題 | 开启的任务 · 报告错误 |
TemplateSandbox扩展增加了使用沙盒版本模板预览页面的能力,允许在沙盒代码上线之前轻松测试。 它也适用于Scribunto模块。
安装
- 下载文件,并解压
TemplateSandbox文件夹到extensions/目录中。
开发者和代码贡献人员应改从Git安装此扩展,输入:cdextensions/ gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox - 請新增下列代码到您的LocalSettings.php 文件的底部:
wfLoadExtension( 'TemplateSandbox' );
- 按需求配置。
- Yes 完成 – 請导航至您的wiki上的
Special:Version,以验证此扩展已成功安装。
配置
- 参数
$wgTemplateSandboxEditNamespaces– 要在编辑表单下方显示"使用此模板预览页面"框的命名空间。 默认为NS_TEMPLATE。 单个用户可以使用advancedtemplatesandbox.js拓展到所有命名空间。
用法
此扩展会添加一个新的特殊页面:Special:TemplateSandbox 要使用沙盒模板预览页面,请执行以下操作:
- 将待测试的模板复制到一个共同的前缀下。例如,你可以将
Template:Foo复制为User:Example/sandbox/Template:Foo。 或者,你可以将User:Example/sandbox/Template:Foo设置为指向Template:Foo/sandbox的重定向。 - 前往Special:TemplateSandbox。 Fill in the page or revision to be rendered, and the prefix you chose in step 1. It is possible to specify multiple prefixes (a prefix search path) by separating them using vertical bars, e.g.,
User:Example/sandbox1|User:Example/sandbox2. - 点击查看。
The extension also adds a box at the bottom of the edit form for pages in the namespaces configured in $wgTemplateSandboxEditNamespaces.
This allows for previewing some other page as it would appear were the template being edited saved with the current contents of the edit form.
The box can be forced to appear in the edit form for any page by adding the query parameter wpTemplateSandboxShow to the URL.
参阅
- User:Jackmcbarn/advancedtemplatesandbox.js – A user script that enables use of TemplateSandbox for all pages.
- Help:展開模板
- Extension:SandboxLink
- Extension:Scribunto − 此扩展还允许对Scribunto模块沙盒化。
此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。
此扩展在以下wiki农场/托管网站和/或软件包中提供:
Categories:
- Pages using deprecated NoteTA template
- Stable extensions/zh
- Special page extensions/zh
- Page action extensions/zh
- APIGetAllowedParams extensions/zh
- AlternateEditPreview extensions/zh
- ApiMakeParserOptions extensions/zh
- EditPage::importFormData extensions/zh
- EditPage::showStandardInputs:options extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- All extensions/zh
- Extensions used on Wikimedia/zh
- Extensions included in Canasta/zh
- Extensions included in Miraheze/zh
- Extensions included in MyWikis/zh
- Extensions included in Weird Gloop/zh
- Extensions included in wiki.gg/zh