Index: yahoo_terms.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/yahoo_terms/yahoo_terms.module,v
retrieving revision 1.1.4.6
diff -u -u -p -r1.1.4.6 yahoo_terms.module
--- yahoo_terms.module	25 Jun 2007 10:35:31 -0000	1.1.4.6
+++ yahoo_terms.module	29 Aug 2007 21:25:04 -0000
@@ -212,6 +212,14 @@ function yahoo_terms_admin_settings() {
     '#required' => TRUE,
     '#default_value' => variable_get('yahoo_terms_vocab', ''),
   );
+  $form['yahoo_terms_types'] = array(
+    '#title' => t('Process Yahoo Terms only these types only'),
+    '#description' => t('If no types are selected, then all types will be used.'),
+    '#type' => 'select',
+    '#options' => node_get_types('names'),
+    '#multiple' => TRUE,
+    '#default_value' => variable_get('yahoo_terms_types', array()),
+  );
   return system_settings_form($form);
 }
 
@@ -296,14 +304,20 @@ function yahoo_terms_nodeapi(&$node, $op
       $vid = _yahoo_terms_which_vocab($node->type);
       $automatic = variable_get('yahoo_terms_enable_runtime', YAHOO_TERMS_ONLY_MANUALLY);
       if (is_numeric($vid) && ($automatic == YAHOO_TERMS_ON_NODE_CREATION || $automatic == YAHOO_TERMS_ON_NODE_CREATION_AND_UPDATE)) {
-        yahoo_terms_node_assign_keywords($node, "", array(), $vid);
+        $types = variable_get('yahoo_terms_types', array());
+        if (count($types) == 0 || isset($types[$node->type])) {
+          yahoo_terms_node_assign_keywords($node, "", array(), $vid);
+        }
       }
       break;
     case 'update':
       $vid = _yahoo_terms_which_vocab($node->type);
       $automatic = variable_get('yahoo_terms_enable_runtime', YAHOO_TERMS_ONLY_MANUALLY);
       if (is_numeric($vid) && $automatic == YAHOO_TERMS_ON_NODE_CREATION_AND_UPDATE) {
-        yahoo_terms_node_assign_keywords($node, "", array(), $vid);
+        $types = variable_get('yahoo_terms_types', array());
+        if (count($types) == 0 || isset($types[$node->type])) {
+          yahoo_terms_node_assign_keywords($node, "", array(), $vid);
+        }
       }
       break;
     case 'prepare':
@@ -365,15 +379,14 @@ function yahoo_terms_batch() {
       '#collapsible' => TRUE,
       '#collapsed' => FALSE
   );
-  $types = node_get_types();
-  foreach ($types as $key => $type) {
-    $select[$key] = $key;
+  $types = variable_get('yahoo_terms_types', array());
+  if (count($types) == 0) {
+    $types = node_get_types('names');
   }
-  unset($types);
   $form['yahoo_terms_batch']['type'] = array(
       '#title' => t('Content type'),
       '#type' => 'select',
-      '#options' => $select,
+      '#options' => $types,
       '#required' => TRUE,
   );
   $select_voc = _yahoo_terms_vocab_select();
