Extension:TemplateSandbox/zh
- 这是这个的技术。 这也是一个用户文档。
![]() Category:Stable extensions/zh |
|
---|---|
![]() |
|
Category:Special page extensions/zh, Category:Page action extensions/zh | |
描述 | 使用沙盒模板预览页面 |
作者 | Brad Jorsch (Anomie留言) |
最新版本 | 1.1.0 (continuous updates) |
快照跟随MediaWiki发布。 | |
GNU通用公眾授權條款2.0或更新版本 | |
下載 | Category:Extensions in Wikimedia version control/zh |
Help:Extension:TemplateSandbox/zh | |
|
|
|
|
前往translatewiki.net翻譯TemplateSandbox | |
問題 | 开启的任务 · |
TemplateSandbox 扩展增加了使用沙盒版本模板预览页面的能力,允许在沙盒代码上线之前轻松测试。 它也适用于 Scribunto 模块。
- 下载,并将解压后的
TemplateSandbox
移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox
- 将下列放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'TemplateSandbox' );
完成 – 在您的wiki上至Special:Version,以验证已成功安装。
$wgTemplateSandboxEditNamespaces
- 要在编辑表单下方显示“使用此模板预览页面”框的命名空间。NS_TEMPLATE
。 单个用户可以使用advancedtemplatesandbox.js拓展到所有命名空间。
用法
此扩展会添加一个新的特殊页面:Special:TemplateSandbox 要使用沙盒模板预览页面,请执行以下操作:
- Copy the templates to be tested under a common prefix. For example, you might copy
Template:Foo
toUser:Example/sandbox/Template:Foo
. Alternatively, you might createUser:Example/sandbox/Template:Foo
as a redirect toTemplate: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
- : − 此扩展还允许对Scribunto模块沙盒化。
![]() | 此用于一个或多个维基媒体项目。 这可能意味着足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php中查找此的名称以查看哪些网站安装了该。 特定wiki上的已安装的的完整列表位于Special:Version页面。 |
![]() | 此在以下wiki农场/托管网站和/或软件包中提供:
|
Category:APIGetAllowedParams extensions/zh
Category:All extensions/zh
Category:AlternateEditPreview extensions/zh
Category:ApiMakeParserOptions extensions/zh
Category:EditPage::importFormData extensions/zh
Category:EditPage::showStandardInputs:options extensions/zh
Category:Extensions in Wikimedia version control/zh
Category:Extensions included in Canasta/zh
Category:Extensions included in Miraheze/zh
Category:Extensions included in MyWikis/zh
Category:Extensions included in Telepedia/zh
Category:Extensions included in WikiForge/zh
Category:Extensions included in wiki.gg/zh
Category:Extensions used on Wikimedia/zh
Category:GPL licensed extensions/zh
Category:Page action extensions/zh
Category:Special page extensions/zh
Category:Stable extensions/zh