From d016fb14f43976ba184d3e0597065b15f5eca1f0 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Wed, 25 Jul 2001 12:21:48 +0000 Subject: common.inc - format_username() now takes a second optional parameter which gives the real name of the user. Rest - updated the calls to format_username() where appropriate to show the name of the user instead of the account id. Clicking on a name will still give you the account info etc. If you find a place where the real name is not shown let me know. --- includes/comment.inc | 6 +++--- includes/node.inc | 2 +- includes/search.inc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'includes') diff --git a/includes/comment.inc b/includes/comment.inc index 870d5feb8..757a27c89 100644 --- a/includes/comment.inc +++ b/includes/comment.inc @@ -52,7 +52,7 @@ function comment_form($edit) { global $REQUEST_URI, $user; // name field: - $form .= form_item(t("Your name"), format_username($user->userid)); + $form .= form_item(t("Your name"), format_username($user->userid, $user->name)); // subject field: $form .= form_textfield(t("Subject"), "subject", $edit[subject], 50, 64); @@ -216,7 +216,7 @@ function comment_view($comment, $folded = 0) { // display comment: if ($folded) $theme->comment($comment, $folded); - else print "lid&cid=$comment->cid#$comment->cid") ."\">". check_output($comment->subject) ." by ". format_username($comment->userid) ." ($comment->score)
"; + else print "lid&cid=$comment->cid#$comment->cid") ."\">". check_output($comment->subject) ." by ". format_username($comment->userid, $comment->name) ." ($comment->score)
"; } function comment_thread_min($cid, $threshold) { @@ -278,7 +278,7 @@ function comment_render($lid, $cid) { print "
\n";
$output .= " $entry[title]
";
- $output .= " $entry[link]". ($entry[user] ? " - ". format_username($entry[user]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") ."";
+ $output .= " $entry[link]". ($entry[user] ? " - ". format_username($entry[user], $entry[name]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") ."";
$output .= "