From bf2b4f0b459f01d56b7d2de7be96738968114037 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Mon, 20 May 2002 11:48:24 +0000 Subject: Added taxonomy support to themes Goofy and UnConeD --- themes/goofy/goofy.theme | 10 +++++++++- themes/unconed/unconed.theme | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index 786e06646..653fcfd56 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -116,7 +116,15 @@ function c(subject,mod,author,date,body) {document.writeln("title\" -->\n"; $title = check_output($node->title); $subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_name($node), "%b" => format_date($node->created, "large"))); - $subright = node_index($node); + if (function_exists("taxonomy_node_get_terms")) { + if ($terms = taxonomy_node_get_terms($node->nid)) { + $taxlinks = array(); + foreach ($terms as $term) { + $taxlinks[] = "tid\">". check_output($term->name) .""; + } + $subright = $this->links($taxlinks); + } + } if ($main && $node->teaser) { $body = check_output($node->teaser, 1); diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index acc4cce6c..df6133576 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -101,7 +101,16 @@ bgcolor2\">" . t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) . " -- cgit v1.2.3
title) .""; ?>
bgcolor2\" ALIGN=\"center\" NOWRAP>". node_index($node) .""; + if (function_exists("taxonomy_node_get_terms")) { + if ($terms = taxonomy_node_get_terms($node->nid)) { + $taxlinks = array(); + foreach ($terms as $term) { + $taxlinks[] = "tid\">". check_output($term->name) .""; + } + $taxo = $this->links($taxlinks); + } + } + print "bgcolor2\">" . t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) . "bgcolor2\" ALIGN=\"center\" NOWRAP>". $taxo .""; ?>