Previous Thread
Next Thread
Print Thread
Hop To
Basic Tips for Editing Custom Islands #227829 07/24/2009 9:05 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline OP
UBB.threads Developer
OP Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
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.
Need to Upgrade?
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!
Express Hosting
Re: Basic Tips for Editing Custom Islands [Re: Gizmo] #246170 10/03/2011 6:02 PM
Joined: Dec 2003
Posts: 5,940
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,940


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

Additional Resources
UBB Developers
UBB Wiki
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Strange Merge Issue
by Baldeagle - 08/16/2019 3:37 PM
Formatting Links
by Ty Griffin - 08/13/2019 4:39 PM
Changing from iso-8859-1 to UTF-8?
by Daryl Fawcett - 08/13/2019 9:58 AM
Threaded Mode
by ToddUGA - 08/10/2019 9:18 PM
Who's Online Now
0 registered members (), 46 guests, and 209 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
M4TT
M4TT
Canada, SK
Posts: 87
Joined: March 2015
Show All Member Profiles 
Forum Statistics
Forums34
Topics35,320
Posts192,715
Members11,865
Most Online2,569
Jul 27th, 2019
Random Gallery Image
Latest Photos
The Sky
Land Rocks
Cozy Places
Trees
Powered by UBB.threads™ PHP Forum Software 7.7.3