Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
I'm trying to add some text to appear from a custom island on a forum, and each time I try and add it and submit the change I get the following error.. clearly im being stupid, so could someone post up the code I need to add in to get some text to appear please.

Grassy ass.

Parse error: parse error in G:\webs\mtorque\public\ubbthreads\cache_builders\custom\portal_box_1.php on line 9


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
Could you copy the content of your custom island here?

This is my sample:
Code
/* PHP CODE HERE, IF NECESSARY */

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
This is a test<br />
bladiebla<br />
EOF;
/* DO NOT CHANGE THE LINE ABOVE */

Your stuff should be between the <<<EOF and EOF; Any php code you can do in that php code section.

Last edited by blaaskaak; 09/27/2007 11:23 AM.

[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="header_background">
<tr>
<td style="background: url(http://www.bm3w.co.uk/ubbthreads/images/Image5.gif);" width="245" height="92"><a href="/index.php"><img src="http://www.bm3w.co.uk/ubbthreads/images/Image3c.gif" alt="Click here to return to the index page." border="0" width="245" height="92" /></a></td>
<td valign="bottom" align="right" style="background: url(http://www.bm3w.co.uk/ubbthreads/images/Image5.gif);" height="92"><img src="http://www.bm3w.co.uk/ubbthreads/images/blank.gif" height="92" width="5" alt="" border="0"/></td>
<td valign="bottom" align="right" style="background: url(http://www.bm3w.co.uk/ubbthreads/images/Image5.gif);" width="243" height="92"><img src="http://www.bm3w.co.uk/ubbthreads/images/Image3a.gif" alt="Theme image" width="245" height="92" border="0" /></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="header_background">
<tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td width="150" valign="top">


<td>
<td valign="top" width="100%">
<img src="http://www.bm3w.co.uk/ubbthreads/images/top.gif" alt="" border="0" width="150" height="16" /><?
include "g:/webs/www.bm3w.co.uk/public_html/ubbthreads/addons/tuningads.php";

?>

Last edited by MattUK; 09/27/2007 11:25 AM.

Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
I assume you tested this code also "out of the box"?


[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
It worked fine in 6.5 as thats where its from in one of the alternative headers.


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
Is the last line correct?
Quote
<?
include "g:/webs/www.bm3w.co.uk/public_html/ubbthreads/addons/tuningads.php";
?>
Should it not be more like:
Quote
<?php
include ("/webs/bm3w/public_html/ubbthreads/addons/tuningads.php");
?>

Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Do you have an example of something in one of these so I can have a look?


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Even if I JUST add

<?php
include ("/webs/bm3w/public_html/ubbthreads/addons/tuningads.php");
?>

I get an error when I save it


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
If I just wanted to display a simple line of text in a box, what would you use, ill try that.


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
Hmm, it uses includes halfway, can't do that in the body part of a custom island. You have to split code from tekst.


[Linked Image from siemons.org]
Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
Originally Posted by MattUK
Even if I JUST add

<?php
include ("/webs/bm3w/public_html/ubbthreads/addons/tuningads.php");
?>

I get an error when I save it

The same error as before or a different one?

Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
The same error.


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Just to be clear, the error occurs when you save the custom island in the control panel


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
In the general forum here there is a custom island that appears with some simple text in, can someone let me know what syntax is in that and ill try that.


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Here's one that will just print "Hello"

Code
/* PHP CODE HERE */

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

Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
Please read my post again on splitting php code from what you display. Since I don't know you include, I can't really be more helpful at this moment.


[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Thank you.. I'm going to have a play.

Need to get ready for my flight to New York shortly too.. coming over to see you guys smile


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Parse error: parse error in G:\webs\mtorque\public\ubbthreads\cache_builders\custom\portal_box_1.php on line 9

As well as posting what you tried to put in there please post what actually got into the file on the hard drive. It would be helpful to see what you tried to put and what actually got there. Maybe it got truncated. Maybe something didn't get escaped properly. Would be nice to see.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
It looks like you're not posting your code between the eof lines in the default CI, instead it looks like you're simply erasing the content in the box and pasting in your new code, which will throw out an error...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
2 members (Nightcrawler, Ruben), 878 guests, and 139 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)