? taxonomy_menu_hide_vid_or_modulepage_2.patch
? taxonomy_menu_hide_vid_or_modulepage_2_w_pathauto.patch
? taxonomy_menu_hide_vid_or_modulepage_w_pathauto_3.patch
Index: taxonomy_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_menu/taxonomy_menu.inc,v
retrieving revision 1.1.2.10
diff -u -p -r1.1.2.10 taxonomy_menu.inc
--- taxonomy_menu.inc	31 Jan 2008 16:23:34 -0000	1.1.2.10
+++ taxonomy_menu.inc	24 Mar 2008 15:23:59 -0000
@@ -73,6 +73,12 @@ function _taxonomy_menu_admin() {
     '#title'          => t('Module page'),
     '#type'           => 'textfield',
   );
+  $form['taxonomy_menu_hide_module_page'] = array(
+    '#default_value'  => variable_get('taxonomy_menu_hide_module_page', FALSE),
+    '#description'    => t('If checked, links to module page removes from all paths. path will be like "1/2/3" instead of "categories/1/2/3"'),
+    '#title'          => t('Hide link to module page'),
+    '#type'           => 'checkbox',
+  );
   $form['taxonomy_menu_display_num'] = array(
     '#default_value'  => variable_get('taxonomy_menu_display_num', FALSE),
     '#description'    => t('If checked, number of node per term will be displayed in the menu.'),
@@ -106,6 +112,10 @@ function _taxonomy_menu_admin() {
  * Its the main function for this module.
  */
 function _taxonomy_menu_menu() {
+  if (module_exists('pathauto')) {
+    $pathauto_exists=true; 
+    _pathauto_include();
+  }
   $items['admin/settings/taxonomy_menu'] = array(
     'access'              => user_access('administer site configuration'),
     'callback'            => 'drupal_get_form',
@@ -114,7 +124,9 @@ function _taxonomy_menu_menu() {
     'description'         => t('Global configuration of taxonomy menu functionality.'),
     'path'                => 'admin/settings/taxonomy_menu',
     'title'               => t('Taxonomy Menu'),
-    'type'                => MENU_NORMAL_ITEM
+    't
+     
+     ype'                => MENU_NORMAL_ITEM
   );
 
   // This user access function will be used for
@@ -123,16 +135,22 @@ function _taxonomy_menu_menu() {
 
   foreach (taxonomy_get_vocabularies() as $vocabulary) {
     if (variable_get('taxonomy_menu_show_'. $vocabulary->vid, TAXONOMY_MENU_NONE)) {
-      $path =  variable_get('taxonomy_menu_display_page', 'category') .'/'. $vocabulary->vid;
+      if(variable_get('taxonomy_menu_hide_module_page', FALSE)) $path =  $vocabulary->vid;
+      else $path =  variable_get('taxonomy_menu_display_page', 'category') .'/'. $vocabulary->vid;
       $items[$path] = array(
-        'access'          => $access,
-        'callback'        => '__taxonomy_menu_page',
-        'file'            => 'taxonomy_menu.inc',
-        'page callback'   => '__taxonomy_menu_page',
-        'path'            => $path,
-        'title'           => t($vocabulary->name),
-        'weight'          => $vocabulary->weight
+	'access'          => $access,
+	'callback'        => '__taxonomy_menu_page',
+	'file'            => 'taxonomy_menu.inc',
+	'page callback'   => '__taxonomy_menu_page',
+	'path'            => $path,
+	'title'           => t($vocabulary->name),
+	'weight'          => $vocabulary->weight
       );
+      
+      if($pathauto_exists) {
+	$placeholders = pathauto_get_placeholders('taxonomy', $vocabulary);    
+        $alias = pathauto_create_alias('taxonomy_menu', 'update', $placeholders, $path,$vocabulary->vid);
+      }
 
       $tree = taxonomy_get_tree($vocabulary->vid);
       $old_depth = -1;
@@ -148,6 +166,11 @@ function _taxonomy_menu_menu() {
         $path       = $old_path .'/'. $term->tid;
         $old_depth  = $term->depth;
         $old_path   = $path;
+	
+	if($pathauto_exists) {
+          $placeholders = pathauto_get_placeholders('taxonomy', $term);    
+          $alias = pathauto_create_alias('taxonomy_menu', 'update', $placeholders, $path,$term->tid);
+	}
 
         // Calculate the numbers of children nodes
         $num = taxonomy_term_count_nodes($term->tid);
@@ -228,12 +251,12 @@ function _taxonomy_menu_node_view(&$node
  */
 function _taxonomy_menu_page() {
   // Check if the Vocabulary ID is set
-  if ($vid = arg(1)) {
-
+  if (($vid = arg(1)) || ($vid=variable_get('taxonomy_menu_hide_module_page', FALSE)?arg(0):FALSE)) {
+    
     // Depending on what Output technique is used,
     // show the nodes' list
     if (variable_get('taxonomy_menu_show_'. $vid, TAXONOMY_MENU_NORMAL) == TAXONOMY_MENU_NORMAL) {
-      if ($tid = arg(2)) {
+      if (($tid = arg(2)) || ($tid=variable_get('taxonomy_menu_hide_module_page', FALSE)?arg(1):FALSE)) {
         $tid = explode('/', $_GET['q']);
         $tid = db_escape_string(array_pop($tid));
 
Index: taxonomy_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_menu/taxonomy_menu.module,v
retrieving revision 1.17.2.1.2.12
diff -u -p -r1.17.2.1.2.12 taxonomy_menu.module
--- taxonomy_menu.module	31 Jan 2008 16:23:34 -0000	1.17.2.1.2.12
+++ taxonomy_menu.module	24 Mar 2008 15:24:00 -0000
@@ -32,6 +32,7 @@ function __taxonomy_menu_admin() {
 function __taxonomy_menu_admin_submit(&$form_id, &$form) {
   // Save these options
   variable_set('taxonomy_menu_display_page',        $form['taxonomy_menu_display_page']);
+  variable_set('taxonomy_menu_hide_module_page',    $form['taxonomy_menu_hide_module_page']);
   variable_set('taxonomy_menu_display_num',         $form['taxonomy_menu_display_num']);
   variable_set('taxonomy_menu_hide_empty',          $form['taxonomy_menu_hide_empty']);
   variable_set('taxonomy_menu_display_descendants', $form['taxonomy_menu_display_descendants']);
@@ -138,4 +139,25 @@ function taxonomy_menu_taxonomy() {
 
 function taxonomy_menu_term_path(&$term) {
   return 'asdf';
-}
\ No newline at end of file
+}
+
+function taxonomy_menu_pathauto($op){
+  switch ($op){
+    case 'settings':
+      $settings = array();
+      $settings['module'] = 'taxonomy_menu';
+      $settings['token_type'] = 'taxonomy';
+      $settings['groupheader'] = t('Taxonomy menu path settings');
+      $settings['patterndescr'] = t('Pattern for taxonomy menu pages');
+      $settings['patterndefault'] = t('categories/[vocab-raw]/[cat-raw]');
+      $patterns = token_get_list('taxonomy');
+      foreach ($patterns as $type => $pattern_set) {
+        if ($type != 'global') {
+          foreach ($pattern_set as $pattern => $description) {
+            $settings['placeholders']['['. $pattern .']'] = $description;
+          }
+        }
+      }
+    return (object) $settings;
+  }
+}
