October 1st, 2009
I’m a big fan of using sprites for navigation menus. While they don’t offer the flexibility of a solely HTML & CSS menu due to the fact that you have to create a new graphic every time you want to change a menu item; sprites do offer you infinite styling possibilities limited only by your creativity with graphics software. Apple’s website is a well-known example of a sprite-driven nav menu, so I’ll use that as the inspiration and walk through how to create something similar.
Read the rest of this entry »
Tags: CSS, HTML
Posted in Tutorials | View Comments
September 11th, 2009
Two years ago I found myself writing a photo gallery application for a custom CMS that allowed you to upload, crop, caption, group and sort your photos for the site’s online galleries. I remember thinking to myself what a chore it was to be reinventing the wheel—there are already excellent free services available that provide this functionality. I wanted the ability to have my client use Picasa to manage his galleries, and view them via SlideShowPro (SSP) on his site. At that time however, support for Picasa’s RSS feeds was not available in SSP.
Read the rest of this entry »
Tags: PHP
Posted in Utilities | View Comments
August 30th, 2009
I’ve been in the position of having to take an unnormalized database that had virtually no data validation or standardization in place, and migrating it to a completely different, normalized schema. I wielded the power of regular expressions (regex) to help me through the process.
Read the rest of this entry »
Tags: PHP, Regular Expressions
Posted in Code | View Comments
August 23rd, 2009
In the past, I hadn’t given much thought to NULL vs. empty string when dealing with blank fields in my database. If something was empty, I would just set it to $field = ''; and insert it. This is bad for a few reasons—but most importantly the database doesn’t see an empty string as an empty field, but rather a string with no length. When using COUNT, it sees empty strings and other data as one and the same.
Once I started using NULL values in my DBs, I found the PHP more cumbersome when doing inserts.
Read the rest of this entry »
Tags: MySQL, PHP
Posted in Code | View Comments