From 9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 9 Feb 2003 17:39:40 +0000 Subject: - Applied Alastair's date patch. - Removed all instances of '$user->nodes'. - Committed Moshe's taxonomy patch - minus the node_compact_list() bit. It needs a bit more thought/work. This patch changes the links of taxonomy pages/feeds so update your custom code and themes accordingly! Themes should now use "taxonomy_link("taxonomy terms", $node)" to get an array of taxonomy term links. The old construct is deprecated and should be changed. // old theme blob: if (function_exists("taxonomy_node_get_terms")) { foreach (taxonomy_node_get_terms($node->nid) as $term) { $terms[] = l($term->name, NULL, array(), "or=$term->tid"); } } // new theme blob: if (module_exist("taxonomy")) { $terms = taxonomy_link("taxonomy terms", $node); } // old URL: http://foo.com/index.php?or=1,2 // new URL: http://foo.com/?q=taxonomy/page/or/1,2 --- includes/theme.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index d206c22ec..7dba28dd1 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -40,16 +40,16 @@ class BaseTheme { } function node($node, $main) { - if (function_exists("taxonomy_node_get_terms")) { - foreach (taxonomy_node_get_terms($node->nid) as $term) { - $terms[] = l($term->name, NULL, array(), "or=$term->tid"); - } + if (module_exist("taxonomy")) { + $terms = taxonomy_link("taxonomy terms", $node); } $output = "$node->title by ". format_name($node) ."
"; + if (count($terms)) { $output .= "(". $this->links($terms) .")
"; } + if ($main && $node->teaser) { $output .= check_output($node->teaser); } -- cgit v1.2.3