Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
1 registered members (Ruben), 64 guests, and 249 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
whk
whk
Portsmouth, RI
Posts: 86
Joined: January 2009
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
FREAK 11
M4TT 11
Ruben 6
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Custom Islands #256017
11/04/14 03:15 PM
11/04/14 03:15 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
I am working with custom islands in 7.5.8. If I start with just the default contents of the custom island data box (below), I get the error: Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/dennyp.com/httpdocs/ubbthreads/cache_builders/custom/portal_box_2.php on line 6 when I click the Update button.

What is the problem since even the default contents doesn't parse correctly? It seems to follow the layout of the examples in the Wiki.
Quote:
/* PHP CODE HERE, IF NECESSARY */

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF

Body of the custom box here

EOF;
/* DO NOT CHANGE THE LINE ABOVE */



DennyP - www.dennyp.com
DennyP Travel
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."
Re: Custom Islands [Re: DennyP] #256018
11/04/14 03:26 PM
11/04/14 03:26 PM
Joined: Apr 2004
Posts: 1,004
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,004
California
It looks like line 6 is the error. "/* DO NOT CHANGE THE LINE ABOVE */"

Remove that last line and give it another shot.


This should work as a bare minimum starting point -
Code
/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF
EOF;



Here is another example, if you were going to create one for Google Adsense
Code
/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 160x600 Portal TEXT/IMAGE -->
<ins class="adsbygoogle"
style="display:inline-block;width:160px;height:600px"
data-ad-client="ca-pub-9999999999999999"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

EOF;

Re: Custom Islands [Re: DennyP] #256019
11/04/14 03:34 PM
11/04/14 03:34 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
The new site looks like it has some hidden embedded tags in the code that needs to be removed.
Gizmo needs to fix it.
Anyway try this with out any spaces or line feeds.
Code
/* PHP CODE HERE, IF NECESSARY */

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF

Body of the custom box here

EOF;
/* DO NOT CHANGE THE LINE ABOVE */


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: DennyP] #256020
11/04/14 03:48 PM
11/04/14 03:48 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
I get the same error message when trying both the suggestions above.


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256021
11/04/14 03:53 PM
11/04/14 03:53 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
When you post the code you need to make sure there is nothing below that last line.
For example:
EOF;
/* DO NOT CHANGE THE LINE ABOVE */
Put your courser just after the */
and delete.
You probably have some line feeds below that line.
Or in id242s case anything after
EOF;
and delete


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: Ruben] #256022
11/04/14 03:57 PM
11/04/14 03:57 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
There is nothing after the last semicolon below. I can left-click and drag my cursor over the entire contents and the highlighting stops at the semicolon after EOF on the last line.

Quote:
/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF
Test
EOF;


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256023
11/04/14 04:02 PM
11/04/14 04:02 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
Here is the contents of the file in question:
Quote:

<?php
/* PHP CODE HERE */

/* BODY HERE */
$body = "Test"
EOF;
?>

To clarify, this is the file from the server and NOT what is in the control panel portal box. Line 6 is the EOF;

Last edited by DennyP; 11/04/14 04:16 PM. Reason: Clarification

DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256024
11/04/14 04:07 PM
11/04/14 04:07 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
Well I just tried it on another site and your code works fine now.
With that last post what is your error message now?

We posted on top of each other.
Get rid of the first and last line:
<?php
?>

Those two lines are inserted by the software and should not be there
Also:
$body = "Test"
Missing the eof
should be like
$body = <<<EOF
"Test"


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: Ruben] #256025
11/04/14 04:13 PM
11/04/14 04:13 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
I think I wasn't clear on my last post. That is the contents of the /var/www/vhosts/dennyp.com/httpdocs/ubbthreads/cache_builders/custom/portal_box_2.php file that parsed with the error. The php lines aren't in the portal box in the control panel. Line 6 is the EOF;.


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256026
11/04/14 04:15 PM
11/04/14 04:15 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
Well we should be talking about what is in the cp for the custom island.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: DennyP] #256027
11/04/14 04:20 PM
11/04/14 04:20 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
If I were you I would opt for the clear cache in the cp.
That should most times delete the files in the cache builders cache and force them to rebuild.
Sometimes you have to manually delete them. Then run the clear cache.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: Ruben] #256028
11/04/14 04:22 PM
11/04/14 04:22 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
I wanted to post what was actually on line 6.

I will try clearing the cache.


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256029
11/04/14 04:29 PM
11/04/14 04:29 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
here is what shows on my site in the file not cp:
Code
<?php
/* PHP CODE HERE */



/* BODY HERE */

$body = <<<EOF

"Test"

EOF;
?>


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: DennyP] #256030
11/04/14 04:32 PM
11/04/14 04:32 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
When I click on the Clear Cache button I get the same error:

Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/dennyp.com/httpdocs/ubbthreads/cache_builders/custom/portal_box_2.php on line 6


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256031
11/04/14 04:37 PM
11/04/14 04:37 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
Okay do it the hard way.
Ftp to the site:
Goto cache builders/custom
Delete all the files except for index.html
they all start with like
portal_box_1.php
portal_box_2.php
ETC
Then go back to the cp and run clear cache.
it will rebuild all the island files and they should all have a current date.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Custom Islands [Re: Ruben] #256032
11/04/14 04:45 PM
11/04/14 04:45 PM
Joined: Apr 2004
Posts: 211
Phoenix, AZ
D
DennyP Offline OP
enthusiast
DennyP  Offline OP
enthusiast
D
Joined: Apr 2004
Posts: 211
Phoenix, AZ
Ruben - that appears to have done the trick. I can at least do an Custom Island update with the default information in it. I will work with it more. Thank you very much.


DennyP - www.dennyp.com
DennyP Travel
Re: Custom Islands [Re: DennyP] #256033
11/04/14 04:50 PM
11/04/14 04:50 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,825
Lutz,FL
Sounds like your server had a hiccup and corrupted the island file.
Or you initially had a bad format entry in the cp and it wrote bad code to the file.
Anyway glad it helped.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,535
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)