[development] Distributing "bi-modal" Drupal modules

Rob Thorne rob at torenware.com
Tue Feb 16 18:31:25 UTC 2010


There are a couple of large software projects that  are designed to 
install together with Drupal (CiviCRM is one of them).  Typically, a 
project like this distributes a Drupal module that handles the embedding 
of the project inside of a Drupal install.

Is it even possible for a project like this to distribute either:

   1. Both a Drupal 6 *and* a Drupal 7 module (i.e., will Drupal look at
      the .info files and ignore the "wrong" version), or
   2. A single Drupal module that keeps its Drupal-version specific
      features (changed, new or dropped API calls, hooks with
      incompatible call signatures, etc.) in .inc files and loads them
      dynamically?

This is not "the done thing", and the module upgrade instructions in the 
handbook show it would be pretty daunting to do for anything but a 
trivial module.    But is it even possible?

Rob Thorne
Torenware Networks


More information about the development mailing list