Extension talk:VariablesExtension

Variables and Conditional Parser Functions
It must be noted that everything in conditionals gets executed (though only one result gets displayed). Because of this, every instance of #vardefine will always get executed, regardless of to what the conditional gets evaluated.

Given the following:

gives prevvalue.

Instead you have to nest the conditional inside #vardefine:

In this case, gives nextvalue.

&mdash;Sledged 16:12, 24 October 2006 (UTC)

Multiple assignments
It would be good if this extension allowed multiple assignments. Say I have a template data that contains a=1|b=2. I call and usedata gets one template-variable, a, with value 1|b=2. If I could make data say a=1,b=2 and usedata could call variablesextension to set both variables at once, that would be useful.--201.216.136.95 18:24, 10 January 2007 (UTC)

Bugzilla request
The bug requesting this to be added for the big sites (wikipedia, etc.) is 8570. If you really want these functions, go (register and) vote for that bug. If you have an concern, that bug would also be an appropriate place to express it.--201.216.136.95 18:24, 10 January 2007 (UTC)

MediaWiki version 1.9
How is the compability with MediaWiki version 1.9?

use of undefined variables
Sometimes you want to use a variable which has not been set before and you expect it to return an empty string. I suggest to change the code of function "varf" as follows: function varf( &$parser, $expr = '' ) { if (isset($this->mVariables) && array_key_exists($expr,$this->mVariables)) return $this->mVariables[$expr]; return ''; }
 * 84.58.192.102 09:11, 28 January 2008 (UTC)