Drupal

Introduction to Git for Drupal

Posted on June 23rd, 2010 by David Luhman and tagged , .

Here's a PDF copy of the presentation I'll be giving at DrupalCamp Colorado in June, 2010.

Introduction to Git for Drupal

How to override the "formatting tips" section in Drupal's node creation

Posted on May 27th, 2010 by David Luhman and tagged .

Drupal provides some "formatting tips" just before the submit button when creating nodes.

Sometimes you want to override this text to provide your own "tips" for node creation. Here's how to do this :

In your theme's template.php file, add the following function :


function phptemplate_filter_tips($tips, $long = FALSE, $extra = '') {
return 'Your tips here';
}

Also see this post : http://drupal.org/node/35122

Installing and using Drush Make

Posted on May 2nd, 2010 by David Luhman and tagged , .

Drush and Drush Make are two great utilities for folks who use Drupal.

Here's how to setup and use Drush Make :

Create a ~/.drush directory and download Drush Make to there :


  $ cd
  $ mkdir .drush
  $ cd .drush
  $ wget http://ftp.drupal.org/files/projects/drush_make-6.x-2.0-beta6.tar.gz
  $ tar -xvzf drush_make-6.x-2.0-beta6.tar.gz
  $ cd /var/www/yoursite
  $ cat makeYourWebSite.txt
     core = 7.x 
     projects[] = drupal 
  $ drush make makeYourWebSite.txt

DrupalCon SF 2010 Day Two Notes

Posted on April 20th, 2010 by David Luhman and tagged .

Batch vs. Queue : An API Smackdown

Drupal 7 will use OO for cache and queue systems.

- createQueue
- createItem
- claimItem
- releaseItem

SystemQueue => MySQL
MemoryQueue => in-memory one request
BatchQueue extends SystemQueue

Use Drush for cron-based batch operations

Use queue to queue for later

I think the "Batch" API is somewhat misnamed. It's intent is to "batch up" and provide feedback DURING AN INTERACTIVE SESSION (ex. upgrading a site). To really batch big jobs, use the Queue API.

DrupalCon SF 2010 Day One Notes

Posted on April 19th, 2010 by David Luhman and tagged .

Unconference by Seth Cohn - Views Default Args

Grab Views default arguments by setting variables with Context module.

http://drupal.org/project/views_arg_context