December 2008

Building out Drupal module interfaces with a stub function

A technique that I’m finding quite useful during module development is to create a “stub” function for use as a generic interface callback for menu items that I want to define, but haven’t yet written callbacks for. For example, if I were building a Drupal 5 module called widgetmaster, I would define:

read more

Searching the Drupal Database by Regular Expression

I found myself wanting to use regular expressions to find some imported Drupal nodes containing broken old image paths. Naturally, I went looking for a module that might accommodate me and I did find the Scanner module. Unfortunately the site I was working with is in Drupal 6, and I didn’t have the time to work on a Drupal 6 port of what looks like a pretty sophisticated module just to find a few nodes.

read more

GMail Aliases for Testing Multiple Drupal User Registrations

One of GMail’s handier features that people are still surprised to learn about is the ability to make multiple, unique address aliases on the fly.

If your GMail address is example@gmail.com, emails sent to example+user1@gmail.com, example+user2.gmail.com, example+admin@gmail.com will all go to the root example@gmail.com address.

read more

Modifying CCK fieldgroups with hook_form_alter()

I was writing a module to conditionally hide a fieldset on a CCK node editing form based on whether the user is logged in or not, and for a while I was very puzzled as to why my custom module’s implementation of hook_form_alter wasn’t seeing any of the fieldsets defined by the CCK fieldgroup module.

I searched Google for the terms ‘cck fieldset hook_form_alter’, which led me to a helpful tip from Benjamin Melançon:

read more

Syndicate content

Twitter

  • @ernestkoe basically this script with duration set to 25 minutes, and limited to tracks 3 minutes & under: http://t.co/bupgfBH 2 years 46 weeks ago
  • @ernestkoe has got me digging Pomodoro. I modified one of my iTunes applescripts to make me nice 25 minute playlists. 2 years 46 weeks ago
  • @tommysalami I'm planning to tear it down and make a static site with links to activity streams elsewhere; it's hardly a destination. 2 years 48 weeks ago
  • @tommysalami I think you may be the one person on the internets subscribed to my RSS feed. That was the first thing I've posted all year! 2 years 48 weeks ago
  • Possibly the most simultaneously hilarious and disturbing video you'll watch today. http://sgp.cm/6f9b89 2 years 49 weeks ago

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key