Index: glossary.admin.inc
===================================================================
--- glossary.admin.inc	(revision 2313)
+++ glossary.admin.inc	(working copy)
@@ -137,6 +137,14 @@
     '#description' => t('This is the style class that will be used for "acronym," "abbr," and "hovertip" links. It should only be used by those with specific site standards.'),
     );
 
+  $form['glossary_page']['glossary_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Base Path'),
+    '#default_value' => variable_get('glossary_path', 'glossary'),
+    '#description' => t('The base path from which user-visible links and menu callbacks are constructed. The default is "glossary". After changing this setting, you will need to rebuild your menu router (for instance, by clearing the cache from the !performance page).', 
+    array('!performance' => l(t('performance'), 'admin/settings/performance'))),
+  );
+
   return system_settings_form($form);
 }
 
Index: glossary.module
===================================================================
--- glossary.module	(revision 2313)
+++ glossary.module	(working copy)
@@ -182,25 +182,30 @@
  * Implementation of hook_menu().
  */
 function glossary_menu() {
-  $items['glossary/search'] = array(
+  $glossary_path = glossary_path();
+  // check how many slashes are in the glossary path, because this will affect 
+  // the indices we have to pass to the 'page arguments' arrays.
+  $depth = substr_count($glossary_path, '/');
+
+  $items[$glossary_path .'/search'] = array(
     'title' => 'Glossary Search',
     'page callback' => 'glossary_search_results',
-    'page arguments' => array(2),
+    'page arguments' => array($depth + 2),
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
     );
 
-  $items['glossary/clearcache'] = array(
+  $items[$glossary_path .'/clearcache'] = array(
     'title' => 'Glossary clear cache',
     'page callback' => 'glossary_clearcache',
     'access arguments' => array('administer filters'),
     'type' => MENU_CALLBACK,
     );
 
-  $items['glossary'] = array(
+  $items[$glossary_path] = array(
     'title' => 'Glossary',
     'page callback' => 'glossary_page',
-    'page arguments' => array(1, 2),
+    'page arguments' => array($depth + 1, $depth + 2),
     'access arguments' => array('access content'),
     'type' => MENU_SUGGESTED_ITEM,
     );
@@ -267,10 +272,10 @@
     }
   }
 
-  $items['glossary/term/%'] = array(
+  $items[$glossary_path .'/term/%'] = array(
     'title' => 'Glossary', 
     'page callback' => 'glossary_term', 
-    'page arguments' => array(2),
+    'page arguments' => array($depth + 2),
     'access arguments' => array('access content'), 
     'type' => MENU_CALLBACK,
     );       
@@ -286,7 +291,7 @@
 }
 
 function glossary_search_form($form_state, $keys = NULL) {
-  $form['#action'] = url('glossary/search');
+  $form['#action'] = url(glossary_path() .'/search');
   $form['#attributes'] = array('class' => 'glossary search-form');
   $form['keys'] = array(
     '#type' => 'textfield',
@@ -303,9 +308,13 @@
 
 function glossary_search_form_submit($form, &$form_state) {
   $keys = trim($form_state['values']['keys']);
-  $form_state['redirect'] = 'glossary/search/'. $keys;
+  $form_state['redirect'] = glossary_path() .'/search/'. $keys;
 }
 
+function glossary_path() {
+  return variable_get('glossary_path', 'glossary');
+}
+
 function glossary_search_results($keys = NULL) {
   $vids = _glossary_get_filter_vids();
   $output = '<div class="glossary-list">';
@@ -466,6 +475,7 @@
     $vids = _glossary_get_filter_vids();
     $terms_replace = array();
 
+    $glossary_path = glossary_path();
     foreach ($terms as $term) {
 //      $term_title = strip_tags($term->description);
       $term_title = filter_xss($term->description);
@@ -475,15 +485,15 @@
       }
       elseif (!empty($vids) && (variable_get('glossary_click_option', 0) == 1)) {
         if (variable_get('glossary_page_per_letter', FALSE)) {
-          $linkto = 'glossary/'. $term->vid .'/letter'. drupal_strtolower(drupal_substr($term->name, 0, 1));
+          $linkto = $glossary_path .'/'. $term->vid .'/letter'. drupal_strtolower(drupal_substr($term->name, 0, 1));
         }
         else {
-          $linkto = 'glossary/'. $term->vid;
+          $linkto = $glossary_path .'/'. $term->vid;
         }
         $fragment = 'term'. $term->tid;
       }
       else {
-        $linkto = 'glossary/term/'. $term->tid;
+        $linkto = $glossary_path .'/term/'. $term->tid;
       }
       $ins_before = $ins_after = NULL;
       $term_class = variable_get('glossary_term_class', 'glossary-term');
@@ -768,13 +778,14 @@
     $letters = drupal_map_assoc($lets);
   }
 
+  $glossary_path = glossary_path() .'/';
   foreach ($tree as $key => $term) {
     $term->let = drupal_strtolower(drupal_substr($term->name, 0, 1));
     if ($page_per_letter) {
-      $letters[$term->let] = l($term->let, 'glossary/'. $vid .'/letter'. $term->let);
+      $letters[$term->let] = l($term->let, $glossary_path . $vid .'/letter'. $term->let);
     }
     else {
-      $letters[$term->let] = l($term->let, 'glossary/'. $vid, array('fragment' => 'letter'. $term->let));
+      $letters[$term->let] = l($term->let, $glossary_path . $vid, array('fragment' => 'letter'. $term->let));
     }
   }
   $sep = ' '. variable_get('glossary_alphabar_separator', '|') .' ';
@@ -867,7 +878,7 @@
     $output .= str_repeat('--', $term->depth) . check_plain($term->name);
   }
   else {
-    $output .= l($term->name, 'glossary/term/'. $term->tid) .' ';
+    $output .= l($term->name, glossary_path() .'/term/'. $term->tid) .' ';
   }
 
   if ($show_edit && $access_tax) {
@@ -889,13 +900,14 @@
     }
     if ($relations = glossary_get_related($term->tid, 'name', $one_way)) {
       $output .= "<span class=\"glossary-related\">". t("See also") .": ";
+      $glossary_path = glossary_path();
       foreach ($relations as $related) {
         if ($link_related) {
           if ($click_option == 1) {
-          $items[] .= l($related->name, 'glossary/'. $term->vid, array('fragment' => "term". $related->tid));
+          $items[] .= l($related->name, $glossary_path .'/'. $term->vid, array('fragment' => "term". $related->tid));
           }
           else {
-            $items[] .= l($related->name, 'glossary/term/'. $related->tid);
+            $items[] .= l($related->name, $glossary_path .'/term/'. $related->tid);
           }
         }
         else {
@@ -967,7 +979,7 @@
   }
 
   $output .= '<div class="glossary-block-term-name">';
-  $output .= $link ? l($term->name, 'glossary/term/'. $term->tid) : check_plain($term->name);
+  $output .= $link ? l($term->name, glossary_path() .'/term/'. $term->tid) : check_plain($term->name);
   $output .= "</div>\n";
 
   $output .= '<div class="glossary-block-term-description">';
@@ -977,13 +989,14 @@
   if ($relations = glossary_get_related($term->tid, 'name', $one_way)) {
     $output .= '<span class="glossary-related">'. t('See also') .': ';
     $items = array();
+    $glossary_path = glossary_path() .'/';
     foreach ($relations as $related) {
       if ($link_related) {
         if ($click_option == 1) {
-          $items[] .= l($related->name, 'glossary/'. $term->vid, array('fragment' => 'term'. $related->tid));
+          $items[] .= l($related->name, $glossary_path . $term->vid, array('fragment' => 'term'. $related->tid));
         }
         else {
-          $items[] .= l($related->name, 'glossary/term/'. $related->tid);
+          $items[] .= l($related->name, $glossary_path .'term/'. $related->tid);
         }
       }
       else {
@@ -1056,7 +1069,7 @@
     }
     $links['glossary_view'] = array(
       'title' => t('List'), 
-      'href' => 'glossary/'. $voc->vid,
+      'href' => glossary_path() .'/'. $voc->vid,
       );
     if ($voc->description) {
       $output .= '<tr class="'. $class .' merge-down"><th>'. $voc->name .'</th><td>'. theme('links', $links) .'</td></tr>';
@@ -1247,4 +1260,4 @@
   else {
     return t('Click one of the letters above to advance the page to terms beginning with that letter.');
   }
-}
\ No newline at end of file
+}
