These 2 little code snippets allow you to change the way topics are ordered in your forums.
The 1st snippet changes all forums and the 2nd allows you to customise which forums stay static. By static, I mean the order in which the topics were created - topic_time
Snippet 1
OPEN: viewforum.php
FIND:
Code: Select all
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
REPLACE WITH:
Code: Select all
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
Snippet 2
OPEN: viewforum.php
FIND:
Code: Select all
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
REPLACE WITH:
Code: Select all
$static_forums = array(1, 2, 3); // replace 1, 2, 3 with your forum ID's.
if (in_array($forum_id, $static_forums))
{
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
}
else
{
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
}