Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
This short entry is geared towards giving you some basic pointers on editing custom islands; this covers a couple very common issues that people have (either accidently removing portions of the stock code to make the island not work, or by placing their code in the wrong places, or issues in referencing php code in the html area).

Your stock custom island looks like this:
Code
/* PHP CODE HERE, IF NECESSARY */

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

Editing it isn't too difficult, any PHP code you'd enter would go under the PHP notice; any text or HTML you'd want to show would go under the line:
Code
$body = <<<EOF

And above the line:
Code
EOF;

It is very important that you don't modify these lines; by removing or "adjusting" the stock portions you will likely cause the island to no longer load (properly) and to fix when it's broke you'll either have to edit the file manually on the server (Pre 7.5) or in the database (Post 7.5).

The island itself is parsed through the smarty template engine; so when "calling" any php code in the html (body) area you won't need to use an "echo", you'd simply just reference the php such as:
Code
/* PHP CODE HERE, IF NECESSARY */
$date = date("l, F jS Y");

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


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: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 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)