Index: vocabulary_list.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/vocabulary_list/vocabulary_list.module,v retrieving revision 1.5 diff -u -F^f -r1.5 vocabulary_list.module --- vocabulary_list.module 6 Nov 2004 05:58:14 -0000 1.5 +++ vocabulary_list.module 12 Apr 2006 15:31:05 -0000 @@ -14,7 +14,7 @@ function vocabulary_list_help($section)
In order to view the content associated with a vocabulary, or a collection of vocabularies, you should browse to a properly formed Vocabulary URL. For example, taxonomy/vocabulary/1+2. Vocabulary URLs always contain one or more vocabulary IDs at the end of the URL. You may learn the vocabulary ID for a given vocabulary by hovering over "edit vocabulary" in the taxonomy overview page, and noting the number at the end of the URL.
To build a Vocabulary URL, start with "taxonomy/vocabulary/". Then list the vocabulary IDs, separated by "+" to choose content tagged with terms within any of the given vocabulary IDs, or separated by "," to choose content tagged with terms within all of the given vocabulary IDs. In other words, "+" is less specific than ",". You may optionally specify a "depth" in the taxonomy tree hierarchy. This defaults to "1", which means only nodes tagged with top-level terms within the vocabulary are listed. A positive number indicates the number of additional levels of the taxonomy tree to search. You may also use the value "all", which means that all terms within a vocabulary are searched.
Every vocabulary, or collection of vocabularies, provides an RSS feed to which interested users may subscribe. The URL format for a sample RSS feed is taxonomy/vocabulary/1+2/0/feed. These are built just like +
Every vocabulary, or collection of vocabularies, provides an RSS feed to which interested users may subscribe. The URL format for a sample RSS feed is taxonomy/vocabulary/1+2/0/feed. These are built just like Vocabulary URLs, but are followed by the word "feed".
', array('%vocab-example' => url('taxonomy/vocabulary/1+2'), '%taxo-overview' => url('admin/taxonomy'), '%userland-rss' => 'http://backend.userland.com/stories/rss', '%sample-rss' => url('taxonomy/vocabulary/1+2/feed'), '%vocab-help' => url('admin/help/vocabulary_list', NULL, 'vocabulary-url'))); } } @@ -60,13 +60,14 @@ function vocabulary_term_page($str_vids $names[] = $vocab->name; } $title = implode(', ', $names); - + switch ($op) { case 'page': drupal_set_html_head(''); $output = taxonomy_render_nodes(_vocabulary_select_nodes($vids, $operator, $depth, TRUE)); - print theme('page', $output, $title); + drupal_set_title($title); + return $output; break; case 'feed': @@ -117,8 +118,8 @@ function _vocabulary_select_nodes($vids if ($operator == 'or') { $str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids)); - $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n '. node_access_join_sql() .' INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 AND '. node_access_where_sql() .' ORDER BY n.sticky DESC, n.created DESC'; - $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. node_access_join_sql() .' INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 AND '. node_access_where_sql(); + $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'; + $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1'; } else { $joins = ''; @@ -127,8 +128,8 @@ function _vocabulary_select_nodes($vids $joins .= ' INNER JOIN {term_node} tn'. $index .' ON n.nid = tn'. $index .'.nid'; $wheres .= ' AND tn'. $index .'.tid IN ('. implode(',', $tids) .')'; } - $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n '. node_access_join_sql() . $joins .' WHERE n.status = 1 AND '. node_access_where_sql() . $wheres .' ORDER BY n.sticky DESC, n.created DESC'; - $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. node_access_join_sql() . $joins .' WHERE n.status = 1 AND '. node_access_where_sql() . $wheres; + $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; + $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres; } if ($pager) {