diff --git a/html/inc/forum.inc b/html/inc/forum.inc
index a5121a550f..8e1e35cb8d 100644
--- a/html/inc/forum.inc
+++ b/html/inc/forum.inc
@@ -220,17 +220,15 @@ function show_team_forum_title($forum, $thread=null, $link_thread=false) {
echo "";
}
-// start a table containing messages, where the layout is fixed
-// (to accommodate long [pre] lines)
-// and the left column (author info) has fixed size
+// start a table of forum posts
//
function start_forum_table($headings) {
$a = array();
foreach ($headings as $h) {
$a[] = null;
}
- $a[0] = 'style="width: 10em;"';
- start_table('table-striped', 'table-layout:fixed');
+ $a[1] = 'style="width: 100%"';
+ start_table('table-striped');
row_heading_array($headings, $a);
}
@@ -588,7 +586,7 @@ function show_post(
id\">
";
- echo user_links($user, 0);
+ echo user_links($user, 0, 30);
echo "
";
if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW."
";
echo "";
diff --git a/html/inc/user.inc b/html/inc/user.inc
index 72533aa65e..98829f4d0c 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -326,8 +326,9 @@ function friend_links($user) {
// show user name, with links to profile if present.
// if $badge_height is > 0, show badges
+// if $name_limit, limit name to N chars
//
-function user_links($user, $badge_height=0) {
+function user_links($user, $badge_height=0, $name_limit=0) {
BoincForumPrefs::lookup($user);
if (is_banished($user)) {
return "(banished: ID $user->id)";
@@ -337,7 +338,11 @@ function user_links($user, $badge_height=0) {
$img_url = url_base()."img/head_20.png";
$x .= ' ';
}
- $x .= " id."\">".$user->name."";
+ $name = $user->name;
+ if ($name_limit && strlen($name) > $name_limit) {
+ $name = substr($name, 0, $name_limit)."...";
+ }
+ $x .= " id."\">".$name."";
if (function_exists("project_user_links")){
$x .= project_user_links($user);
}