Drush is my friend

March 4th, 2010

Drush (Drupal + Shell) is a set of scripts that lets you control your Drupal site directly from the command line. Without every touching your mouse you can clear the cache, do an SQL Dump ,and even download and enable modules directly from drupal.org.

Since inserting Drush into my workflow I've saved hours of downloading modules and adding them into my svn repositories (drush dl); grabbing top-level information about my sites (drush st); and even running some quick code snippits (drush eval).

Sooo good.

Drupal Modules: PathAuto

August 16th, 2009

PathAuto is an elegantly simple module. It lets you create automated alias rules so that your URLs remain relevant and seo friendly based on node types. For example, on this site I have pathauto setup to create a /blog/title-of-post. More correctly I have pathauto setup to create /blog/title_post by using its built in mechanism for omitting certain words from the automated URL alias.

Managing and deploying Drupal sites using SVN & MAMP

July 19th, 2009

It's simple: Drupal + SVN = happy web developer.

This is the story of how I generally structure my Drupal based sites using Subversion (SVN) to make development, versioning and deployment easy and well-organized. A quick note: this post assumes that you already know the nitty gritty of how to use SVN and the basic setup and structure of a Drupal-based site.

CSS Pseudo Classes

July 5th, 2009

CSS3 has been floating around out there for a while but it still hasn't gotten a foothold - which is unfortunate. One feature that will change the way you think about your CSS is support for massively more-powerful pseudo-classes. Currently we stylers are limited to :hover and in most cases :first-child & :last-childIf you regularly use jQuery or at least look through the docs you know that there are some other pretty powerful options that would make some of CSS sweater.

Decenders and Internet Explorer

June 19th, 2009

I didn't need another reason to hate Internet Explorer but I found one. It turns out that if you use certain fonts at certain sizes in IE then the decenders get cut off. Ok, lets break that down.

Decenders

A decender is the part of a letter (typically a lowercase letter) that drops down below the baseline. Here are the usual suspects: g,j,p,q,y. On occasion you may come across a font that include some other decenders but they are rare, and they are certainly not web safe fonts.

CSS Sprites

June 8th, 2009

CSS sprites have been around just about as long as CSS has been around - they just haven't been called that. And recently they have matured into a more viable technique that can help speed up your site. So let's begin at the beginning... To explain CSS sprites I'm going to ask you to imagine a typical horizontal navbar... if you don't want to imagine, here is an example:

Drupal Modules: Backup & Migrate

June 4th, 2009

When I first installed the backup & migrate module I was just looking for a quick and easy way to backup the database of one of my Drupal-based sites and it served that purpose well (even letting me schedule backups), but I didnt realize how useful it would be to my development process. Here's what I mean… My usual development process usually goes something like this:

HTML tags you never knew about

May 28th, 2009

Ya know that DOCTYPE declaration you put at the top of all your webpages? It usually looks something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">. We recently I had to take a close look at the XHTML 1.0 specs so I started with the actual dtd listed in my DOCTYPE declaration. There I discovered a whole bunch of HTML tags that I never knew were there.

Rounded rectangles with a non-repeating background

May 25th, 2009

One problem I have come across on several occasions is creating a fixed-width rounded rectangle that, in addition to its rounded-ness, has a non-repeating backgrund image. Here is an example of what I'm talking about:

a rounded rectangle with a non repeating bg

So lets start with the rounded rectangle part.  This is the typical html that I might use:

Drupal Modules: Administration Menu

May 16th, 2009

You know that rule about the simplest solutions being the best solutions? Well here you have a module that takes all of your admin tools and places them in a simple dropmenu at the top of every page on your site (for admins only, of course). This module is as simple as they come - no configuration necessary (there are a couple of options if you can't live without fiddling) - but it can save you tons of time when your trying to do some serious site maintainence.