24th
JUN

List duplicate database queries in CodeIgniter

2 Comments

Posted by Lee under CodeIgniter, CodeIgniter Libraries, Programming

Sure we all like to think that we’re masters of our code but there does come times that you may not realise a database query (usually from a model) has been duplicated a few times. Sure it’s no big problem but when it comes to optimising your website this is one of the first things I would start hunting down to increase performance of a site - you’ve already got the dataset once so why do you need it again if it hasn’t been changed? Read the rest of this entry »

17th
JUN

Darken or lighten colours dynamically using PHP

1 Comment

Posted by Lee under Programming

For a recent client’s site we needed to have a function that would be able to darken a given hex colour (eg. #f4129c) on the fly (it was changing the border colour to be darker then the background colour). It took a while to find anything that could remotely do this as many samples seemed to have flaws with certain colours. We also decided to make our own function able to make a colour lighter as well as darker. Read the rest of this entry »

13th
JUN

Get HREF attribute keeps on returning absolute link not relative link

0 Comments

Posted by Lee under Programming, jQuery

Whilst working on our new Image Manager in Breeze we came across an interesting bug that was causing images to be incorrectly linked to in the editor due to Internet Explorer (IE6 & IE7 intermittently) returning the wrong HREF value for a link. Read the rest of this entry »

8th
MAY

I hate Timezones (and maybe Daylight Savings as well)

0 Comments

Posted by Lee under Programming

No I wasn’t late for a meeting due to differing timezones, but it is official I hate dealing with timezones - infact it was from the first day I had to do any programming related to timezones that I hated working with them.

A lot of these problems stem from building websites (more specifically our Breeze CMS) that need to cater for visitors that can visit from different timezones and need to see data being shown in their current time. You can also face issues if your hosting provider is located outside of your timezone. But not to worry - we have come up with some solutions to these problems as I have spent forever trying to get my head around the issues we have faced.
Read the rest of this entry »

29th
APR

Handy unknown feature in PHP function explode()

2 Comments

Posted by Lee under Programming

I accidentally came across a mighty handy feature in the PHP explode() function today whilst doing an update to Breeze CMS that I cannot see documented anywhere. It certainly saved me what would have been a full re-write or reconsideration of the function I was writing! Read the rest of this entry »

The Lab is the web development blog for Clear Pixel that covers many subjects from PHP, CSS, jQuery, CodeIgniter, Design and XHTML / HTML