mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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
This commit is contained in:
parent
bc21dec9c0
commit
720fc46807
2 changed files with 6 additions and 1 deletions
|
@ -397,6 +397,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
if ($row['forum_last_post_id'])
|
if ($row['forum_last_post_id'])
|
||||||
{
|
{
|
||||||
$last_post_subject = $row['forum_last_post_subject'];
|
$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_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'];
|
$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'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
||||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
||||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||||
<a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_SUBJECT}</a>
|
<a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_SUBJECT}</a></br>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
|
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
|
||||||
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br /> <!-- ENDIF --></span>
|
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br /> <!-- ENDIF --></span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue