TikiWiki Plugins – Issues with Using Double Quotes to Pass Parameters in 1.9.11
I found TikiWiki's use of plugins to be an excellent substitute for the lack of built-in support for parameterized templates as found in MediaWiki - http://www.mediawiki.org/wiki/Help:Templates
I referred to the following instructions to create a php-based plugin:
http://dev.tikiwiki.org/tiki-index.php?page=Hello+World#To_create_a_new_plugin
They work great but with one caveat:
The use of double-quotes which are necessary for displaying strings with commas seems to create problems. For instance with a simple "HelloThere" plugin syntax{HELLOTHERE(firstname=> lastname=>)}{HELLOTHERE}
This invokes the following simple function:
function wikiplugin_hellothere($data $params) { extract ($params EXTR_SKIP); $strHello = "Hello there $firstname $lastname" ; return $strHello; }
{HELLOTHERE(firstname=>"Thurston" lastname=>Howell)}{HELLOTHERE}
yields
Hello There Thurston Howell.
Great!
HELLOTHERE(firstname=>"Thurston" lastname=>"Howell III Esq. CPA")}{HELLOTHERE}
Hello There Thurston Thurston.
Not so great...
Namely adding double-quotes to get around the issue of commas within strings introduces a whole other problem of its own – repetition of the first variable. When there are 10 variables for instance the first quoted value will be repeated 10 times.
I am using TikiWiki 1.9.11; has anyone encountered this issue and if so is there a remedy?