summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-08-22 21:35:25 +0000
committerDries Buytaert <dries@buytaert.net>2003-08-22 21:35:25 +0000
commit4d16c7c65bdd9833b6e6852c49f029ab003f8e2e (patch)
tree0fe9c2a0bb33b04f211520b95ca719983b14a10e /modules
parentea86b76c9a6c126e892f8b904a49f35f8e4bff2b (diff)
downloadbrdo-4d16c7c65bdd9833b6e6852c49f029ab003f8e2e.tar.gz
brdo-4d16c7c65bdd9833b6e6852c49f029ab003f8e2e.tar.bz2
Implemented more suggestions by Keith:
- Made sure the 'Topic' title is only shown above the topics, not the icons. - Automatically shorten the username when it is too long. I implemented this as part of format_name() and could therefore nuke some code in the statistics module. This is change is somewhat experimental and I'm willing to revert or change this if a number of people aren't too happy with this behavior. - Left align the dates and authors: makes it easier/faster to scan. - Made the little tablesort arrows clickable.
Diffstat (limited to 'modules')
-rw-r--r--modules/forum.module3
-rw-r--r--modules/forum/forum.module3
-rw-r--r--modules/statistics.module3
-rw-r--r--modules/statistics/statistics.module3
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/forum.module b/modules/forum.module
index a8a05d1b8..a1220f8e2 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -321,7 +321,8 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
global $user, $forum_topic_list_header;
$forum_topic_list_header = array(
- array("data" => t("Topic"), "field" => "n.title", "colspan" => "2"),
+ array("data" => "&nbsp;"),
+ array("data" => t("Topic"), "field" => "n.title"),
array("data" => t("Replies"),"field" => "num_comments"),
array("data" => t("Created"), "field" => "n.created"),
array("data" => t("Last reply"), "field" => "date_sort", "sort" => "desc"),
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index a8a05d1b8..a1220f8e2 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -321,7 +321,8 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
global $user, $forum_topic_list_header;
$forum_topic_list_header = array(
- array("data" => t("Topic"), "field" => "n.title", "colspan" => "2"),
+ array("data" => "&nbsp;"),
+ array("data" => t("Topic"), "field" => "n.title"),
array("data" => t("Replies"),"field" => "num_comments"),
array("data" => t("Created"), "field" => "n.created"),
array("data" => t("Last reply"), "field" => "date_sort", "sort" => "desc"),
diff --git a/modules/statistics.module b/modules/statistics.module
index 8a83afcb9..69948922c 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -637,12 +637,11 @@ function statistics_display_online_block() {
if (user_access("access userlist") && $users) {
/* Display a list of currently online users */
$max_users = variable_get("statistics_block_online_max_cnt", 10);
- $max_name_len = variable_get("statistics_block_online_max_len", 15);
$uid = reset($user_list);
while (($uid) && ($max_users)) {
$user = user_load(array("uid" => $uid));
/* When displaying name, be sure it's not more than defined max length */
- $items[] = l((strlen($user->name) > $max_name_len ? substr($user->name, 0, $max_name_len) ."..." : $user->name), "user/view/$user->uid");
+ $items[] = format_name($user);
$uid = next($user_list);
/*
** When $max_users reaches zero, we break out even if there are
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 8a83afcb9..69948922c 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -637,12 +637,11 @@ function statistics_display_online_block() {
if (user_access("access userlist") && $users) {
/* Display a list of currently online users */
$max_users = variable_get("statistics_block_online_max_cnt", 10);
- $max_name_len = variable_get("statistics_block_online_max_len", 15);
$uid = reset($user_list);
while (($uid) && ($max_users)) {
$user = user_load(array("uid" => $uid));
/* When displaying name, be sure it's not more than defined max length */
- $items[] = l((strlen($user->name) > $max_name_len ? substr($user->name, 0, $max_name_len) ."..." : $user->name), "user/view/$user->uid");
+ $items[] = format_name($user);
$uid = next($user_list);
/*
** When $max_users reaches zero, we break out even if there are