Previous Thread
Next Thread
Print Thread
Hop To
Joined: Sep 2006
Posts: 120
member
member
Joined: Sep 2006
Posts: 120
When inserting php code into a body of a custom island,
ex.
Quote
/* PHP CODE HERE */
$sponnum = 1;
/* BODY HERE */
$body = <<<EOF
<?php echo '<center>';
echo '$sponnum';
echo '</Center>';
?>
<a href=..................
EOF;
The Island works fine.
But when it was saved the "?>" ending the php in the body isn't there anymore and has to be re-entered when the island is edited again.
Then when executed, you get an error.
Quote
Parse error: syntax error, unexpected '<' in /home/lare/public_html/bhweb/ubbthreads/cache/portal_box_7.php on line 14

Am I doing something wrong???

Last edited by Rick; 05/31/2007 4:27 PM.
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
i don't think you can execute php tags in the body like that...

Try:
Code
 /* PHP CODE HERE */
$sponnum = 1;
echo '<center>';
echo '$sponnum';
echo '</Center>';

/* BODY HERE */
$body = <<<EOF
<a href=blahblahblbha>blah?</a>
EOF;


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!
Joined: Sep 2006
Posts: 120
member
member
Joined: Sep 2006
Posts: 120
You can. Try it.


The goal here is to be able to use an idex into an array of URL's and change a graphic depoending on what forum it is.


Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Well, I know its possible, I've never really fiddled much with php in the islands


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!
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Finally figured out the problem here and I had to rework the editor a bit. This will be fixed for 7.2.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Mors), 833 guests, and 197 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 20230217)