From 59c2208ea68c4695fe0fa2122b786ac5eb748383 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 30 Jan 2005 09:53:19 +0000 Subject: - Patch #16253 by Goba: incremental improvements to the new content markers. Goba: it would be nice if one of the core themes would showcase this functionality. ;-) --- modules/comment/comment.module | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 18c46f354..22c51bd15 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1017,7 +1017,7 @@ function comment_admin_overview($type = 'new') { while ($comment = db_fetch_object($result)) { $comment->name = $comment->uid ? $comment->registered_name : $comment->name; $rows[] = array( - l($comment->subject, "node/$comment->nid", array('title' => htmlspecialchars(truncate_utf8($comment->comment, 128))), NULL, "comment-$comment->cid") ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme('mark', 'new') : ''), + l($comment->subject, "node/$comment->nid", array('title' => htmlspecialchars(truncate_utf8($comment->comment, 128))), NULL, "comment-$comment->cid") ." ". theme('mark', node_mark($comment->nid, $comment->timestamp)), format_name($comment), ($comment->status == 0 ? t('Published') : t('Not published')), format_date($comment->timestamp, 'small'), @@ -1428,8 +1428,7 @@ function theme_comment_view($comment, $links = '', $visible = 1) { // Emit selectors: $output = ''; - if (node_is_new($comment->nid, $comment->timestamp)) { - $comment->new = 1; + if (($comment->new = node_mark($comment->nid, $comment->timestamp)) != MARK_READ) { $output .= "\n"; } @@ -1549,7 +1548,7 @@ function theme_comment_moderation_form($comment) { function theme_comment($comment, $links = 0) { $output = "
\n"; - $output .= '
'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') ."
\n"; + $output .= '
'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ' ' . theme('mark', $comment->new) ."
\n"; $output .= '
'. $comment->moderation ."
\n"; $output .= '
'. t('by %a on %b', array('%a' => format_name($comment), '%b' => format_date($comment->timestamp))) ."
\n"; $output .= "
$comment->comment
\n"; @@ -1560,7 +1559,7 @@ function theme_comment($comment, $links = 0) { function theme_comment_folded($comment) { $output = "
\n"; - $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ' '. theme('mark', $comment->new) .' '; $output .= ''. t('by') .' '. format_name($comment) ."\n"; $output .= "
\n"; return $output; -- cgit v1.2.3