Drupal

Drupal map sites/default to sites/example.com

with terms

If you're developing a Drupal site on your local box that uses a domain specific folder in /sites then you'll probably run into all sorts of problems running the site as http://localhost.  One way to get around this would be to edit your hosts file and setup an alias in apache.  A simpler solution I have found, however, is to simply make a symbolic link from sites/default to the sites/example.com folder.  You can even do this easily on windows now with mklink.

Theme Drupal 6 Search Results

with terms

In drupal 6, the variable $result is available in search-result.tpl.php.  The commented section at the top of this file makes no mention of this variable, so if you want to do something as simple as showing the created date on a node instead of the modified date, then you're in for a bit of researching (unless you read this blog post!).
 
So, if you want to modify how search results are displayed, then you need to:
1) Copy search-results.tpl.php and search-result.tpl.php from /modules/search to your theme's folder.

Bringing CKEditor to Drupal 5

At the moment, there is no pre-packaged way to add CKEditor to Drupal 5.  The following is a result of my attempt to port the Drupal 6 wysiwyg module's CKEditor plugin to the Drupal 5 version.  It's ugly, but accomplishes my goal of getting CKEditor going in D5 without having to create a new module from scratch or try to port the rather large D6 module for CKEditor.
 
Step 1) Create ckeditor.inc (this is based off the D5 version of fckeditor.inc and the D6 version of ckeditor.inc), and place it under wysiwyg/editors
 

My new favorite Drupal module

I recently discovered the Contemplate (Content Template) modules for Drupal. Wow, is it ever a handy little module. Contemplate allows you to create php templates for specific node types. You can create a template for one or all of the following : Body, Teaser, RSS. The great thing about creating node type specific templates in contemplate is that they are theme independent. You no longer have to create a .tpl.php file for that node type in all of the themes that might be in use.

Thanks To Microsoft For This Little Gem

I was happily coding along today when I noticed a site I was working just looked weird in IE.  An hour and a half later I stumbled across a post on Drupal.org about IE ignoring more than 30 stylesheets.  And sure enough, they did this on purpose : http://support.microsoft.com/kb/262161
 
WHY WOULD YOU DO THAT!
 
Ok - decision made.  My next computer will be a Mac.

Five Tools Every Freelancer Should Have

Maintaining a professional operation without breaking the bank is crucial to freelancing.   I have found these tools to be invaluable to my business and hope that you try them for yourself.  Note that some of the links below have affiliate codes in them, but I am not otherwise being asked or compensated to write reviews for these services.
 

Testing Drupal with Watin : Watching For Errors

with terms

The following class can be used to override the standard IE object in WatiN to run specific tests after every page load.  For example, in Drupal this class can be used to make sure that no error messages appear on any page during the test run.
 

Adding a multiple user autocomplete field to Drupal

with terms

The drupal user_autocomplete function is very handy for form fields where you are entering a single username.  But what about cases where you want your users to be able to enter multiple usernames?  Turns out that this is very easy to do without having to write any JavaScript.
 
drupal autocomplete field, multiple usernames

Adding a select all checkbox to your drupal form.

with terms

The following snippet can be useful in adding a "select all" box to your drupal forms (5.x - with or without jQuery update).  Note that the code is careful to not check or uncheck any boxes that are not part of the immediate form.
 

Syndicate content