Extension:VarsInSession

What can this extension do?
This is a simple extension that allows the creation/usage of persistent variables in the Session object through two parser functions. These variables persist across multiple HTTP requests until the session cookie is removed or expires from the browser. By default this is when the user closes their browser.

Usage
The #svarset parser function sets a variable to the given value. The parameter is required. The is optional, and will be the null value if not provided.

The #svarget parser function gets the value of a variable. The parameter is required. The is optional, and is the returned value if does not exist.

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

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

Parser caching must also be disabled to ensure each invocation of #svarset and #svarget are working with values from the Session object of the current user. Add this line to your LocalSettings.php file:

$wgEnableParserCache = false;