Extension talk:ParserFunctions/LQT Archive 1

See: meta:Help_talk:ParserFunctions for much more conversations about this extension.

Strings
Suggestion: It would be useful if also strings could be compared.--Eloy 23:16, 27 March 2008 (UTC)

Am I missing some major fact here?
I feel dumb! I installed the extension (I'm on MW 1.12.0), it shows up on Special:Version but when I add or some other easy example on some article it only displays in plain text. Maybe I need to install something else? --Subfader 12:37, 9 April 2008 (UTC)
 * No idea if this is it / what I should do, but it was introduced in 1.12 Manual:$wgParserConf --Subfader 13:19, 9 April 2008 (UTC)
 * Ok got it working by moving require... above all other require... --Subfader 16:49, 10 April 2008 (UTC)

Similar problem as the one of Subfader
I have a similar problem, but with a small exentension I wrote. Before upgrading to 1.12 it worked OK, now just displays in the article. Moving the includes/reuqire statement didn't work. The exetension was developed based on an example for the parser extensions, but I can't find the link anymore. ParserFunctions as well as the file are includesd/required in the LocalSettings.php

setFunctionHook( 'arreminderdisplay', 'wfArReminderFunction_Render' ); } function wfArReminderFunction_Magic( &$magicWords, $langCode ) {    # Add the magic word # The first array element is case sensitive, in this case it is not case sensitive # All remaining elements are synonyms for our parser function $magicWords['arreminderdisplay'] = array( 0, 'arreminderdisplay' ); # unless we return true, other parser functions extensions won't get loaded. return true; } function wfArReminderFunction_Render( &$parser ) {    # The parser function itself # The input parameters are wikitext with templates expanded # The output should be wikitext too //Erinnerung erst nach dem 25. jeden Monats anzeigen //if((int)date("j") < 25) //{ 	// return ""; //}    return "  "; } ?> --151.71.24.254 09:15, 22 April 2008 (UTC)
 * 1) Define a setup function
 * 1) Add a hook to initialise the magic word

Problems with #switch
I just installed v.1.1.1 on MW 1.12.0, but any time I try to create a page with a "#switch" in it, my server won't serve the page correctly. Instead of showing a page, it gives me the option to download "index.php" which is a 0 byte file. Other parserfunctions ("ifexist" for example) work fine. Does this happen to anyone else? -SColombo 12:06, 5 June 2008 (UTC)

Older versions
Is there any way to get old versions of this extension? I'm specifically interested in a version which would work with MediaWiki 1.5.6 under PHP4 (not PHP5, which is required for modern versions).

Parse error
On 1.12, I've run into what may be an interesting problem: ''Parse error: syntax error, unexpected '{' in extensions/ParserFunctions/ParserFunctions.php on line 74. (http://rafb.net/p/NEDkaT63.html)'' This occurs on multiple wikis/different websites I operate, all under the same host. I'm told by several proficient mwikians/devs that the code is correct (they can't figure it out either); yet no matter what I do, fresh installs, etc., the error persists. I'm trying to fathom if it's a server or filepath issue and what the nature of it is, if that's the case, so I can explain it to them. (They're wiki-illiterate.) --Sasoriza 19:12, 21 July 2008 (UTC)

Error with a Function
I have discovered an error with #ifexist function from this extension. If there is an internal link in the either of the outputs for the function, then that link will show up in all of the relevant Special Pages regardless of whether the target pages exists or not.--Mjr162006 22:59, 21 July 2008 (UTC)
 * It's not an error, it's just how the Parser works. Everything inside both the then and else statements get evaluated, regardless of which one is true. The true one is then displayed. Depending on the contents of the output statements, some things may trigger unexpectedly. -- Skiz zerz  02:08, 22 July 2008 (UTC)