Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (SteveS, Jake), 47 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 709
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 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
Page 1 of 3 1 2 3 >
Topic Options
#227596 - 07/10/09 05:04 PM ISLANDS, PHP, JAVA, and ADVIL ...
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
Hi Guys:

OK, transferred servers. On the new box, all the javascript that was part of my custom islands (rotating ads) would display on the Main index, but not on any sub-pages. Any URL than had any info after /ubbthreads.php would not display the javascript. I dunno.

OK, so I have the option of using php instaed of Java, and so I generated THAT code. Put it into the header and footer ... poof, no problem. Now the ads are displaying again. I can live with php.

BUT, when I try to make it work in the custom islands, no can do. I have some pretty important ad zones there, and I can't get them to display, either with javascript OR with php.

OK, so how do I make this php code, display in a custom island:


<?php
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:13', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>


It displays fine outside the island.

If you prefer to see the javascript, I'll post that too.

Gotta display ads to pay the bills ...

Thanks all ...
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
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."
#227597 - 07/10/09 05:41 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Don't quote me on this but I think you need to move
"echo $phpAds_raw['html'];"
to be in between the EOF tags
So just place $phpAds_raw inside the eof tags don't use echo.
Not sure about the ['html'] part.
_________________________
Blue Man Group
Top
#227598 - 07/10/09 05:43 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
How about the

}
?>

Leave it up top, or not?

Off to play.

rb
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
Top
#227599 - 07/10/09 05:44 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
Parse error: syntax error, unexpected '<' in /home/XXXXXXXXXXXXX/public_html/ubbthreads/cache_builders/custom/portal_box_10.php on line 3

frown
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
Top
#227600 - 07/10/09 06:03 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Okay when dealing with the islands you omit the php tags
Such as <?php or ?>
They are placed by the island script.
_________________________
Blue Man Group
Top
#227601 - 07/10/09 06:13 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
I see Giz is here now maybe he can give some input.
Also Giz maybe it is time to post a how do I for islands.
_________________________
Blue Man Group
Top
#227602 - 07/10/09 06:13 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
Ok, tried that.

This code:

/* PHP CODE HERE, IF NECESSARY */
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:13', 0, '', '', '0', $phpAds_context);
/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
echo $phpAds_raw['html'];
EOF;
/* DO NOT CHANGE THE LINE ABOVE */


gave me this:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/XXXXXXXXXXXX/public_html/ubbthreads/cache_builders/custom/portal_box_10.php on line 8
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
Top
#227603 - 07/10/09 06:24 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
I think that

Code:
<?php
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:13', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>


Should end up:
Code:
/* PHP CODE HERE, IF NECESSARY */
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:13', 0, '', '', '0', $phpAds_context);
}

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
echo $phpAds_raw['html'];
EOF;
/* DO NOT CHANGE THE LINE ABOVE */
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#227604 - 07/10/09 06:25 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Gizmo]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
And you're getting that error because you didn't close your if statement.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#227605 - 07/10/09 06:26 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Gizmo]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
OK, Giz.

I copied the code from your second box there, and pasted it into my custom island, and got this:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/XXXXXXXXXX/public_html/ubbthreads/cache_builders/custom/portal_box_10.php on line 10
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
Top
Page 1 of 3 1 2 3 >



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