Extension:Substitutor

Description
Substitutor is a MediaWiki Extension that does one-time string substitution.

Common "magic words" in MediaWiki are replaced dynamically in MediaWiki. You would not want this dynamic behaviour with timestamps or unique strings / numbers / IDs, since they should be fixed after they were created.

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

Supported Substitutions

 * ___TIMESTAMP___ Current UNIX Timestamp
 * ___RANDOMNUMBER___ Random number between $wgSubstitutorMinRand and $wgSubstitutorMaxRand
 * ___RANDOMSTRING___ Random string of length $wgSubstitutorRandStringLength
 * ___FAKEID___ FakeID that should be unique (no guarantee however!)

Installation
Checkout the latest version via Git:

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

Add Substitutor to your LocalSettings:

require_once( "$IP/extensions/Substitutor/Substitutor.php" );

Usage
Simply put a string to substitute into your wikitext, like ___TIMESTAMP___.

It will be replaced after you saved the article, so the substitution will only happen exactly once.

Options and their defaults
$wgSubstitutorMinRand          = 1000000000;

$wgSubstitutorMaxRand          = 9909999999;

$wgSubstitutorRandStringLength = 12;