Extension:TemplateSandbox/pl

From mediawiki.org
This page is a translated version of the page Extension:TemplateSandbox and the translation is 4% complete.
This is technical documentation of the extension. There is also a user documentation.
Podręcznik rozszerzeń MediaWiki
TemplateSandbox
Status wydania: stabilne
Realizacja Strona specjalna , Akcja strony
Opis Preview pages using sandboxed templates
Autor(zy) Brad Jorsch (Anomiedyskusja)
Ostatnia wersja 1.1.0 (continuous updates)
Polityka zgodności Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki 1.35+
PHP 7.0+
Licencja GNU General Public License 2.0 or later
Pobieranie
  • $wgTemplateSandboxEditNamespaces
Quarterly downloads 54 (Ranked 94th)
Public wikis using 1,040 (Ranked 233rd)
Przetłumacz rozszerzenie TemplateSandbox jeżeli jest dostępne na translatewiki.net
Problemy Otwarte zadania · Zgłoś błąd

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

  • Pobierz i umieść plik(i) w katalogu o nazwie TemplateSandbox w folderze extensions/.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateSandbox
  • Dodaj poniższy kod na dole twojego pliku LocalSettings.php :
    wfLoadExtension( 'TemplateSandbox' );
    
  • Yes Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.


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.

Zobacz też