Dr.CustUmz
03-01-2015, 01:06 PM
SOLVED*
was using another product of mine as the skeleton of this product and had both installed which caused a clash in the replace.... well i think lol
renaming drcrb_nav solved the problem
im trying to add my custom template to the very top of the header template, in global start I have:
$drcrb_nav = '<a name="top"></a>';
$vbulletin->templatecache['header'] = str_replace($drcrb_nav,$drcrb_nav.fetch_template(' drc_idle'),$vbulletin->templatecache['header']);
but it's not adding it yet all my other replaces work just fine and yes i have cached them all
<hookname>cache_templates</hookname>
<phpcode><![CDATA[
$globaltemplates = array_merge($globaltemplates, array('drc_idle_css','drc_idle','drc_idle_script') );
]]></phpcode>
global start
$drcrb_inc = '<!-- / CSS Stylesheet -->';
$drcrb_nav = '<a name="top"></a>';
$drcrb_cr = '$vbphrase[powered_by_vbulletin]';
$vbulletin->templatecache['headinclude'] = str_replace($drcrb_inc,$drcrb_inc.fetch_template(' drc_idle_css'),$vbulletin->templatecache['headinclude']);
$vbulletin->templatecache['header'] = str_replace($drcrb_nav,$drcrb_nav.fetch_template(' drc_idle'),$vbulletin->templatecache['header']);
$vbulletin->templatecache['footer'] = str_replace($drcrb_cr,$drcrb_cr.fetch_template('dr c_idle_script'),$vbulletin->templatecache['footer']);
my drc_idle template has to be within the body tag, not any deeper so i figured placing it at the top of the header would be the best spot for it, if theirs a way to add it to the very top of header without having to rely on a string that would be awesome too
was using another product of mine as the skeleton of this product and had both installed which caused a clash in the replace.... well i think lol
renaming drcrb_nav solved the problem
im trying to add my custom template to the very top of the header template, in global start I have:
$drcrb_nav = '<a name="top"></a>';
$vbulletin->templatecache['header'] = str_replace($drcrb_nav,$drcrb_nav.fetch_template(' drc_idle'),$vbulletin->templatecache['header']);
but it's not adding it yet all my other replaces work just fine and yes i have cached them all
<hookname>cache_templates</hookname>
<phpcode><![CDATA[
$globaltemplates = array_merge($globaltemplates, array('drc_idle_css','drc_idle','drc_idle_script') );
]]></phpcode>
global start
$drcrb_inc = '<!-- / CSS Stylesheet -->';
$drcrb_nav = '<a name="top"></a>';
$drcrb_cr = '$vbphrase[powered_by_vbulletin]';
$vbulletin->templatecache['headinclude'] = str_replace($drcrb_inc,$drcrb_inc.fetch_template(' drc_idle_css'),$vbulletin->templatecache['headinclude']);
$vbulletin->templatecache['header'] = str_replace($drcrb_nav,$drcrb_nav.fetch_template(' drc_idle'),$vbulletin->templatecache['header']);
$vbulletin->templatecache['footer'] = str_replace($drcrb_cr,$drcrb_cr.fetch_template('dr c_idle_script'),$vbulletin->templatecache['footer']);
my drc_idle template has to be within the body tag, not any deeper so i figured placing it at the top of the header would be the best spot for it, if theirs a way to add it to the very top of header without having to rely on a string that would be awesome too