Loading...
 
Skip to main content

Features / Usability


Wiki pages not parsing dynamic content {$user} correctly?

I'm finding this so incredibly frustrating!

I am building a site in tikiwiki (version 2) with dynamic content that varies according to the user that is logged in. I am therefore passing the {$user} variable to my scripts so they know who it is.

Example - I have a dynamic content block that looks something like this;

{IFRAME ( variousoptions ) }http://mysite?user={$user}{IFRAME}

If I include this dynamic content in module for the left or right columns, everything works fine.

HOWEVER, if I have a wiki page which has in the same way, I find that instead of {$user} being parsed to the correct value, it has been "escaped" such that my script receives the value "{$user}" rather than the actual value of this tiki variable.

How can I get the dynamic content block to render correctly in a wiki (or indeed article) page?

TIA
Roger

😑

I solved this in the end by editing the wikiplugin php file to append ;user=$user to the source attribute and declaring global $user earlier in the plugin file. It's a hack, but it works for me.