PDA

View Full Version : Variable Access in ad_navbar_below Template (forumid)


clathrop
12-17-2010, 11:01 PM
I am banging my head against a wall here. The code below is simply not working in the ad_navbar_below. I am a little new to VB4, but I suspect that for some reason the variable $forum[forumid] is not available in the ad_navbar_below template. If someone can answer this question for me it would be greatly appreciated, and I suspect it will be the "ah ha" moment I need for a bunch of other style / skin issues I am having.

<vb:if condition="$forum[forumid] != 9">adsense code</vb:if>

calorie
12-18-2010, 12:26 AM
Untested but add this plugin to the parse_templates hook:

global $foruminfo;

And then use this in the ad_navbar_below template:

<vb:if condition="$foruminfo['forumid'] != 9">adsense code</vb:if>

clathrop
12-19-2010, 12:15 AM
This did not work. It tried several variations, and I tried adding it to global_start as well. I can't seem to access this variable.

--------------- Added 1292728475 at 1292728475 ---------------

OK, got it. The variable needed was $GLOBALS[forumid]