View Full Version : Banner Rotation Help
jdura99
Sat 14th Apr '01, 11:16pm
Ok I have this code here:
<? include("banner.php"); ?> <? randomline("banners.txt"); ?>
to include banners in the board. Where exactly do I need to post this in order for it to post our banners? I would like the banners to be below the main title graphic if possible. Thanks a lot.
Josh Dura
Mike Sullivan
Sun 15th Apr '01, 12:14am
You want to assign any output to $header (or a variable of your choice). The easiest way to do that is using PHP4's built in output buffering.
In 1.1.x, putting it under the title graphic wouldn't be easy unless you wanted to edit every template.
jdura99
Sun 15th Apr '01, 12:17am
Ok, sorry to bother you, but I am very very new to this, and you might have to explain this to me step by step. I wouldnt want to edit every template, so what would be the easiest way to put that code on EVERY page of the forum? Sorry to bother you
Josh Dura
jdura99
Sun 15th Apr '01, 12:23am
I tried putting the code:
<? include("banner.php"); ?> <? randomline("banners.txt"); ?>
into the header template, but it just gave me a parse error....
Josh Dura
Mike Sullivan
Sun 15th Apr '01, 12:37am
Don't use the <? and ?>.
If you have PHP4, you can use output buffering: http://www.php.net/manual/en/ref.outcontrol.php There's an example in vB2's phpinclude template.
If none of that works, just put it straight into global.php.
jdura99
Sun 15th Apr '01, 12:53am
Ok, one LAST question....I got that to work...now say I did want to put it below the title graphic. Where in each template would I have to put that code? And also how would I center it?
Thank you SOOOOOOOOO much!
Josh Dura
jdura99
Sun 15th Apr '01, 2:31pm
Anyone got any ideas?
Josh Dura
8minus8
Sun 15th Apr '01, 8:13pm
also we're getting errors when user tries to logon or change profile when we add that header code in the header template.
include("banner.php"); randomline("banners.txt");
for example if the banner is in the header template we get this error message.
"Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/htdocs/board/banner.php:8) in /usr/local/etc/httpd/htdocs/board/index.php3 on line 40"
please help. thanks.
Mike Sullivan
Sun 15th Apr '01, 8:20pm
To get it below the title image, you'd just put it below the title image <table> in each template....
"Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/htdocs/board/banner.php:8) in /usr/local/etc/httpd/htdocs/board/index.php3 on line 40"As I said, you'll have to use output buffering so it it isn't printed out directly.
jdura99
Tue 17th Apr '01, 9:54pm
Ok, I have been working at this for a couple of days now, and this is the code I put in, and it didnt work...
ob_start();
include("banner.php");
randomline("banners.txt");
ob_end_flush();
And it still gives the error....what am I doing wrong??
Josh Dura
UpNorth
Fri 20th Apr '01, 6:46pm
I know the problem! Josh you are using php3 version of vb - not php 4!!!
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.