Help:Pre-save transform/pl
Uwaga: Jeżeli edytujesz tę stronę, to umieszczając na niej treści wyrażasz nieodwołalną zgodę na udostępnianie Twojego materiału na podstawie wolnej licencji CC0. Aby uzyskać więcej informacji, przeczytaj Strony Pomocy w Domenie Publicznej. |
When you finish editing a page on MediaWiki and click on the Opublikuj zmiany
button, the wikitext you enter may be automatically modified before it is saved.
This process is called a pre-save transform (PST), and it is visible when you click on the Podgląd zmian
button.
The visual rendering of the PST is shown when you click on the Pokaż podgląd
button.
The modified wikitext won't appear in the edit box immediately. To see the changes in the wikitext, you need to save and then press "Edit" again.
Examples
The instances in which wikitext is automatically transformed include:
- Podstawianie
- Tildes:
~~~
creates a signature without including the time or date.~~~~~
provides the time and date information, such as08:56, 2 July 2024 (UTC)
~~~~
creates a complete signature, combining~~~
and~~~~~
- Pipe trick
When you add this code to a template, please make sure it doesn't convert wikitext too soon, like when saving the template. One way to do this is by enclosing the split code within the template's parameters. For example:
{{{{{|safesubst:}}}CURRENTTIME}}
{{{|~~}}}~~
<nowiki>~~</nowiki>~~
[[abc (def)|{{{|}}}]]
The last example isn't very helpful, it's just there to show how it's similar to the other three examples.
Another way is using the <includeonly />
tags.
You can also use a template parameter to decide when to apply the conversion during template substitution.
For example, {{{{{subst1|}}}CURRENTTIME}}
converts if the subst1
parameter equals subst:
or safesubst:
, otherwise, it doesn't if the parameter is empty or undefined.
Limits
Automatic conversions of wikitext won't happen in <ref>...</ref>
and <gallery>...</gallery>
tags.[1]
References