? tax-def-forums.patch
Index: taxonomy_defaults.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_defaults/taxonomy_defaults.admin.inc,v
retrieving revision 1.2.2.4
diff -u -p -r1.2.2.4 taxonomy_defaults.admin.inc
--- taxonomy_defaults.admin.inc	4 Dec 2010 00:58:40 -0000	1.2.2.4
+++ taxonomy_defaults.admin.inc	4 Dec 2010 02:00:32 -0000
@@ -14,10 +14,24 @@ function taxonomy_defaults_form() {
   $form['#tree'] = TRUE;
   $vocabularies = taxonomy_get_vocabularies();
 
+  // Retrieve the core forum vocabulary id so it can be skipped later
+  $forum_vid = variable_get('forum_nav_vocabulary', '');
+
   foreach (node_get_types() as $type => $name) {
     $type_vocabularies = taxonomy_get_vocabularies($type);
     // Loop over all vocabularies
     foreach ($vocabularies as $vid => $vocab) {
+
+      $form[$type][$vid]['name'] = array('#value' => t($vocab->name));
+
+      // Ignore the core forum vocabury
+      if ($forum_vid == $vid) {
+        $form[$type][$vid]['select'] = array(
+          '#value' => 'Taxonomy Defaults cannot operate on the Forum vocabulary in Drupal core. Use the Taxonomy Role module to restrict access to forums.',
+        );
+        continue;
+      }
+
       $activevocab = array_key_exists($vid, $type_vocabularies);
 
       if ($activevocab) {
@@ -26,7 +40,6 @@ function taxonomy_defaults_form() {
           '#default_value' => !variable_get("taxdef_{$type}_{$vid}_visible", TRUE),
           '#weight' => -16,
         );
-        $form[$type][$vid]['name'] = array('#value' => t($vocab->name));
 
         // If the vocabulary stores tags, add an autocomplete field for it.
         if ($vocab->tags) {
Index: taxonomy_defaults.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_defaults/taxonomy_defaults.module,v
retrieving revision 1.12.2.1
diff -u -p -r1.12.2.1 taxonomy_defaults.module
--- taxonomy_defaults.module	22 Nov 2010 09:37:41 -0000	1.12.2.1
+++ taxonomy_defaults.module	4 Dec 2010 02:00:32 -0000
@@ -68,8 +68,18 @@ function taxonomy_defaults_form_alter(&$
   // Only alter node forms
   if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
     $node = $form['#node'];
+
+    // Retreive the core forum vocabulary id so it can be skipped later
+    $forum_vid = variable_get('forum_nav_vocabulary', '');
+
       // Add the default 'pre-selected' terms to $node->taxonomy
     foreach (taxonomy_get_vocabularies($node->type) as $vid => $vocab) {
+
+      // Ignore this vocabulary if it is the core forum vocabulary
+      if ($vid == $forum_vid) {
+        continue; 
+      }
+
       $default_tids = variable_get("taxdef_{$node->type}_{$vid}", array());
       $visible = variable_get("taxdef_{$node->type}_{$vid}_visible", TRUE);
 
