The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
External file import question
I am attempting to include a navigation bar at the top of my site and have followed some of the guides to do so using an external php script. However, the only way I've been able to figure out to do it is by creating the plugin and then including the plugin in each of my templates via a variable.
For instance... Plugin code Code:
ob_start(); require_once('foo/foo.php'); $foo_include = ob_get_clean(); ob_end_clean(); Then, in my template I call $foo_include and that imports my foo.php file. Is there a way I can hook into the templates to automatically include all the plugins at the very beginning of each template without the user having to add the variable manually? It needs to be the very first thing run, before any other elements are rendered. |
#2
|
||||
|
||||
Why not include the variable in the header template?, it will then be available regardless of what you're looking at in your forum.
|
#3
|
|||
|
|||
Quote:
Most plugins I download don't require me to make any manual edits so I'm guessing there is some way around this. |
#4
|
||||
|
||||
So do an str replace as a plugin to add the variable to th header using global start or global complete as the hook
|
#5
|
|||
|
|||
I have that a shot by adding a plugin with the following code (the call to logo is the first thing in the header)...
Code:
ob_start(); echo str_replace('<!-- logo -->', '$gamestabar_include <!-- logo -->', '<!-- logo -->'); ob_end_clean(); |
#6
|
||||
|
||||
Check out this https://vborg.vbsupport.ru/showthread.php?t=263517 or even better this https://vborg.vbsupport.ru/showthread.php?t=286403
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|