Please help me with this issue.
I have a plug in (Location: parse_templates)
Code:
if($vbulletin->options['enable_vbadv'] AND in_array($vbulletin->userinfo['usergroupid'], explode(',', $vbulletin->options['vbadv_ug'])))
{
switch($vbulletin->options['vbadv_place'])
{
case 1:
$place = '$navbar';
$fechttemplate = 'FORUMHOME';
break;
case 2:
$place = '$ad_location[ad_navbar_below]';
$fechttemplate = 'navbar';
break;
default:
$place = '$navbar';
$fechttemplate = 'FORUMHOME';
break;
}
$vbulletin->templatecache[$fechttemplate] = str_replace($place, $place . '\n' . fetch_template('forumhome_+++++++_com_adv'), $vbulletin->templatecache[$fechttemplate]);
}
I've tried to fix it like this
Code:
if($vbulletin->options['enable_vbadv'] AND in_array($vbulletin->userinfo['usergroupid'], explode(',', $vbulletin->options['vbadv_ug'])))
{
$templater = vB_Template::create('forumhome_+++++++_com_adv');
$templater->register('advheader', $advheader);
$advheader = $templater->render();
switch($vbulletin->options['vbadv_place'])
{
case 1: $template_hook['forumhome_above_forums'] .= $advheader; break;
case 2: $ad_location['global_below_navbar'] .= $advheader; break;
}
}
But it takes effect only when I choose case 1, display below forums. When I choose "Below Navbar", there's nothing displayed. Please help me to fix it.
Thank you very much, and sorry for my bad English.
--------------- Added [DATE]1293914180[/DATE] at [TIME]1293914180[/TIME] ---------------
It's Fixed. Just simple change Location to "global_start"