diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-16 22:05:51 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-16 22:05:51 +0000 |
commit | 18d22419f3da39ca4bf92f46d605a25957f311be (patch) | |
tree | d72732b1a23d479c4f2adc4d671d8ec901e2a187 /themes | |
parent | 9fe9144ae7804e3b80c0ffd8444b0448261f4436 (diff) | |
download | brdo-18d22419f3da39ca4bf92f46d605a25957f311be.tar.gz brdo-18d22419f3da39ca4bf92f46d605a25957f311be.tar.bz2 |
- Patch #339929 by Moshe et al: move node links into ->content.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/chameleon/chameleon.theme | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 43630a9ae..3e72f8097 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -133,21 +133,23 @@ function chameleon_node($node, $teaser = 0, $page = 0) { $output .= " </div>\n"; - $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array( - 'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))), - 'html' => TRUE) : array(); - - $terms = array(); - if (module_exists('taxonomy')) { - $terms = taxonomy_link("taxonomy terms", $node); + $submitted = ''; + if (theme_get_setting("toggle_node_info_$node->type")) { + $submitted = t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))); } - $links = array_merge($submitted, $terms); - if (isset($node->links)) { - $links = array_merge($links, $node->links); + $terms = ''; + if (!empty($node->content['links']['taxonomy'])) { + $terms = drupal_render($node->content['links']['taxonomy']); + } + + $links = ''; + if ($node->content['links']) { + $links = drupal_render($node->content['links']); } - if (count($links)) { - $output .= '<div class="links">' . theme('links', $links, array('class' => 'links inline')) . "</div>\n"; + + if (!empty($terms) || !empty($links)) { + $output .= '<div class="links">' . $terms . $links . $submitted . "</div>\n"; } $output .= "</div>\n"; @@ -160,7 +162,7 @@ function chameleon_comment($comment, $node, $links = array()) { 'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))), 'html' => TRUE); - $output = "<div class=\"comment" . ' ' . $status . "\">\n"; + $output = "<div class=\"comment" . ' ' . $comment->status . "\">\n"; $output .= " <h3 class=\"title\">" . l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) . "</h3>\n"; $output .= " <div class=\"content\">" . $comment->comment; if (!empty($signature)) { |