--- signup.module	2007-10-16 12:39:30.000000000 -0700
+++ /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/signup.module	2007-11-27 17:34:21.000000000 -0700
@@ -338,11 +338,15 @@ function signup_form_alter($form_id, &$f
  */
 function signup_alter_node_type_form($form_id, &$form) {
   $type = $form['old_type']['#value'];
-  $form['workflow']['signup_form'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Allow signups by default'),
-    '#default_value' => variable_get('signup_form_'. $type, FALSE) == 1,
-    '#description' => t('If selected, users will be allowed to signup for this node type by default. Users with %admin_all_signups permission will be able to toggle this setting on a per-node basis.', array('%admin_all_signups' => t('administer all signups'))),
+  $form['workflow']['signup_options'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Signup options'),
+    '#options' => array(
+      'available' => t('Enable signups for this content type'),
+      'enabled' => t('Allow signups by default'),
+    ),
+    '#default_value' => variable_get('signup_options_'. $type, array()),
+    '#description' => t('If %enable_signups is selected, users with the %admin_all_signups permission will be able to allow signups for this content type.  If %allow_signups is selected, users will be allowed to signup for this node type by default. Users with %admin_all_signups permission will be able to toggle this setting on a per-node basis.', array('%enable_signups' => t('Enable signups for this content type'), '%allow_signups' => t('Allow signups by default'), '%admin_all_signups' => t('administer all signups'))),
   );
 }
 
@@ -360,15 +364,18 @@ function signup_alter_node_form($form_id
     $node = NULL;
   }
 
-  $signup_enabled = variable_get('signup_form_'. $form['type']['#value'], 0);
+  $signup_options = variable_get('signup_options_'. $form['type']['#value'], array());
+  $signup_available = in_array('available', $signup_options) ? TRUE : FALSE;
+  $signup_enabled = in_array('enabled', $signup_options) ? TRUE : FALSE;
 
   // If the current user has global signup administration permissions,
   // or if this node-type is signup-enabled and the user has permission
   // to administer signups for their own content, add a fieldset for
   // signup-related settings.
-  if (user_access('administer all signups') ||
+  if ($signup_available && 
+      (user_access('administer all signups') ||
       (!empty($node) && $signup_enabled && $node->uid == $user->uid &&
-       user_access('administer signups for own content'))) {
+       user_access('administer signups for own content')))) {
 
     $form['signup'] = array(
       '#type' => 'fieldset',
@@ -481,6 +488,15 @@ function signup_form_validate($form_id, 
  */
 function signup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   global $form_values;
+  $signup_options = variable_get('signup_options_'. $node->type, array());
+  $signup_available = in_array('available', $signup_options) ? TRUE : FALSE;
+  $signup_enabled = in_array('enabled', $signup_options) ? TRUE : FALSE;
+  
+  // Skip all this if signups aren't possible for the content type
+  if (!$signup_available) {
+    return;
+  }
+  
   switch ($op) {
     case 'insert':
       if (isset($form_values['signup_enabled'])) {
@@ -497,7 +513,7 @@ function signup_nodeapi(&$node, $op, $te
           );
         }
       }
-      else if (variable_get('signup_form_'. $node->type, 0)) {
+      else if ($signup_enabled) {
         // The form doesn't include any information about signups, but
         // the node type is signup-enabled. This would happen if a
         // user without any signup admin permissions creates a node
@@ -593,7 +609,7 @@ function signup_nodeapi(&$node, $op, $te
 
       // Load signup data for both new nodes w/ enabled node types,
       // and any existing nodes that are already signup enabled.
-      if ((!$node->nid && variable_get('signup_form_'. $node->type, 0)) || ($node->nid && db_num_rows($result))) {
+      if ((!$node->nid && $signup_enabled) || ($node->nid && db_num_rows($result))) {
         $signup = db_fetch_object($result);
         $node->signup = 1;
         $node->signup_forwarding_email = $signup->forwarding_email;
