diff --git a/includes/theme.inc b/includes/theme.inc index ae93fd605625b799924894568ccccbc8c5c33107..e8539f3ca532f94b6f901c1679d7aa45ec2825bc 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -522,7 +522,7 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) { function theme_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) { $output = "<div class=\"form-item\">\n"; - $required = $required ? theme('mark') : ''; + $required = $required ? theme('mark', 'required') : ''; if ($title) { if ($id) { @@ -698,10 +698,12 @@ function theme_block($block) { * Return a themed marker, useful for marking new comments or required form * elements. * + * @param $type + * Type of marker to return: 'new' or 'required' * @return * A string containing the marker. */ -function theme_mark() { +function theme_mark($type = 'new') { return '<span class="marker">*</span>'; } diff --git a/modules/comment.module b/modules/comment.module index 03a843f111fdd44f65cd156b628002b432fa02d4..dea5870a681f11530f38cbccc8c889b6e3351673 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 = "<div class=\"comment\">\n"; - $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') ."</div>\n"; + $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') ."</div>\n"; $output .= '<div class="moderation">'. $comment->moderation ."</div>\n"; $output .= '<div class="credit">'. t('by %a on %b', array('%a' => format_name($comment), '%b' => format_date($comment->timestamp))) ."</div>\n"; $output .= "<div class=\"body\">$comment->comment</div>\n"; @@ -1560,7 +1560,7 @@ function theme_comment($comment, $links = 0) { function theme_comment_folded($comment) { $output = "<div class=\"comment-folded\">\n"; - $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> '; + $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') .'</span> '; $output .= '<span class="credit">'. t('by') .' '. format_name($comment) ."</span>\n"; $output .= "</div>\n"; return $output; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 03a843f111fdd44f65cd156b628002b432fa02d4..dea5870a681f11530f38cbccc8c889b6e3351673 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 = "<div class=\"comment\">\n"; - $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') ."</div>\n"; + $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') ."</div>\n"; $output .= '<div class="moderation">'. $comment->moderation ."</div>\n"; $output .= '<div class="credit">'. t('by %a on %b', array('%a' => format_name($comment), '%b' => format_date($comment->timestamp))) ."</div>\n"; $output .= "<div class=\"body\">$comment->comment</div>\n"; @@ -1560,7 +1560,7 @@ function theme_comment($comment, $links = 0) { function theme_comment_folded($comment) { $output = "<div class=\"comment-folded\">\n"; - $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> '; + $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark', 'new') : '') .'</span> '; $output .= '<span class="credit">'. t('by') .' '. format_name($comment) ."</span>\n"; $output .= "</div>\n"; return $output; diff --git a/modules/tracker.module b/modules/tracker.module index 7c55cf27d8ea7342d693ba4900551b7762326e92..c4c918e8cb1f6b2f34d5d4d7d78462de668b5a75 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 7c55cf27d8ea7342d693ba4900551b7762326e92..c4c918e8cb1f6b2f34d5d4d7d78462de668b5a75 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)))