Feed items

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

When Modules Collide

I just encountered a problem arising from a combination of the TinyMCE WYSIWYG module and the FAQ module in Drupal 6.

In a nutshell:

read more

Introducing the Bones module for Drupal: Rapid Site Wireframing with YAML

When I first started using Drupal a year and a half ago one of the first things that struck me about building out sites (that is, sites consisting primarily of Primary Links pointing at Page nodes) was that it building out a skeletal wireframe of a site gets tedious, especially if you have a lot of "static" pages; we’re all familiar with the drill:

read more

Don't Interrupt cron.php When Debugging

If you want to see what’s going on when Drupal’s cron.php script runs, one thing you can do is to set a breakpoint in a module’s implementation of the hook_cron() function, and call cron.php directly from your debugger. There you can step through your breakpoints, examine variables, and hopefully zero in on your problem.

read more

Drupal: Combining the Login and Registration Forms

It’s easy to take Drupal’s built-in user management features for granted… out of the box, you can configure your site to allow user registrations, reset forgotten passwords, and handle user logins. We had a use case where we wanted to combine the login and registration forms into a single landing page for anonymous users, to encourage users without an account to sign up with a single click rather than hiding the registration form behind another link.

read more

Multiple image input buttons and IE6/IE7

Drupal 5.x does not support HTML image inputs (<image type="input" src="…"/>) out of the box. A common solution to this limitation is to provide your own theming function to handle any buttons you want to turn into images, as described at http://drupal.org/node/144758.

read more

Debugging the Mysterious "An illegal choice has been detected. Please contact the site administrator." Error

The Drupal Form API is a wonderful thing… once you’ve been using it long enough, it’s easy to forget all of the laborious validation and post-submit processing you used to do by hand for each and every HTML form in your solution.

The FAPI does things its own way, though, and if you’re building especially complex forms that involve multiple steps or dynamically generated options, you may encounter the following error upon submitting your form:

read more

Syndicate content

Twitter

Older

Contact

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