Index: sitemenu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sitemenu/sitemenu.module,v
retrieving revision 1.39
diff -u -r1.39 sitemenu.module
--- sitemenu.module	13 May 2008 13:27:28 -0000	1.39
+++ sitemenu.module	26 Jan 2009 10:32:00 -0000
@@ -19,6 +19,7 @@
 define('SITEMENU_MAX_ROWS',            'sitemenu_max_rows');
 define('SITEMENU_FOOTER',              'sitemenu_footer');
 define('SITEMENU_SHOW_VOCAB_TITLES',   'sitemenu_show_vocab_titles');
+define('SITEMENU_SHOW_BLOCK_COUNT',    'sitemenu_show_block_count');
 
 function sitemenu_help($section) {
   switch ($section) {
@@ -162,6 +163,12 @@
     '#default_value' => variable_get(SITEMENU_SHOW_VOCAB_TITLES, 1),
     );
 
+  $form[SITEMENU_SHOW_BLOCK_COUNT] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show node counts in the side bar menu block'),
+    '#default_value' => variable_get(SITEMENU_SHOW_BLOCK_COUNT, 0),
+    );
+
   $form[SITEMENU_MAX_ROWS] = array(
     '#type' => 'textfield',
     '#title' => t('Number of nodes to show'),
@@ -289,7 +296,10 @@
     if (!$tree_nodes) {
       $tree = taxonomy_get_tree($vocabulary->vid);
       $get_node_count = variable_get(SITEMENU_NODE_COUNT, 1);
-      if ($get_node_count && $mode == 'page') {
+      $get_block_count = variable_get(SITEMENU_SHOW_BLOCK_COUNT, 0);
+
+      if ($get_node_count && $mode == 'page' ||
+          $get_block_count && $mode == 'block') {
         // append the node count to each term name
         for ($m=0; $m<count($tree); $m++) {
           if ($count = taxonomy_term_count_nodes($tree[$m]->tid)) {
