Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
7 registered (SteveS, mcasado, Mike L, Gizmo, SD, Bjab, driv), 18 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 255
Top Posters (30 Days)
Ruben 63
SD 54
Gizmo 48
gliderdad 33
Dunny 21
driv 18
dbremer 16
Iann128 16
Stan 14
Mark S 13
Latest Photos
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Gizzo Marx
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
Edit Post
by Bert
01:19 PM
A positive note
by SteveS
09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10213 Members
36 Forums
33667 Topics
180917 Posts

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