Extension:TemplateSandbox/zh

这是这个的技术。 这也是一个用户文档
Category:GPL licensed extensions/zh
TemplateSandbox
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
  • $wgTemplateSandboxEditNamespaces
前往translatewiki.net翻譯TemplateSandbox
問題 开启的任务 ·
Category:All extensions/zh

TemplateSandbox 扩展增加了使用沙盒版本模板预览页面的能力,允许在沙盒代码上线之前轻松测试。 它也适用于 Scribunto 模块。

  • 下载,并将解压后的TemplateSandbox移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox
    
  • 将下列放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'TemplateSandbox' );
    
  • Yes 完成 – 在您的wiki上Special:Version,以验证已成功安装

  • $wgTemplateSandboxEditNamespaces - 要在编辑表单下方显示“使用此模板预览页面”框的命名空间。 NS_TEMPLATE。 单个用户可以使用advancedtemplatesandbox.js拓展到所有命名空间。

用法

此扩展会添加一个新的特殊页面:Special:TemplateSandbox 要使用沙盒模板预览页面,请执行以下操作:

  1. Copy the templates to be tested under a common prefix. For example, you might copy Template:Foo to User:Example/sandbox/Template:Foo. Alternatively, you might create User:Example/sandbox/Template:Foo as a redirect to Template:Foo/sandbox.
  2. 前往Special:TemplateSandboxFill 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.
  3. 点击查看

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.

Category:Extensions used on Wikimedia/zh#TemplateSandbox/zh
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