Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
5 registered (Mike L, Bjab, Gizmo, Dunny, SteveS), 20 Guests and 18 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 255
Top Posters (30 Days)
Ruben 62
SD 54
Gizmo 48
gliderdad 33
Dunny 21
driv 18
dbremer 16
Iann128 14
Stan 14
Mark S 13
Latest Photos
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Gizzo Marx
Topic Options
#227829 - 07/24/09 09:05 PM Basic Tips for Editing Custom Islands
Gizmo Online   cat

Registered: 06/05/06
Posts: 14904
Loc: 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 */
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
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."
#246170 - 10/03/11 06:02 PM Re: Basic Tips for Editing Custom Islands [Re: Gizmo]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
Or visit ubbwiki.com at:
http://www.ubbwiki.com/index.php?title=Special%3ASearch&redirs=0&search=custom+islands&fulltext=Search&ns0=1


Edited by Ruben (10/03/11 06:03 PM)
_________________________
Blue Man Group
Top



Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Edit Post
by Bert
01:19 PM
A positive note
by SteveS
09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10213 Members
36 Forums
33667 Topics
180917 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image