Extension talk:DynamicFunctions

I've no clue what #arg: is supposed to do. --&#160;Omniplex&#160;(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)
 * No clearer, sorry, and those pages fail to load. HTH HAND —Phil | Talk 10:15, 22 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  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)


 * Okay, it decomposes the query string (if any) into name=value pairs, and returns the last (?) value for a given name, if that name exists in the query string. CGI for templates, nice... ;-) --&#160;Omniplex&#160;(w:t) 11:30, 6 June 2006 (UTC)

#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)


 * if you want to test DynamicFunctions, here is a wiki that has them installed . Polonium 01:15, 16 January 2007 (UTC)

#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? &mdash;Stormraven (talk &middot; 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.  &mdash;Stormraven (talk &middot; contribs) 12:49, 25 February 2009 (UTC)

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)

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.

Look here for more information: Hooks not working for PHP 5.3.0 Monon 14:50, 2 October 2009 (UTC)