Getting more out of the Custom Island Editor
The UBB.threads custom islands are a good thing and there’s is no doubt about it!
With that said, I always like to do a little tweaking to get more out of the editing process.
This article will show you how a small modification can accomplish just that.
Edit the file templates/default/admin/editcustomisland.tmpl and look for these lines:
</td><td width="50%" class="paddingtop paddingbottom autorow colored-row" valign="top" align="left"> <input type=text name = "portal_name" value="$portal_name" size="40" /> </td></tr>
The key line of interest is line number 2. This is set as an input type=text (not w3c compliant by the way ;) ). We want to give ourselves some more room here, because a Custom Island name is more than just 1 line of plain text! Check out the before picture:
It’s full on HTML markup and in many cases on my site, I have a lengthy amount of stuff to put there. The PORTAL_NAME field in the database allows up to 255 characters even!
Given that fact, we’re going to use a textarea instead. The resulting code is shown below:
</td><td width="50%" class="paddingtop paddingbottom autorow colored-row" valign="top" align="left"> <textarea name="portal_name" cols="50" rows="8" />$portal_name</textarea> </td></tr>
Upload the file and you can see the difference:
Kinda make a difference for me and I hope it does for you. FYI, the above example contains 220 characters, so we got close to the 255 limit.
One quick note that I forgot to mention is that there is a second textarea below for the actual code. Since there is so much horizontal space available, I widened it to while I was in the file from 60 to 80 columns (cols). Code below:
<br /> <textarea name="portal_body" cols="80" rows="50">$portal_body</textarea> </td></tr>
Feel free to give it a whirl :)
Extra credit:
- Add a custom island preview to the process to provide instant feedback on how your island will look before you ‘go live’.
- Add a little javascript that shows your your current character count as you go.
I will add these to the article in bit, if some geek doesn’t come along and supply the answer ;)
Comments are closed.