Mythotical
01-10-2010, 03:17 AM
I have a plugin at global_start:
if($canviewquote AND $vbulletin->options['pl9_qloc2'] == 'above_navbar'){
$find = '<!-- breadcrumb, login, pm info -->';
$replace = '$quote';
$vbulletin->templatecache['navbar'] = str_replace($find,$replace.$find,$vbulletin->templatecache['navbar']);
} else if($canviewquote AND $vbulletin->options['pl9_qloc2'] = 'below_forum'){
$find2 = '$ad_location[ad_footer_start]';
$replace2 = '<br />$quote';
$vbulletin->templatecache['footer'] = str_replace($replace2,$find2.$replace2,$vbulletin->templatecache['footer']);
}
eval('$template_hook[usercp_navbar_bottom] .= "<if condition="$canviewquote AND $vboptions[\'pl9_qloc2\'] == \'below_navbar\'">$quote</if>";');
Now what I don't get is why the template_hook is working perfect when I select below_navbar to display the box but if I select below_forum or above_navbar it won't work. I have changed it to reflect if condition in the plugin as well in the template replace line.
If you can see anything wrong with how I did my code please let me know.
if($canviewquote AND $vbulletin->options['pl9_qloc2'] == 'above_navbar'){
$find = '<!-- breadcrumb, login, pm info -->';
$replace = '$quote';
$vbulletin->templatecache['navbar'] = str_replace($find,$replace.$find,$vbulletin->templatecache['navbar']);
} else if($canviewquote AND $vbulletin->options['pl9_qloc2'] = 'below_forum'){
$find2 = '$ad_location[ad_footer_start]';
$replace2 = '<br />$quote';
$vbulletin->templatecache['footer'] = str_replace($replace2,$find2.$replace2,$vbulletin->templatecache['footer']);
}
eval('$template_hook[usercp_navbar_bottom] .= "<if condition="$canviewquote AND $vboptions[\'pl9_qloc2\'] == \'below_navbar\'">$quote</if>";');
Now what I don't get is why the template_hook is working perfect when I select below_navbar to display the box but if I select below_forum or above_navbar it won't work. I have changed it to reflect if condition in the plugin as well in the template replace line.
If you can see anything wrong with how I did my code please let me know.