Adding last post's subject to index
Description: This article describes how to add the last post's subject to the index page of your board.
In Categories: Styles
- Link to this article: Select All
[url=https://www.phpbb.com/support/docs/en/3.0/kb/article/adding-last-posts-subject-to-index/]Knowledge Base - Adding last post's subject to index[/url]
First, open /includes/functions_display.php and find:
Code: Select all
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
Replace that line with:
Code: Select all
'LAST_POST_SUBJECT' => (utf8_strlen(censor_text($last_post_subject)) > 10) ? utf8_substr(censor_text($last_post_subject), 0, 10) . '...' : censor_text($last_post_subject),
prosilver
Open /styles/prosilver/template/forumlist_body.html and find (note the code below is part of a larger line):
Code: Select all
<dfn>{L_LAST_POST}</dfn>
On the same line right before the text above, add:
Code: Select all
{forumrow.LAST_POST_SUBJECT}<br />
The whole line should look like this:
Code: Select all
<!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_SUBJECT}<br /><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
subsilver2
Now, open /styles/subsilver2/template/forumlist_body.html and find
Code: Select all
<p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a> <!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
Code: Select all
<p class="topicdetails">{forumrow.LAST_POST_SUBJECT}</p>
Now save all files and purge your cache. Your index page should now look like this:
prosilver
subsilver2
For those looking for more features, such as ACP controls, there are MODs, such as:
Latest Topic Title
NV advanced last topic titles
th23 Last Post Subject
There may be others in the Modification database.
- Oyabun1 Added subsilver2 edit and MOD info