View Full Version : Riddle me this: "$show['inlinemod']"


darnoldy
14th September 2006, 10:06 PM
Folks-

Something has my puzzled, and I hope one of you can explain it to me.

I am working with the conditional:
<if condition="$show['inlinemod']">...</if>
When I place it within the forumdisplay template (where I found it), it tests true, and displays its contents.

When I place it in the footer template (which is called by forumdisplay) it test false!

Wazzup!?

Shouldn't the value of $show['inlinemod'] be determined when forumdisplay.php is called, and be available for use by the time the footer template is loaded?

--don

Chroder
15th September 2006, 06:24 AM
header/footer and some others are precached at the beginning of the scripts execution (in init.php I think). So they are evaluated before some variables like $show have been assigned values.

It's very annoying. For example, I created a plugin that grabs adsense code and supposed to display it in the header but of course the header is evaluated before certain variables could be given values. I ended up putting code like <!--SOMETEXT--> in the header, then using a plugin to search-and-reaplce it with the real value I wanted.

darnoldy
15th September 2006, 08:04 AM
header/footer and some others are precached at the beginning of the scripts execution... they are evaluated before some variables like $show have been assigned values.Oh, bother! Time for plan B--err, it may actually be plan H by now <G>

--don