From 467dbdc4a1d51d9139df1e7ea9efdc8a310867bb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 27 Jan 2005 12:57:08 +0000 Subject: - Patch #16253 by Goba: this simple and straightforward patch adds the ability to define different types of markers (while retaining the old default behaviour of the new and required markers to look the same). Someone with enough time on his hands might be able to partition the new marker to a real new marker and a changed marker (since node_is_new() returns TRUE even if nodes changed, and not only when they are new). This is the base on which the new patch can be worked though. --- modules/comment.module | 6 +++--- modules/comment/comment.module | 6 +++--- modules/tracker.module | 2 +- modules/tracker/tracker.module | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/comment.module b/modules/comment.module index 03a843f11..dea5870a6 100644 --- a/modules/comment.module +++ b/modules/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') : ''), + 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') : ''), format_name($comment), ($comment->status == 0 ? t('Published') : t('Not published')), format_date($comment->timestamp, 'small'), @@ -1549,7 +1549,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') : '') ."
\n"; + $output .= '
'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', '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 +1560,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') : '') .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') .' '; $output .= ''. t('by') .' '. format_name($comment) ."\n"; $output .= "
\n"; return $output; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 03a843f11..dea5870a6 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') : ''), + 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') : ''), format_name($comment), ($comment->status == 0 ? t('Published') : t('Not published')), format_date($comment->timestamp, 'small'), @@ -1549,7 +1549,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') : '') ."
\n"; + $output .= '
'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', '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 +1560,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') : '') .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') .' '; $output .= ''. t('by') .' '. format_name($comment) ."\n"; $output .= "
\n"; return $output; diff --git a/modules/tracker.module b/modules/tracker.module index 7c55cf27d..c4c918e8c 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -101,7 +101,7 @@ function tracker_page($uid = 0) { $rows[] = array( node_invoke($node->type, 'node_name'), - l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''), + l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark', 'new') : ''), format_name($node), array('class' => 'replies', 'data' => $comments), t('%time ago', array('%time' => format_interval(time() - $node->last_post))) diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 7c55cf27d..c4c918e8c 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -101,7 +101,7 @@ function tracker_page($uid = 0) { $rows[] = array( node_invoke($node->type, 'node_name'), - l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''), + l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark', 'new') : ''), format_name($node), array('class' => 'replies', 'data' => $comments), t('%time ago', array('%time' => format_interval(time() - $node->last_post))) -- cgit v1.2.3