Thanks for your time. However, I gave up on parser functions and installed http://www.mediawiki.org/wiki/Extension:Winter instead. Not only does the {{#if|}} function work, it also has looping constructs that some other poster recently requested. Not exhaustively tested, but so far it looks good...
Frank Middleton wrote:
Rob Church wrote:
On 16/08/07, Frank Middleton f.middleton@apogeect.com wrote:
Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Is this a public wiki? If so, can we have the URL?
Well, it's semi-public - read only except for registered users, and it's only a week or so old, so we're still using the monobbok skin, for example. I need to get this #if problem fixed so we can go on to more aesthetic issues :-) and there's so much to get up to speed on!
There's a test page at http://middleton-stjohns.com/mediawiki/index.php?title=Test {{Test}} {{Test |x=xyzzy }} and the template it uses is at http://middleton-stjohns.com/mediawiki/index.php?title=Template:Test {| {{#if: {{{x|}}}|yes|no}} |} and Test renders as {{#if: |yes|no}} {{#if: xyzzy|yes|no}}
The only source code modification is to fix the bug in Language.php, line 1137, missing an "else" (there is an entry in bugzilla for this).
If you need an account to diagnose this, please let me know.
-- Frank
Rob Church