Archive for the ‘Tech’ Category

Behind the scenes of the new CIPR site

We present a detailed overview of the way we built the CIPR’s new website using Drupal. Find out what modules and techniques were used to create all the main user facing features of the site, and the technical architecture that is serving it.

Thoughts on CSS transitions in Firefox

To produce the CSS3 ticker plugin for jQuery that I’ve been working on recently, I used CSS3 transitions. These are the magic new properties in CSS that make a browser animate elements without using JavaScript.
The logic for implementing native animations in the browser is a no-brainer, particularly if you try and use a site [...]

Smooth CSS3 ticker jQuery plugin

I’ve recently been building a status display for the Assanka office, which shows us information like current Zabbix monitoring triggers, support requests from clients, Pingdom status alerts, and even naming and shaming Assankans who’ve failed to file their time-sheets on time.
In the process, I was pointed at the gorgeous Panic status board. Our objectives [...]

Blocking events with blocker lists

It’s often useful to be able to detect scroll events using the onscroll event handler in JavaScript. For example, every time a user scrolls to nearly the bottom of the page, you load more content to create an ‘endless’ page. In my case, I have two DIVs set to overflow: auto, with chat [...]

Disappearing text cursor in Firefox

Do you ever find that sometimes when you try and type into a textbox, there is no cursor there, but it still accepts your input and the text appears as if there is a cursor? I came across this problem in Firefox 3 and searching online revealed only solutions to an earlier problem that [...]

Validating HTML input in PHP

It’s often the case that as web developers, we need to ‘clean’ input from end users to ensure it does not contain any nasty formatting or script that we don’t want to allow on our sites. Forums in particular often suffer from either security holes that allow cross site scripting attacks (XSS) or are [...]

JSON2.js vs Prototype

We use Douglas Crockford’s json2.js frequently in our web apps. Its stringify method allows JavaScript data structures to be trivially serialised before submission via AJAX to a web service. It works by descending through the structure, calling the toJSON() method on anything it finds. It also creates toJSON methods for data [...]

Personal data in cookies

Personal data in cookies is bad. I accepted this for quite some time, until I actually stopped to think about it, and realised how much simpler our scaling would be if we could store a lot more state information in cookies.

Auto growing textareas

This feels like a topic that’s been explored to death already, but I really don’t like most implementations of this technique, so here’s how we do it.
First, in case anyone has just arrived from Mars, or even more unlikely, isn’t familiar with Facebook, the auto-growing textarea is a text box that gets bigger as you [...]