Index: syndication.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/syndication/syndication.module,v
retrieving revision 1.50
diff -u -p -r1.50 syndication.module
--- syndication.module	1 Jun 2008 05:56:31 -0000	1.50
+++ syndication.module	5 Jun 2008 00:11:10 -0000
@@ -163,11 +163,17 @@ function syndication_blogs() {
  * taxonomy.module.
  */
 function syndication_vocabularies() {
+  $term_depth = variable_get('syndication_term_depth', 0);
+  if (empty($term_depth)) {
+    $term_depth = NULL;
+  }
+  $term_limit = variable_get('syndication_term_limit', 30);
   foreach (variable_get('syndication_vocabularies', array()) as $vid) {
     $vocab = taxonomy_get_vocabulary($vid);
-    $tree = taxonomy_get_tree($vid);
-    // Only show first 30 terms. Wary of huge vocabs. Not ideal.
-    $tree = array_slice($tree, 0, 30);
+    $tree = taxonomy_get_tree($vid, 0, -1, $term_depth);
+    if ($term_limit) {
+      $tree = array_slice($tree, 0, $term_limit);
+    }
     $items = syndication_taxonomy_build_list_items($index = 0, $tree);
     if ($items) {
       $output .= theme('item_list', $items, $vocab->name);
@@ -389,6 +395,22 @@ function syndication_admin_settings() {
     '#description' => $description,
   );
 
+  $form['syndication_term_depth'] = array(
+    '#type' => 'select',
+    '#title' => t('Maximum term depth'),
+    '#options' => array(0 => t('none')) + drupal_map_assoc(range(1, 10)),
+    '#default_value' => variable_get('syndication_term_depth', 0),
+    '#description' => t('Select a maximum depth of nested terms to display or "none" for no limit.'),
+  );
+
+  $form['syndication_term_limit'] = array(
+    '#type' => 'select',
+    '#title' => t('Maximum number of terms'),
+    '#options' => array(0 => t('none')) + drupal_map_assoc(array(20, 30, 40, 50, 60, 75, 100, 200)),
+    '#default_value' => variable_get('syndication_term_limit', 30),
+    '#description' => t('Select a maximum number of terms to display per vocabulary or "none" for no limit.'),
+  );
+  
   if (module_exists('views') && module_exists('views_rss')) {
     $options = array();
     $result = _syndication_return_views_rss_feeds();
