PDA

View Full Version : $template_hook variable is an empty array?


DionDev
02-09-2010, 02:25 AM
For vb4, this code:


require_once('global.php');

print_r($template_hook);


Is echoing an empty array. I'm trying to grab the CSS of the current active style for my new shoutbox mod.

Lynne
02-09-2010, 03:19 AM
What does the $template_hook have to do with getting the css of the style?

DionDev
02-09-2010, 04:11 AM
{vb:raw template_hook.headinclude_css}

--------------- Added 1265696081 at 1265696081 ---------------

unlesssssss i used this along with the $vbulletin['vbcsspath'] variable:


<vb:if condition="$vboptions['storecssasfile']">
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}main-rollup.css" />
<vb:else />
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css,editor.css,popupmenu.css,rese t-fonts.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css{vb:raw custom_global_css_reference}" />
</vb:if>
{vb:raw template_hook.headinclude_css}


i want this to be as object oriented with vbulletin as i can get. this needs to support the full customizations a forum style can possibly undergo.