--- /c/projects/drupal/cvs-47/contributions/modules/minutes/minutes.module	2006-10-31 23:46:39.359375000 -0500
+++ modules/minutes/minutes.module	2006-10-31 23:52:54.718750000 -0500
@@ -71,6 +71,27 @@ function minutes_access($op, $node) {
     }
 }
 
+/**
+ * Implementation of hook_form_alter()
+ */
+function minutes_form_alter($form_id, &$form) {
+  $type = (isset($form['type']) && isset($form['type']['#value'])) ? $form['type']['#value'] : NULL;
+  
+  switch ($form_id) {
+    // Node settings form
+    case $type .'_node_settings':
+      // If this is an eventable node type
+      if (variable_get('event_nodeapi_'. $type, 'never') != 'never') {
+        $form['workflow']['minutes_status_'. $type] = array(
+          '#type' => 'checkbox',
+          '#title' => t('Allow minutes'),
+          '#default_value' => minutes_is_enabled($type),
+          '#description' => t('If this option is checked, users will be able to attach minutes to this type of content.'),
+        );
+      }
+      break;
+  }
+}
 
 /**
  * Implementation of hook_link().
@@ -90,7 +111,7 @@ function minutes_link($type, $node = NUL
             $links[] = l(t('edit these minutes'), "node/$node->nid/edit");
         }
     }
-    elseif (($type == 'node') and (variable_get('event_nodeapi_' . $node->type, 'never') != 'never')) {
+    elseif ($type == 'node' && minutes_is_enabled($node->type)) {
         // this is an event of some type, so provide a link to either
         // create or view the minutes
     
@@ -455,6 +476,13 @@ function minutes_nodeapi($node, $op, $ar
 }
 
 /**
+ * Tell whether or not minutes are enabled for a given node type.
+ */
+function minutes_is_enabled($type) {
+  return variable_get('minutes_status_'. $type, FALSE);
+}
+  
+/**
  * theme functions for hook_view
  */
 function theme_minutes_event($event) {
