View Full Version : Execute PHP Code right after Header
ConqSoft
03-27-2004, 08:56 PM
(Yes, I know you could do this in the phpinclude template normally, but that won't work for what I need.)
What vBulletin PHP file would I need to modify if I need to execute some PHP code and output some text right after the header is displayed, on every page of the site?
Thanks.
Link14716
03-27-2004, 08:58 PM
Use phpinclude_start. Anything that you try to output using it will be put into the $_phpinclude_output variable.
ConqSoft
03-27-2004, 09:00 PM
I just said that I can't do that. ;)
Having anything in phpinclude_start or end breaks the score submitting on the vb Arcade. So, I need to do it in the code itself...
NTLDR
03-27-2004, 09:01 PM
Somewhere in global.php after:
eval('$header = "' . fetch_template('header') . '";');
Note you should append this to the header template, DO NOT try to echo/print directly to the browser, it will either fail, or will give errors left, right and center about the headers already being sent.
ConqSoft
03-27-2004, 09:09 PM
Somewhere in global.php after:
eval('$header = "' . fetch_template('header') . '";');
Note you should append this to the header template, DO NOT try to echo/print directly to the browser, it will either fail, or will give errors left, right and center about the headers already being sent.
Thanks! I was close. ;)
ConqSoft
03-27-2004, 09:13 PM
Well, that worked, but it still breaks the arcade. :( Oh well. Thanks anyway.
corsacrazy
03-27-2004, 09:29 PM
save the php code in a new file.php then in php include add this
$mycode = implode("", file("http://www.yoursite.com/forums/yourfile.php"));
then in header template add $mycode at the end :p
see u help me at vb.com and i help u :P
ConqSoft
03-27-2004, 09:37 PM
save the php code in a new file.php then in php include add this
$mycode = implode("", file("http://www.yoursite.com/forums/yourfile.php"));
then in header template add $mycode at the end :p
see u help me at vb.com and i help u :P
That still breaks the score submission though, it seems.
corsacrazy
03-27-2004, 09:40 PM
what code are you tryin to add?
ConqSoft
03-27-2004, 09:42 PM
phpAdsNew. But, even if I try to include a file with nothing but a in it, it breaks. So it is just something related to including a file or such. :disappointed: John doesn't have any ideas either.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.