crepo,
Do you want only the "New Posts" link to:
a) sort threads
b) by forum title ascending and
c) then by last post time descending
or do you want the main listing (index.php) to sort this way as well?
If you want only "New Posts" to do it, you can just JOIN the forum table. This will slow down searches of course. Anyway, if you want *all* invocations of "New Posts" to work this way you can try this query (for 3.0.3, untested)...
Change the query on line 2133 to this:
Code:
$threads = $DB_site->query("
SELECT threadid
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS delthread ON(delthread.primaryid = thread.threadid AND delthread.type = 'thread')
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (thread.forumid=forum.forumid)
WHERE thread.forumid IN(" . implode(', ', $forumids) . ")
AND thread.lastpost >= $datecut
AND visible = 1
AND delthread.primaryid IS NULL
AND sticky IN (0,1)
ORDER BY forum.title ASC, thread.lastpost DESC
LIMIT $vboptions[maxresults]
");