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; }
(Squiggly brackets removed for display reasons)
{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?
Did you try with a comma?
{BOX(title=>"Title frsdfsd", bg=>red)}sdfsdfsdf{BOX}
works for me in 1.9
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |