Extension:MyVariables

The MyVariables extension allows the addition of new built in variables. It currently adds three variables,,  and  , which serve as examples to follow when adding others for your own use.

This code is based on the method described in Manual:Magic words. To add a new magic word, add its name into the array on the first line, and add a case for it in the last function (wfGetCustomVariable) to calculate and return its value when it's requested.

Installation
To install this extension, add the following to LocalSettings.php: