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
#227606 - 07/10/09 06:33 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Found something on using your script with vbulletin.
HERE
So it looks like the island should look something like:
Code:
/* PHP CODE HERE */
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);
}


/* BODY HERE */
$body = <<<EOF
$phpAds_raw[html]
EOF;
_________________________
Blue Man Group
Top
#227607 - 07/10/09 06:41 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
BINGO!!!!!

What did you do? I have a couple other islands to change. NICE JOB DUDE!!!!!

rb
_________________________
Rick Bin
24hourcampfire.com

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

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
lol yeh, was just about to post "well it should parse without the echo" and refresh to see ruben did just that...
_________________________
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
#227609 - 07/10/09 06:44 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Just searched for phpad news .
It looks like you need to remove the quote inside the [html] part. According to the tech note I found for vbulletin.
_________________________
Blue Man Group
Top
#227610 - 07/10/09 06:47 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
You guys rock. Thanks!!!!!!!!!!!!
_________________________
Rick Bin
24hourcampfire.com

http://www.24hourcampfire.com/ubbthreads/ubbthreads.php
Top
#227611 - 07/10/09 06:55 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
One last question: How to center it?

Any place I put <center> and </center> breaks it again.
_________________________
Rick Bin
24hourcampfire.com

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

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Really? It should just center if you:

Code:
$body = <<<EOF
<center>
$phpAds_raw[html]
</center>
EOF;
_________________________
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
#227613 - 07/10/09 07:05 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Gizmo]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
That did it.

Dang, you have helped me finish off a grind of a week, in which every part of a server change went screwy, with some straight, effective answers that worked.

In case no one has said it lately, I APPRECIATE IT! NICE JOB! If only everyone could be as on it as the folks on this Board.

I've been with UBB since 2000, and I ain't going nowhere!
_________________________
Rick Bin
24hourcampfire.com

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

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Hey Rick, in case someone else has a similar question in the future, could you post your final version of your custom island for reference?
_________________________
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
#227615 - 07/10/09 07:11 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: 24hourcampfire]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
We both thank you.
But remember we are just users just like you.
So it would be nice if you provide feed back once in a while to other users like we do.
Or at least reply, to help you received so others can read the resolution and see if it worked.
_________________________
Blue Man Group
Top
#227616 - 07/10/09 07:46 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
Guys:

I readja loud and clear. It's just that I only know enough to be dangerous. wink

OK, here's the entire php code in my custom island:



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

$body = <<<EOF
<center>
$phpAds_raw[html]
</center>
EOF;
_________________________
Rick Bin
24hourcampfire.com

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

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Dangerous is our business.
Happy it worked for you.
Took a while to figure it out though.
_________________________
Blue Man Group
Top
#227618 - 07/10/09 07:57 PM Re: ISLANDS, PHP, JAVA, and ADVIL ... [Re: Ruben]
24hourcampfire Offline
journeyman
Registered: 11/02/06
Posts: 91
Not really ....

You should have seen my week and the server transfer. You guys are zippy. Just ducky. wink

rb
_________________________
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