Basic Tips for Editing Custom Islands · Blog

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 */

Posted By Gremelin Posted on July 24, 2009

Comments

( Posted)
Request a Quote
Please feel free to Request a Quote at any time.

By requesting a quote you allow us to adjust pricing for your product on a per-project basis. Note that most of the prices on our pricing page are just our "common" pricing and can vary on a per project basis. It will also allow us to add any per project discounts where we see fit (non-profit organizations, affiliations, etc).

If your "type" of project isn't listed in our menu's to the left, please Request a Quote; we can do much more than what is listed however building pages for it all would take a great while.
Hosting
We utilize BlueHost and StableHost for the hosting of our all of our Virtual Private Servers, the go to hosts that we recommend to every one of our clients, friends, and family. For more Web Hosting recommendations, please see our Recommended Hosts page!

StableHost Web Hosting
Buy Us a Coffee