News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MessageIndex.template.php

Started by TheGamer, July 01, 2006, 04:36:30 PM

Previous topic - Next topic

TheGamer

Hey. What'd be the easiest way to make it so that threads are sorted by name from a-z by default? Thanks!

GTSdll

#1
I've sorted mine by editing Sources/MessageIndex.php:

find:

// View all the topics, or just a few?
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics'];


Add after:

        // Sort documentation board - added by GTS
        if (($board == 7) && !isset($_REQUEST['sort']))
$_REQUEST['sort'] = 'subject';


This method sorts only the board with the ID 7 by subject.
If you want all boards sorted by subject, do the folowing:


        // Sort boards by default - added by GTS
        if (!isset($_REQUEST['sort'])
$_REQUEST['sort'] = 'subject';


(used on SMF 1.1 RC2)
I hope it helps.

--GTSdll
---> GTSdll Homepage [nofollow] <---

TheGamer


Advertisement: