kirupa
05-22-2011, 07:35 PM
Hi everyone,
I'm running into a weird issue that I am not able to debug. I am trying to include an external HTML file in my header template. I've read the following posts that describe how to do this: http://www.vbulletin.com/docs/html/templates_externalfiles and https://vborg.vbsupport.ru/showthread.php?t=242454
The problem is that this doesn't seem to be working for me. Here is what I've done.
Created the new Plugin
The new plugin hook location is global_init_start, and the execution order is 5. The code I am using is:
$newHeader = implode('', file('../ssi/forums/defaultHeader2.shtml'));
vB_Template::preRegister('header',array('newHeader ' => $newHeader));
I've verified that this file exists. The forums live in http://www.kirupa.com/forum, and the file I am trying to include lives in: http://www.kirupa.com/ssi/forums/defaultHeader2.shtml
Referencing it in the Template
The next thing I do is go to the Styles Manager and make a reference to this plug-in:
<div class="above_body"> <!-- closing tag is in template navbar -->
{vb:raw newHeader}
<p>hello, world!</p>
<div id="header" class="floatcontainer doc_header">
When I save everything and test how this works on my board, nothing shows up.
Can someone please tell me what I am doing that may be wrong?
Thanks,
Kirupa :)
I'm running into a weird issue that I am not able to debug. I am trying to include an external HTML file in my header template. I've read the following posts that describe how to do this: http://www.vbulletin.com/docs/html/templates_externalfiles and https://vborg.vbsupport.ru/showthread.php?t=242454
The problem is that this doesn't seem to be working for me. Here is what I've done.
Created the new Plugin
The new plugin hook location is global_init_start, and the execution order is 5. The code I am using is:
$newHeader = implode('', file('../ssi/forums/defaultHeader2.shtml'));
vB_Template::preRegister('header',array('newHeader ' => $newHeader));
I've verified that this file exists. The forums live in http://www.kirupa.com/forum, and the file I am trying to include lives in: http://www.kirupa.com/ssi/forums/defaultHeader2.shtml
Referencing it in the Template
The next thing I do is go to the Styles Manager and make a reference to this plug-in:
<div class="above_body"> <!-- closing tag is in template navbar -->
{vb:raw newHeader}
<p>hello, world!</p>
<div id="header" class="floatcontainer doc_header">
When I save everything and test how this works on my board, nothing shows up.
Can someone please tell me what I am doing that may be wrong?
Thanks,
Kirupa :)