Extension talk:DynamicFunctions
From MediaWiki.org
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
I've no clue what #arg: is supposed to do. -- Omniplex (w:t) 17:50, 21 May 2006 (UTC)
- #arg looks for URL arguments in the page location. This allows a single page to perform multiple functions depending on the arguments given to it. For a simple example, go here and click the increment/decrement links a few times. For a more complex example: Tic Tac Toe --Algorithm 21:23, 21 May 2006 (UTC)
- Yeah, my host had a server hiccup. It's back up now. Anyway, to clarify further:
- #arg looks at the page location, and parses the URL arguments. For example, if the location were http://meta.wikimedia.org/w/index.php?title=Talk:DynamicFunctions&foo=bar, then {{#arg:foo}} would return bar. Combine this with ParserFunctions, and you have all the ingredients to create dynamic interfaces, like the Tic Tac Toe example above. --Algorithm 10:53, 22 May 2006 (UTC)
-
- Interesting!--Patrick 15:51, 22 May 2006 (UTC)
Contents |
[edit] #skin on Wikipedia
Why doesn't #skin work on Wikipedia? It would be very useful to me to have it so that I can find my .css and .js file. - Lady Aleena @ 13:56, 11 August 2006 (UTC)
- DynamicFunctions are not installed on MediaWiki, and are unlikely to be installed anytime soon. DynamicFunctions don't work with the cache, either you neeed to hit action=purge every time you view the page, or caching is disabled on pages that use these functions (which the developers said they won't do, due to the increased server load it would produce), or the cache would be disabled altogether, which is not an option on WikiMedia. Polonium 01:14, 16 January 2007 (UTC)
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
[edit] #rand: and default values
On my private wiki, I have attempted to use #rand: with just one parameter, and it's behaving oddly. For any call of #rand: with a parameter of 3 or more, the function never returns a value lower than 3. (I haven't tested the results with parameters of 1 and 2, but I'll check that out when I get home tonight.) Could this be because the default value of the second parameter of #rand: is 1, so that the PHP function mt_rand is asked to find a random number from 3 to 1, for instance? Is the behavior of mt_rand defined in the case that the second parameter is lower than the first? Or should I look for the source of my error somewhere else? —Stormraven (talk · contribs) 18:14, 23 February 2009 (UTC)
- I've confirmed, for single parameters of 1, 2 or 3, the result is always 1, 2 and 3, respectively. For parameters of 4 and higher, the result is a random number from 3 to the value of the parameter. —Stormraven (talk · contribs) 12:49, 25 February 2009 (UTC)
[edit] Install
How to install this extension? Зелёный Кошак 01:06, 5 August 2009 (UTC)
make a file DynamicFunctions.php, copy the code (probably from below Update 1.8) into it, create the Folder DynamicFunctions/ in your wiki/extensions folder, move the DynamicFunctions.php file into it and last but not least: Add the following line to your LocalSettings.php : "include_once('extensions/DynamicFunctions/includes/DynamicFunctions.php');" best regards, krueger73
Thanks. Зелёный Кошак 01:37, 11 August 2009 (UTC)
[edit] does not work with PHP 5.3
After I upgraded PHP to Version 5.3 this extension does not work for my anymore. I get this message on every page where I set the comments tag. Warning: Parameter 1 to Language::getMagic() expected to be a reference, value given in ...\includes\StubObject.php on line 58
Look here for more information: Hooks not working for PHP 5.3.0 Monon 14:50, 2 October 2009 (UTC)