 |
 |
 |
 |
Registered: 06/05/06
Posts: 709
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
#227596 - 07/10/09 05:04 PM
ISLANDS, PHP, JAVA, and ADVIL ...
|
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 ...
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
|
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#227602 - 07/10/09 06:13 PM
Re: ISLANDS, PHP, JAVA, and ADVIL ...
[Re: Ruben]
|
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
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#227603 - 07/10/09 06:24 PM
Re: ISLANDS, PHP, JAVA, and ADVIL ...
[Re: Ruben]
|
|
Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
|
|
I think that
<?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: /* 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 */
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
|
|