The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
forumid array in plugin, for use in template conditional
Hi,
I spent a bit of time trying to do this myself this morning, using bits and pieces of similar threads on here, but I can't get it working. What I want to do is define an array of forumids in a plugin, and reference the output variable in a conditional. Now, I've done this for non-conditional template use with success in the past but I read that you cannot use vb:raw in this context inside a conditional. Here's the current plugin code using the global_state_check hook... Code:
if (!in_array($foruminfo['forumid'], array(61,63,80,31,81,69,24,67,28,77,79,78,84))) { $show['not_sponsor'] = true; }else{ $show['not_sponsor'] = false; } Code:
vB_Template::preRegister('ad_navbar_below',array('not_sponsor' => $not_sponsor)); vB_Template::preRegister('ad_showthread_firstpost_start',array('not_sponsor' => $not_sponsor)); Lynne gave me some direction in this thread on vb.com but I'm still having trouble. --------------- Added [DATE]1359144704[/DATE] at [TIME]1359144704[/TIME] --------------- Nevermind, I got it working by changing the hook to global_start. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|