MediaWiki extensions manual
Release status: unmaintained
Implementation Tag , Parser function
Description Allows to do one-time string substitutions
Author(s) Simon Heimler (Fannontalk)
Latest version 1.2.0 (February 2016)
MediaWiki 1.19+
PHP 5.2+
Database changes No
License MIT License

The Substitutor extension allows to to do one-time string substitutions.

Description Edit

Common parser functions and magic words in MediaWiki are parsed/displayed dynamically in MediaWiki. Sometimes this is not what you want. For example, you want a timestamp that is only evaluated the first time the page is saved and after that stay on that exact time. Or you want to generate a random ID that does not change with each page view.

This provides useful if you want to create unique names and URL's for "red links", or simply timestamp sites / changes.

Installation Edit

  • Download and place the file(s) in a directory called Substitutor in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    require_once "$IP/extensions/Substitutor/Substitutor.php";
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Instead of downloading the zip archive you may also check this extension out via Git:

git clone https://github.com/Fannon/Substitutor.git

Usage Edit

Use the <substitute> tag, to define

The content of the tag will be parsed and replaced after you saved the article. The substitution will only happen exactly once - that's the whole point of this extension.

This extension is especially useful in combination with Extension:IDProvider.

Examples Edit





Substitute vs. subst: Edit


results in:


which is rendered as: