D6 backport of the CAP Drupal module