|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
Could you copy the content of your custom island here? This is my sample: /* 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.
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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.
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
I assume you tested this code also "out of the box"?
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 225 |
It worked fine in 6.5 as thats where its from in one of the alternative headers.
|
|
|
|
Joined: Dec 2006
Posts: 1,235
veteran
|
veteran
Joined: Dec 2006
Posts: 1,235 |
Is the last line correct? <? include "g:/webs/www.bm3w.co.uk/public_html/ubbthreads/addons/tuningads.php"; ?> Should it not be more like: <?php include ("/webs/bm3w/public_html/ubbthreads/addons/tuningads.php"); ?>
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 225 |
Do you have an example of something in one of these so I can have a look?
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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.
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
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.
|
|
|
|
Joined: Dec 2006
Posts: 1,235
veteran
|
veteran
Joined: Dec 2006
Posts: 1,235 |
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
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 225 |
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 225 |
Just to be clear, the error occurs when you save the custom island in the control panel
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Here's one that will just print "Hello"
/* PHP CODE HERE */
/* BODY HERE */
$body = <<<EOF
Hello
EOF;
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
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.
|
|
|
|
Joined: Jun 2006
Posts: 225
enthusiast
|
enthusiast
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
|
|
|
|
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.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
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...
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
2 members (Nightcrawler, Ruben),
878
guests, and
139
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|