Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20
Hi All,

I'm trying to place a rotating ad in a custom island on my boards. The ads are read through a third party partner of mine. I am using an include file to avoid the need to update multiple pages if the ad code ever changes.

The code I am using is as follows:

<table width="238" border="0" cellspacing="0" cellpadding="5">
<tr>
<td bgcolor="#FFFFFF" align="center"><!--#include virtual="/fillers/outsidehub.htm" --></td>
</tr>
</table>

Here is the ad running on a static html page (ignore the ".asp" file extension, not being used) http://www.bassinusa.com/busa/resources/index.asp

The custom island displays, but the ads won't load up in the table...

Any thought?

Thanks,
Brendan

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You want to do your custom island a bit different. Something like this should work:

PHP Code


$ad_include = file_get_contents("/full/path/to/fillers/outsidehub.htm");

$body = <<<EOF
<table width="238" border="0" cellspacing="0" cellpadding="5">
<tr>
<td bgcolor="#FFFFFF" align="center">$ad_include</td>
</tr>
</table>
EOF;

 

Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20
Hi Rick,

Thanks for the help. I tried the code below using the direct path, but I get the same thing...

$ad_include = file_get_contents("http://www.bassinusa.com/fillers/_templates/outsidehub-tower.htm");
$body = <<<EOF
<table width="238" border="0" cellspacing="0" cellpadding="5">
<tr>
<td bgcolor="#FFFFFF" align="center">$ad_include</td>
</tr>
</table>
EOF;

The island box appears (bottom right side), ad does not load: http://www.bassinusa.com/forum/ubbthreads.php/forum_summary.html


Any other thoughts?

Brendan

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
the file_get_contents line:

You'll want that to be a full path, something like /var/www/fillers/etc. Not an actual URL.

Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20
Sent a PM with the absolute paths...

Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Did you send the PM to me? Because I don't have one from you.

Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20
Yes, from your profile though... lol guess it didn't come through...

Basically I have tried the absolute path and every variation staring with the drive letter and with both forward and back slashes.

I even took the outsidehub-tower.htm file and put it in the "/forum/" directory to see if that had something to do with it... no good. I also called my ad firm and there is no issues running multiple ads on the same page, so I've ruled that out as a possible issue...

Other thoughts?


Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Got the PM you just sent and replied.

Joined: Aug 2007
Posts: 20
stranger
stranger
Joined: Aug 2007
Posts: 20
Rick thanks for all the help, everything is working fine now!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
1 members (1 invisible), 939 guests, and 146 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)