PDA

View Full Version : Banner/Header Problem


Fess
04-16-2004, 04:55 PM
Hello,

I'm in need of some scripting help perhaps.

I have just installed & configured the latest version of phpadsnew on my server.

I have read this post:http://www.vbulletin.com/forum/showthread.php?t=95627&highlight=banner+rotation

and placed this in my phpinclude_start:

ob_start();
require("/full/path/to/your/banner.php");
$mybannerad = ob_get_contents();
ob_end_clean();

The post instructs to place $mybannerad in the position where you want the ads to show.......which leads to my problem.

I need to place the $mybannerad in a 3 celled table.

I tried this:

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="5%"><img src="$stylevar[imgdir_misc]/test_air_header_rs_02.jpg" width="16" height="60" alt="" /></td>
<td width="90%">$mybannerad</td>
<td width="5%"><img src="$stylevar[imgdir_misc]/test_air_header_rs_03.jpg" width="43" height="60" alt="" /></td>
</tr>
</table>

After attempting this, the banner rotation displays but a huge text error destroys my table:

Warning: Unknown(): stream does not support seeking in /home/httpd/example/example.com/html/forum/global.php(385) : eval()'d code on line 8

Think its an error with the code in my phpinclude_start template. I am not sure what is causing that error, but it may has to do with my custom code in that template.

Here is exactly everything in my phpinclude_start template.

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();

ob_start();
require("http://www.example.com/phpAdsNew-2.0/banner.php");
$mybannerad = ob_get_contents();
ob_end_clean();

Can someone show mercy and advise me on this harassing error an how to fix? :rolleyes:

Thank You
FessB

Brian
04-16-2004, 05:53 PM
We can't really provide support here for non-vBa products. I'll move this to the Chit Chat forum though incase somebody else here that uses the product knows what the problem is.
I'm not sure if you changed the paths and such for the post, but if what you posted is the exact code you have in your templates then I can tell you right off the bat there are a couple of problems.

require("/full/path/to/your/banner.php");
require("http://www.example.com/phpAdsNew-2.0/banner.php");

Those should both be changed to reflect the locations on your server.

TexasOutdoors
04-16-2004, 09:03 PM
If all else fails, use the Javascript function to call the banners. I use it with no problems using PhpAdsNew.

Fess
04-17-2004, 01:10 AM
Brian....

require("/full/path/to/your/banner.php");
require("http://www.example.com/phpAdsNew-2.0/banner.php");

Thanks, I'm aware of this, just changed it for the purpose of this forum post....

Texas...

Thanks for the suggestion, I read in the manual that this way is a little slower...

Regards
Fess

03GTFL
08-02-2004, 03:31 PM
How do you generate the code from PHPADS? im trying to get the code

Thanks

mholtum
08-02-2004, 06:51 PM
How do you generate the code from PHPADS? im trying to get the code

Thanks
Click "Direct Selection" choose "Remote Invocation for Java Script" then click "Generate"

03GTFL
08-02-2004, 09:40 PM
And that code will put random banners on my forums?

mholtum
08-03-2004, 12:17 AM
And that code will put random banners on my forums?Yea if you have phpadsnew installed and have setup up mulitiple accounts with numerous banners.