From 720fc46807f92364321bcb26291eafea1688c5ca Mon Sep 17 00:00:00 2001 From: Rahul R Date: Tue, 3 Apr 2012 21:36:26 +0530 Subject: [PATCH] [ticket/10650] Cropped subject and inserted newline The subject being displayed in the forum list have been shortened to 30 characters. Also it is now being shown in a separate line. PHPBB3-10650 --- phpBB/includes/functions_display.php | 5 +++++ phpBB/styles/prosilver/template/forumlist_body.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 9b80763ee4..b331ed7d71 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -397,6 +397,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod if ($row['forum_last_post_id']) { $last_post_subject = $row['forum_last_post_subject']; + if (strlen($last_post_subject) > 30) + { + $last_post_subject = substr($last_post_subject, 0, 30); + $last_post_subject .= '...'; + } $last_post_time = $user->format_date($row['forum_last_post_time']); $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id']; } diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html index 17454ed330..68df81932a 100644 --- a/phpBB/styles/prosilver/template/forumlist_body.html +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -46,7 +46,7 @@ {UNAPPROVED_IMG} {L_LAST_POST} - {forumrow.LAST_POST_SUBJECT} + {forumrow.LAST_POST_SUBJECT}
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL} {LAST_POST_IMG}
{forumrow.LAST_POST_TIME}{L_NO_POSTS}