Last Post Title
Posted: 27 Jul 2011, 08:40
Last Post Title
Written by LEW21
This codechanges will display the last post title of each forum on index page.
You see the last post titles to the right on this screenshot: Open: includes/functions_display.php
Find:
Replace with:
Find:
Replace with:
Open: styles/prosilver/template/forumlist_body.html
Find:
In line, add after:
Open: styles/subsilver2/template/forumlist_body.html
Find:
Add before:
Save, upload changed files and refresh the templates.
Written by LEW21
This codechanges will display the last post title of each forum on index page.
You see the last post titles to the right on this screenshot: Open: includes/functions_display.php
Find:
Code: Select all
$last_post_subject = $row['forum_last_post_subject'];
Code: Select all
if (substr($row['forum_last_post_subject'], 0, 4) == 'Re: ')
{
$last_post_subject = substr(censor_text($row['forum_last_post_subject']), 4);
}
else
{
$last_post_subject = censor_text($row['forum_last_post_subject']);
}
Code: Select all
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
Code: Select all
'LAST_POST_SUBJECT' => $last_post_subject,
'LAST_POST_SHORTENED_SUBJECT' => (utf8_strlen($last_post_subject) > 26) ? truncate_string($last_post_subject, 25) . "\xE2\x80\xA6" : $last_post_subject,
Find:
Code: Select all
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
Code: Select all
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LAST_POST_SHORTENED_SUBJECT}</a><br />
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"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LAST_POST_SHORTENED_SUBJECT}</a></p>