diff options
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 269a5da2e..dc2108eab 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -98,7 +98,14 @@ function theme_blocks($region, $theme) { } function theme_morelink($theme, $node) { - return ($node->body) ? "[ <A HREF=\"node.php?id=$node->nid\"><FONT COLOR=\"$theme->link\">". t("read more") ."</FONT></A> | ". sizeof(explode(" ", $node->body)) ." ". t("words") ." | <A HREF=\"node.php?id=$node->nid\"><FONT COLOR=\"$theme->link\">". format_plural(node_get_comments($node->nid), "comment", "comments") ."</FONT></A> ]" : "[ <A HREF=\"node.php?id=$node->nid\"><FONT COLOR=\"$theme->link\">". format_plural(node_get_comments($node->nid), "comment", "comments") ."</FONT></A> ]"; + if ($node->body) { + $link[] = "<A HREF=\"node.php?id=$node->nid\"><FONT COLOR=\"$theme->link\">". t("read more") ."</FONT></A>"; + } + if ($node->comment) { + $link[] = "<A HREF=\"node.php?id=$node->nid\"><FONT COLOR=\"$theme->link\">". format_plural(node_get_comments($node->nid), "comment", "comments") ."</FONT></A>"; + } + + return ($link ? "[ ". implode(" | ", $link) ." ]" : ""); } function theme_moderation_results($theme, $node) { |