Extension:TemplateSandbox/cs

Toto je technická dokumentace rozšíření. There is also user documentation.
Category:GPL licensed extensions/cs
Příručka k rozšířením MediaWiki
TemplateSandbox
Stav rozšíření: stabilníCategory:Stable extensions/cs
Implementace Speciální stránka Category:Special page extensions/cs, Akce stránky Category:Page action extensions/cs
Popis Preview pages using sandboxed templates
Autoři Brad Jorsch (Anomiediskuse)
Nejnovější verze 1.1.0 (continuous updates)
Zásady kompatibility Vydání snímků současně s MediaWiki. Hlavní vývojová větev není zpětně kompatibilní.
Licence GNU General Public License 2.0 nebo novější
Stáhnout Category:Extensions in Wikimedia version control/cs
Nápověda Help:Extension:TemplateSandbox/cs
  • $wgTemplateSandboxEditNamespaces
Čtvrtletní stahování 23 (Ranked 88th)
Veřejné wiki používající rozšíření 1,040 (Ranked 233rd)
Přeložte rozšíření TemplateSandbox, používá-li lokalizaci z translatewiki.net
Problémy Otevřené úkoly · Nahlásit chybu
Category:All extensions/cs

The TemplateSandbox extension adds the ability to preview a page using sandboxed versions of templates, allowing for easy testing before making the sandbox code live. It also works with Scribunto modules.

Installation

  • Stáhněte soubor/y a vložte je do adresáře pojmenovaného TemplateSandbox ve vaší složce extensions/.
    Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox
  • Na konec vašeho souboru LocalSettings.php přidejte následující kód:
    wfLoadExtension( 'TemplateSandbox' );
    
  • Configure as required.
  • Yes Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.

Configuration

Parameters
  • $wgTemplateSandboxEditNamespaces - Namespaces in which to show the "Preview page with this template" box below the edit form. NS_TEMPLATE by default. Can be expanded to all namespaces by individual users using advancedtemplatesandbox.js.

Usage

The extension adds a new special page, Special:TemplateSandbox. To preview a page using sandboxed templates, do the following:

  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. Go to 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.
  3. Click View.

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.

See also

Category:Extensions used on Wikimedia/cs#TemplateSandbox/cs
Category:APIGetAllowedParams extensions/cs Category:All extensions/cs Category:AlternateEditPreview extensions/cs Category:ApiMakeParserOptions extensions/cs Category:EditPage::importFormData extensions/cs Category:EditPage::showStandardInputs:options extensions/cs Category:Extensions in Wikimedia version control/cs Category:Extensions included in Canasta/cs Category:Extensions included in Miraheze/cs Category:Extensions included in MyWikis/cs Category:Extensions included in Telepedia/cs Category:Extensions included in WikiForge/cs Category:Extensions used on Wikimedia/cs Category:GPL licensed extensions/cs Category:Page action extensions/cs Category:Special page extensions/cs Category:Stable extensions/cs