--- taxonomy_context.module.original	2008-06-04 04:02:54.000000000 +0200
+++ taxonomy_context.module	2008-06-04 05:42:34.000000000 +0200
@@ -469,7 +469,7 @@ function taxonomy_context_menu_tree($vid
       $children = '';
 
       $children .= taxonomy_context_menu_tree($vid, $term->tid, FALSE);
-      if (variable_get('taxonomy_context_node_block', TAXONOMY_CONTEXT_NODE_BLOCK_NONE) && $nodes = taxonomy_context_nodes_links($term->tid)) {
+      if ((count(variable_get('taxonomy_context_node_block_by_type', array())>0) || variable_get('taxonomy_context_node_block', TAXONOMY_CONTEXT_NODE_BLOCK_NONE)) && $nodes = taxonomy_context_nodes_links($term->tid)) {
         $children .= '<ul class="menu">'. $nodes ."</ul>\n";
       }
 
@@ -522,6 +522,14 @@ function taxonomy_context_nodes_links($t
       $where .= "AND n.promote = '1' ";
       break;
   }
+  $content_types = variable_get('taxonomy_context_node_block_by_type', array());
+  if(count($content_types)>0){
+      foreach($content_types AS $v){ 
+          if(isset($where_by_content_type)) $where_by_content_type .= "OR n.type = '$v' ";
+          else $where_by_content_type = "n.type = '$v' ";
+      }
+      $where .= "AND ($where_by_content_type) ";
+  }
   $sql = 'SELECT DISTINCT(n.nid), n.title, r.teaser ' .
     'FROM {node} n ' .
     'LEFT JOIN {term_node} tn ON n.nid = tn.nid ' .
@@ -589,6 +597,17 @@ function taxonomy_context_admin_settings
     '#options' => array(t('None'), t('Sticky'), t('Promoted'), t('All')),
     '#description' => t('What nodes do you wish to display in taxonomy blocks?'),
   );
+  $content_types = array();
+  $content_types_obj = node_get_types();
+  foreach($content_types_obj AS $v) $content_types[$v->type] = $v->name;
+  $form['general_settings']['taxonomy_context_node_block_by_type'] = array(
+    '#type' => 'select',
+    '#title' => t('Show nodes in block by content type'),
+    '#default_value' => variable_get('taxonomy_context_node_block_by_type', array()),
+  	'#options' => $content_types,
+    '#multiple' => TRUE,
+    '#description' => t('What content type nodes do you wish to display in taxonomy blocks?'),
+  );
   $form['general_settings']['taxonomy_context_block_display'] = array(
     '#type' => 'select',
     '#title' => t('Show block items'),
