The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Including External HTML File in Template
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/t..._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: Code:
$newHeader = implode('', file('../ssi/forums/defaultHeader2.shtml')); vB_Template::preRegister('header',array('newHeader ' => $newHeader)); Referencing it in the Template The next thing I do is go to the Styles Manager and make a reference to this plug-in: Code:
<div class="above_body"> <!-- closing tag is in template navbar --> {vb:raw newHeader} <p>hello, world!</p> <div id="header" class="floatcontainer doc_header"> Can someone please tell me what I am doing that may be wrong? Thanks, Kirupa |
#2
|
||||
|
||||
As part of debugging to see where the issue lies, try this:
PHP Code:
|
#3
|
|||
|
|||
Hi Lynne,
Unfortunately, no - no output is displayed. I have ensured that Plugins are enabled. Thanks, Kirupa |
#4
|
||||
|
||||
OK, I just tried this myself. I assume you meant global_bootstrap_init_start instead of just global_init_start.
You're gonna kick yourself over this... you have an extra space in your call here - see yours, with what should be underneath: Code:
array('newHeader ' => $newHeader) array('newHeader' => $newHeader) |
#5
|
|||
|
|||
Lynne - you were right! The extra space was what did me in. I am kicking myself as we speak :P
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|