Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (57-Vette), 51 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 04/09/11
Posts: 140
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 23
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#237946 - 07/15/10 11:48 AM Can you use include files in a custom island
Bassin' USA Offline
stranger
Registered: 08/31/07
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
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#237948 - 07/15/10 12:12 PM Re: Can you use include files in a custom island [Re: Bassin' USA]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
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;

 
Top
#237950 - 07/15/10 01:02 PM Re: Can you use include files in a custom island [Re: Rick]
Bassin' USA Offline
stranger
Registered: 08/31/07
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
Top
#237951 - 07/15/10 01:14 PM Re: Can you use include files in a custom island [Re: Bassin' USA]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
the file_get_contents line:

You'll want that to be a full path, something like /var/www/fillers/etc. Not an actual URL.
Top
#237954 - 07/15/10 03:18 PM Re: Can you use include files in a custom island [Re: Rick]
Bassin' USA Offline
stranger
Registered: 08/31/07
Posts: 20
Sent a PM with the absolute paths...
Top
#237967 - 07/16/10 12:05 PM Re: Can you use include files in a custom island [Re: Bassin' USA]
Bassin' USA Offline
stranger
Registered: 08/31/07
Posts: 20
Top
#237968 - 07/16/10 12:05 PM Re: Can you use include files in a custom island [Re: Bassin' USA]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Did you send the PM to me? Because I don't have one from you.
Top
#237969 - 07/16/10 12:09 PM Re: Can you use include files in a custom island [Re: Rick]
Bassin' USA Offline
stranger
Registered: 08/31/07
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?
Top
#237970 - 07/16/10 12:14 PM Re: Can you use include files in a custom island [Re: Bassin' USA]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Got the PM you just sent and replied.
Top
#237981 - 07/16/10 05:17 PM Re: Can you use include files in a custom island [Re: Rick]
Bassin' USA Offline
stranger
Registered: 08/31/07
Posts: 20
Rick thanks for all the help, everything is working fine now!
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image