From 6fbd8403df60e3afcf6ca2569c4ba1c7908c52f8 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Wed, 25 Jul 2001 08:31:52 +0000 Subject: [PATCH] comment.inc - removed comment_controls(). - modified comment_render() to use $theme->comment_controls(). theme.inc - added BaseTheme->comment_controls(). locale.module - can now search for status independant of language. - string is now a regular expression. For wildcard searches do .*text.*. - can search in modules + pages, all modules or a specific module. account.php - fixed viewing other accounts info would show the active users name in the real name field. - now shows users recent contributions and comments (if the user has access to them). --- account.php | 41 ++++++++++++++++++++++++++++++++++++++--- includes/comment.inc | 16 +--------------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/account.php b/account.php index e05772c0f05..af220522014 100644 --- a/account.php +++ b/account.php @@ -201,17 +201,52 @@ function account_user($uname) { $theme->footer(); } elseif ($uname && $account = account_get_user($uname)) { + $theme->header(); + + // Display account information: $output .= "
". t("Username") .": | ". check_output($account->userid) ." |
". t("Real name") .": | ". check_output($user->name) ." |
". t("Real name") .": | ". check_output($account->name) ." |
". t("E-mail") .": | ". format_email($account->fake_email) ." |
". t("Homepage") .": | ". format_url($account->url) ." |
". t("Bio") .": | ". check_output($account->bio) ." |
". t("Subject") .": | nid\">". check_output($node->title) ." (". format_plural($node->count, "comment", "comments") .") |
". t("Type") .": | ". check_output($node->type) ." |
". t("Date") .": | ". format_date($node->timestamp) ." |
\n"; + } + + $theme->box(strtr(t("%a's contributions"), array("%a" => $uname)), ($nodes ? $nodes : t("Not posted any nodes."))); + } + + if (user_access("access comments")) { + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS count FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.author = '$account->id' GROUP BY n.nid DESC ORDER BY n.nid DESC LIMIT 5"); + + while ($node = db_fetch_object($sresult)) { + $comments .= "