CORRECTLY POSTING BOOLEAN VALUES IN JQUERY
When I’m building Javascript/jQuery based webapps, my go-to method of performing AJAX requests is via jQuery .post() using JSON. My code normally looks something like this… var postUrl = ‘/someurl.php’; var postData = {’id’: 123, ‘data’: ‘xyz’, ‘bool’: true}; // … Continue reading
REMOVE THE WORDPRESS ADMIN BAR IN YOUR THEME
I don’t know who decided to include the admin bar by default in your theme/front end when logged in to WordPress, but I find it really irritating when laying out a new theme. I just want to see how my … Continue reading
SET A CUSTOM HOME SCREEN TITLE FOR YOUR WEBSITE ON IOS DEVICES
Here’s a neat little trick I’ve just learned. I’ve been setting up all the different icon sizes on mtvan.com for iPhone and iPad (including retina displays) for when you ‘Add to Home Screen’ and got the icons all working nicely. … Continue reading
TIME ZONE CONVERSION USING PHP DATETIME CLASS
Following on from my post last month about problems with PEAR daylight saving, here’s a quick example of using the PHP DateTime Class which was introduced recently (PHP 5.2). Convert from UTC to Europe/London local time: $time_object = new DateTime(’2011-04-19 … Continue reading
PEAR DATE DAYLIGHT SAVING BUGS
The clocks went forward in the UK last night and fortunately I was working on a site today which involved manipulating dates and times between timezones so I immediately noticed a problem in PEAR Date that I have been using … Continue reading
UK DATES AND STRTOTIME
In PHP, strtotime cannot parse the UK date format (i.e. 30/02/2011) as there’s no 30th month. Here’s a quick fix I came across that seems to work for me (so far)… Just replace the “/” with a “-” before parsing … Continue reading
JQUERY SLIDEDOWN PROBLEM ON IE7
Just run into a problem with IE7 when coding up a fairly complex web form that needs to shrink and grow depending on the amount of detail the user wants to enter. After an hour of fiddling around and a … Continue reading
MOVE YOUR WEBSITE PROPERLY USING HTACCESS
Sometimes you need to move an entire website to a new domain name. There’s lots of ways to do this, but if you’re not careful you might end up losing or confusing visitors (and google). Here’s a quick tutorial to … Continue reading
SWIFT MAILER WITH STARTTLS
I used to use Swift Mailer all the time as it is so easy to setup and configure but about a year ago switched to phpmailer as I had a new mail server setup with starttls that I wanted to … Continue reading
INTERNET EXPLORER CANNOT DOWNLOAD…
“Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.” Seen this before? I have, and I recall it being a bug on IE6. I may … Continue reading