![]() |
Adding PHP include file to header
Hi there
Can you please point me in the right direction on how to add a PHP include file in our forum header? I want to add <?php include('{Path to file}');?> to our header. I have a PHP file which produces some test output which I want to display? Any help will be much appreciated. |
You'll have to utilize the plugin system and hook at global_start.
http://www.vbulletin.com/docs/html/t..._externalfiles |
Solved it thanks...
|
Quote:
I'm having a problem with one of my plug-ins that isn't working properly. Plugin Code Code:
ob_start(); $sigStripPHP A vB guy told me to use $globals['sigStripPHP'] to call it, but I get errors when I go to do that and no posts display. The sigStrip.php for now just contains the following: Code:
<?php |
No, you would call it with $sigStripPHP.
|
Quote:
It just isn't displaying any of the output, in this case, the word "Test". |
Which hook location are you using for the plugin?
|
Quote:
|
Just to cover all the bases, you are using $sigStripPHP in a template, right? If so, which?
|
Quote:
|
Ah ha. The hat drops. You need to move your hook's location from global_start to postbit_display_start.
Because the postbits are output by a function, you're having a scope issue -- $sigStripPHP does not exist. |
Quote:
|
All times are GMT. The time now is 07:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|