I struck upon a wonderful little idea which I’ve implemented in a simple plug-in I’m writing for a project I’m currently working on.., add a ‘variable_prefix’ parameter to your plug-in or module… allow devs using your add on to opt to have variables prefixed with any value.
This is really useful if your add on might have variables which conflict with another add on or native ExpressionEngine variables. This could also allows a dev to nest once instance of your plug-in in another without having to resort to embeds, they simply specify a tag prefix for the outer tag pair.
Don’t get me wrong, I love Expression Engine but sometimes you just come up against a brick wall and the only solution is to either pay someone to write a very clever extension or hack the system files about yourself (not for the faint hearted!).
During a recent project I needed to implement some basic member functionality and add some custom profile fields for the member accounts. No problem, Expression Engine has this covered. But (You knew there was going to be a but) it only provides support for text input, text area and select field types. Boo!
I ‘needed’ to be able to present users with a greater variety of input types such as checkboxes and radio buttons.
So, with a little help from the fanatical EllisLab staff I set about ‘hacking’ that very feature into the product.
I’ve documented the steps that I took in a Wiki article on the Expression Engine website. :)
For further discussion on this topic please also see the related Expression Engine discussion forum thread.
No rocket science here but I thought I’d blog this for my own future reference. Just a handy little script to have about.
function toggle(elementID){
var target1 = document.getElementById(elementID)
if (target1.style.display == 'none') {
target1.style.display = 'block'
} else {
target1.style.display = 'none'
}
}
Just give the element you want to ‘toggle’ on and off an ID and then pass that to this script.
<a href="javascript: toggle('track_list_2');">Show/Hide</a>
That’s all. :)
After my recent rant about having to edit CMS templates via a browser text field I think I have perhaps stumbled across Expression Engines best feature yet. It is for sure going to save my sanity.

Get the low-down on how to use the ‘Save Template as File’ feature right here. In the Manual no less, I know… RTFM!
I’ve been having a very interesting time during the past few days discovering what a total mess Microsoft has made of IE6 with the XP SP2 upgrade. Let me begin the story.
A few years back I wrote a simple HTML based Catalogue CD-ROM for a client. This provided users with an interface through which to navigate a large number of PDF documents. Recently they approached me to give this a bit of an update. The old version had a tree based navigation structure consisting of a number of interlinked HTML pages which displayed the contents of each branch.
Being as we now have modern web browsers that support XHTML and CSS I thought I’d bring things up to date, and simplify the maintenance process by incorporating the entire tree structure in a structured unordered list and then use some simple JavaScript to toggle the visibility of the branch elements. Sound slike a plan right? Yes.
Not long after getting something up and running I did some initial tests in both Firefox and Internet Explorer, all seemed good. I emailed a ZIP archive of the ‘work in progress’ over to the client for approval.
I hear back from the client that she’s getting a ‘Active Content’ warning in IE every time she trys to launch the HTML file.
To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer.
Hmm, ok. I open up IE, revert my setting to default just in case and test again. Lo and behold, I get the warning too.
So, what’s changed in IE6 following an upgrade to XP SP2? Well, to fill a number of security holes which might allow someone to execute code locally on your machine whilst browsing the web, Microsoft have opted to lock down and prevent any active content from running on your local machine at all (rather than fix the holes). Of course a user can ‘allow active content’ to be run on the local machine, but in most cases users will be freaked out by the dire warning which they have to manually over-ride.
Microsoft offer 3 solutions to this problem, but none of them are acceptable.
*1. Ask users to turn off local machine security*
Ok, I can’t really see any clients agreeing to that approach.
2. Add the ‘“Mark of the web”:http://www.phdcc.com/xpsp2.htm#markoftheweb’ to all your HTML pages
No good as links to other file types don’t work. I can’t add an HTML comment to a PDF document now can I.
*3. Wrap your application in an HTA file*
This is IE only, Users without IE set as the default browser are out of luck if they try to run my clients CD-ROM.
So, what can you do if you want to run an HTML based application off your local machine without having to resort to any of the above.
After a bit of digging I came across a fantastic little product called ‘“Server2Go”:http://www.server2go-web.de/’. This is a fully functional free Apache web server that you can drag and drop onto a CD-ROM. This allows you to run your HTML application ‘through’ a real web server which exists only while that browser session is open, so to all intents are purposes your users are browsing ‘online content’ and so IE is quite happy to execute JavaScript and other Active Content.
Problem Solved! :)