CSS Print Media Query

Using the @media rule in your CSS allows you to target different media types, and screen sizes, from a single stylesheet. Using media queries with max-widths is integral to the current push towards responsive design. This can also be used to create your print styles using @media print. You'll notice this used on modern base-templates such as the HTML5 BoilerPlate:

Yii 1.x Framework Intro: Starting a New Database-Driven Website

In creating my first Yii application, there were a few hurdles and stumbling blocks along the way. One of the first guides/tutorials that a new user to the Yii PHP framework is directed to is the "Creating Your First Yii Application" in the "Definitive Guide to Yii" . This is kind of a companion piece that has extra explanation, plus the first steps I made to start turning the example app (generated skeleton) into my custom web application.

Website Build Guidelines for Freelance Developers in 2011

While managing a few projects that were built by freelancers, I came up with a list of guidelines for the build and for WordPress used as a CMS. I've added reminders to it based upon the mistakes that fly in the face of what I consider a "good" build. Note that some of this is a matter of preference and opinion. I thought I would put this out there as a starting point for anyone trying to put together their own guidelines...

Create a New WordPress Admin User from PHP

If you're locked out of WordPress and can't reset your password, the official docs list several options that allow you to access your administrator account again. But what if you want to create an entirely new admin user? For blogs that I have FTP access to, but no working WordPress password, I threw together the following script to create admin users.

Launching a Codeigniter v2 Site: Steps to Disable Database Errors

Turning off error reporting is often mentioned as a standard security precaution when switching to a production environment. After all, you don’t want those precious database table and field names out in the open, for sneaky little hobbitses to view. If someone is rummaging through your site, trying to find vulnerabilities, this severely limits the […]

Using Custom Post Types for Repeated Content/Includes in WordPress

Most sites contain areas of text and HTML that are repeated throughout the site. Links in the footer, copyright information, a button or phone number in the header, or some other static content. If you're a developer working on your own site, then you may just keep this in an include file and edit the code manually. If you're using Wordpress as a CMS for a client, then it's a good idea to make these areas of text/images editable, so that they can have full control of their site.

Remove All Spam Comments from a WordPress Blog

Recently I had to transfer all the blog posts from an old 2.4 version of WordPress, to a new 3.0 install. After I exported the content (via Tools > Export), and tried to import it into the new blog, the importer froze up and never completed. I was surprised to notice that the XML file was 50MB. Opening up the file in Notepad++ revealed that this was all spam. Apparently the blogs spam comments had never been deleted and there were over 10,000 spam comments!

Notes from the 2010 Front-End Design Conference

On July 23rd, 2010, I attended the Front-End Design Conference; "A single day design conference focused on content, presentation and behavior". The all-female lineup spoke to a packed room at the Hilton Bayfront in St. Petersburg, FL about branding, ideas, design, CSS, and Old Spice commercials. Sarah Parmenter even flew over from across the ocean to speak about designing apps for the iPhone...