From 0b596a8ec426beb4df9f82bd74c82a1d8d5c8b18 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Wed, 29 May 2002 17:19:20 +0000 Subject: - modified the user blocks to use the same layout and trim long usernames to keep the blocks from ruining theme layouts. --- modules/user/user.module | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 5242a5b50..c656d8449 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -501,11 +501,10 @@ function user_block() { $result = db_query("SELECT uid, name FROM users WHERE timestamp > unix_timestamp() - $time ORDER BY timestamp DESC LIMIT $limit"); if (db_num_rows($result)) { - $output = "
    "; + $output = ""; while ($account = db_fetch_object($result)) { - $output .= '
  1. '.lm((strlen($account->name) > 10 ? substr($account->name, 0, 10) . '...' : $account->name), array("mod" => "user", "op" => "view", "id" => $account->uid)).'
  2. '; + $output .= lm((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), array("mod" => "user", "op" => "view", "id" => $account->uid)); } - $output .= "
"; $block[2]["content"] = $output; } $block[2]["subject"] = t("Who's online"); @@ -520,7 +519,7 @@ function user_block() { function user_new_users() { $result = db_query("SELECT uid, name FROM users WHERE status != '0' ORDER BY uid DESC LIMIT 5"); while ($account = db_fetch_object($result)) { - $output .= lm($account->name, array("mod" =>user, "op" => "view", "id" => $account->uid)) ."
"; + $output .= lm((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), array("mod" =>user, "op" => "view", "id" => $account->uid)) ."
"; } return $output; } -- cgit v1.2.3