Common subdirectories: ./contrib and /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/contrib
Common subdirectories: ./po and /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/po
diff -up ./signup.install /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/signup.install
--- ./signup.install	2007-10-06 12:23:34.000000000 -0700
+++ /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/signup.install	2007-12-06 10:50:14.000000000 -0700
@@ -265,6 +265,23 @@ function signup_update_5202() {
   return $ret;
 }
 
+/**
+ * Migrate signup settings per content type so that signups can be disabled
+ * completely for a content type
+ */
+function signup_update_5203() {
+  $old_prefix = 'signup_form_';
+  $result = db_query("SELECT name FROM {variable} WHERE name LIKE '$old_prefix%%'");
+  while ($row = db_fetch_object($result)) {
+    $new_name = 'signup_node_default_state_' . substr($row->name, strlen($old_prefix));
+    $new_value = variable_get($row->name, 0) == 1 ? 'enabled_on' : 'disabled';
+    variable_del($row->name);
+    variable_set($new_name, $new_value);
+  }
+  drupal_set_message(t('Migrated signup settings per content type.'));
+  return array();
+}
+
 function _signup_db_column_exists($table, $column) {
   switch ($GLOBALS['db_type']) {
     case 'mysql':
diff -up ./signup.module /Users/jeff/Projects/drupal/drupal-5.3-courses/sites/all/modules/contrib/signup/signup.module
--- ./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-12-06 10:50:04.000000000 -0700
@@ -338,11 +338,16 @@ 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_node_default_state'] = array(
+    '#type' => 'radios',
+    '#title' => t('Signup options'),
+    '#options' => array(
+      'disabled' => t('Disabled'),
+      'allowed_off' => t('Allowed (off by default)'),
+      'enabled_on' => t('Enabled (on by default)'),
+    ),
+    '#default_value' => variable_get('signup_node_default_state_'. $type, 'disabled'),
+    '#description' => t('If %disabled is selected, signups will not be possible for this content type. If %allowed_off is selected, signups will be off by default, but users with the %admin_all_signups permission will be able to allow signups for specific posts of this content type. If %enabled_on is selected, users will be allowed to signup for this content type unless an administrator disbles signups on specific posts.', array('%disabled' => t('Disabled'), '%allowed_off' => t('Allowed (off by default)'), '%enabled_on' => t('Enabled (on by default)'), '%admin_all_signups' => t('administer all signups'))),
   );
 }
 
@@ -359,16 +364,17 @@ function signup_alter_node_form($form_id
   else {
     $node = NULL;
   }
-
-  $signup_enabled = variable_get('signup_form_'. $form['type']['#value'], 0);
+  
+  $signup_type_default = variable_get('signup_node_default_state_'. $form['type']['#value'], 'disabled');
 
   // 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') ||
-      (!empty($node) && $signup_enabled && $node->uid == $user->uid &&
-       user_access('administer signups for own content'))) {
+  if (($signup_type_default != 'disabled' || $node->signup) && 
+      (user_access('administer all signups') ||
+      (!empty($node) && $signup_type_default == 'enabled_on' && $node->uid == $user->uid &&
+       user_access('administer signups for own content')))) {
 
     $form['signup'] = array(
       '#type' => 'fieldset',
@@ -396,7 +402,7 @@ function signup_alter_node_form($form_id
       $default_option = $node->signup;
     }
     else {
-      $default_option = $signup_enabled;
+      $default_option = $signup_type_default == 'enabled_on' ? 1 : 0;
     }
     if ($default_option == 1 ) {
       $hint = t('If enabled, you can control whether users may sign up by visiting the !signups tab and toggling if signups are %open or %closed for this @node_type.', array('!signups' => l(t('Signups'), 'node/'. $node->nid .'/signups'), '%open' => t('open'), '%closed' => t('closed'), '@node_type' => strtolower(node_get_types('name', $form['type']['#value']))));
@@ -481,6 +487,8 @@ function signup_form_validate($form_id, 
  */
 function signup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   global $form_values;
+  $signup_type_default = variable_get('signup_node_default_state_'. $node->type, 'disabled');
+  
   switch ($op) {
     case 'insert':
       if (isset($form_values['signup_enabled'])) {
@@ -497,7 +505,7 @@ function signup_nodeapi(&$node, $op, $te
           );
         }
       }
-      else if (variable_get('signup_form_'. $node->type, 0)) {
+      else if ($signup_type_default == 'enabled_on') {
         // 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 +601,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_type_default == 'enabled_on') || ($node->nid && db_num_rows($result))) {
         $signup = db_fetch_object($result);
         $node->signup = 1;
         $node->signup_forwarding_email = $signup->forwarding_email;
