Blog

Adding a javascript file to a specific page in Drupal 6

I have been guilty of loading a javascript file in a theme's .info file (where it is loaded on every page) when I really needed to load it on a single page of a site.

So here is a way to load a javascript file on a specific page. You may be tempted to try the preprocess_page function but its too late in the rendering process. The function to use is just preprocess:


<?php
function YOURTHEMENAME_preprocess(&$vars, $hook) {
$node = menu_get_object('node');
if ($node->nid == 72) {

Setting time on Ubuntu server

I had a lot of trouble setting my Ubuntu server's system clock. date, ntpdate, and the ntp severver daemon will are failing to set the date/time. Apparently if you are running linux with 2.6.18 kernel you need to detach from the host's clocksource

Add multiple files to SVN repository

This saves headaches.


for i in $(svn st | grep "?" | awk '{print $2}'); do svn add $i; done;

found via http://blog.chrisramsay.co.uk/2009/02/09/add-multiple-items-into-svn-rep...

Learning Drupal 6 Module Development - A Review

Learning Drupal 6 Module Development

Packt Press was kind enough to send me a copy of "Learning Drupal 6 Module Development" by Matt Butcher. After being slightly disappointed with their Drupal 6 Themes offering, I find this book to be a superb introduction to building modules in Drupal 6. I usually approach Drupal as a themer so module development is somewhat new to me (although I have written a few small glue modules).

Drupal 6 Themes Review

Drupal 6 Themes by Ric Shreves is an update to his Drupal book of the same title.