Blog


bxSlider loses width when hidden & resizing the window

A bit of a title that: bxSlider loses width when resizing the window while bxSlider is hidden. Problem: bxSlider loses width when hidden. Exactly. I have a header in which i have a bxSlider (using a ul lists of li’s), this header is toggle-able (show/hide) by the user. When the user hides the header (and […]




codeigniter form validation callback

codeigniter form validation callback, when validating forms i need to check something other than just required, or a max length, or any of the default (and very good) built-in filters. i need to check a user login, so need to: define some validation rules (config below), create a callback function, and set a validation message. […]




css gradient builder

Found a great plugin – ClassyGradient, and it’s great. really great. exactly what i was looking for, for a new project. i have extended it to allow checkboxes to choose which lines of css to output (with or without each of the proprietary prefixes). as i was integrating, i needed to update the output after […]




php session save path permission denied

seems an update in plesk overnight (twice in the last few weeks) has cocked up the php session_save_path: no websites were able to write any sessions, so nothing added to baskets… angry customers… ahem. not sure whether i’m blaming plesk just yet, i’m investigating. but the problem in all error logs is: [code]mod_fcgid: stderr: PHP […]




configure sendmail on mac os x

Unable to send email using PHP mail()? Learn how to configure sendmail on mac os x… Open up /etc/php.ini and set the sendmail_path: [code] sendmail_path = "/usr/sbin/sendmail -t -i" [/code] then restart apache: [code] apachectl restart [/code] if you try sendmail… [code]sendmail[/code] you will get an error: [code] sendmail: fatal: chdir /Library/Server/Mail/Data/spool: No such file […]




firefox input button extra mystery padding

The case of firefox input button extra mystery padding. Firefox can be annoying. it seems firefox addes extra padding to button elements (or input type=”button”) that does not identify itself and cannot be removed using normal css… what? yes: this is the fix for the firefox input button extra mystery padding [code] .button::-moz-focus-inner { border:0; […]




CodeIgniter Template the easy way

New to codeigniter template, I’m  just looking at codeigniter (one of many i’m playing with) as a potential framework to adopt, immediately found no built-in way of using a whole html document as a template (unless i’m missing something?) – are there no easy codeIgniter template options? There are loads of codeigniter template extensions and […]




Google Analytics for Tracking Hash URLs

It’s surprisingly simple to use Google Analytics for Tracking Hash URLs really. I needed to track each “page” as it was viewed, but being a hash url driven website of course google analytics (by default) only recognises the “index”, seeing as its essentially a “one page website”. No good to anyone… So a simple one […]




Include local file in Ruby

Yes, took me a while to find out i didn’t need “include” or “require” (coming from PHP), and so learned that all i needed was to simply use the File class and its open method… [code] f = File.open("inc/some.html"); f.read(); [/code]