Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
3 registered members (M4TT, mmkk, Gizmo), 68 guests, and 271 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
isaac
isaac
California
Posts: 1,004
Joined: April 2004
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
FREAK 11
M4TT 10
Ruben 5
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Basic Tips for Editing Custom Islands #227829
07/24/09 08:05 PM
07/24/09 08:05 PM
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
Gizmo Online tapedshut OP
UBB.threads Developer
Gizmo  Online Tapedshut OP
UBB.threads Developer
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
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.
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
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Basic Tips for Editing Custom Islands [Re: Gizmo] #246170
10/03/11 05:02 PM
10/03/11 05:02 PM
Joined: Dec 2003
Posts: 5,824
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,824
Lutz,FL


Blue Man Group


There is no such thing as stupid questions. Just stupid answers

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
I want to update forum but can't find license
by dimaninc. 11/23/17 10:51 AM
Forum Statistics
Forums36
Topics35,014
Posts190,533
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)