Log in

View Full Version : sub-forums in alphabetical order


dizzy2005
03-21-2003, 08:59 AM
i am looking for a way to have sub-forums sorted in alphabetical order automatically, without having to chage the order by hand in the "Modify Forums"-menu (this is because our forum has hundreds of sub-forums).

does anybody have an idea how to do this? thanks very much.

filburt1
03-21-2003, 10:52 AM
Find somewhere in index.php ORDER BY displayorder and change to ORDER BY title.

Dean C
03-21-2003, 02:24 PM
Or forumdisplay.php for sub-sub-forums ;)

- miSt

mcyates
05-26-2003, 08:08 AM
What whould i change in this code from forumdisplay.php to show the subforums in alphabeticqal order?

// display sub forums
$permissions = $getperms;
//Forum info
$forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder,forumid');
unset($iforumcache);
while ($forum=$DB_site->fetch_array($forums)) {
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forum[forumid]"] = $forum;
}
$DB_site->free_result($forums);
unset($forum);

mcyates
05-26-2003, 08:11 AM
sorry i have done it myself. I have had a habit of asking on here and then doing it myself. Sorry guys but here is the code i changed:

// display sub forums
$permissions = $getperms;
//Forum info
$forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,title,forumid');
unset($iforumcache);
while ($forum=$DB_site->fetch_array($forums)) {
$iforumcache["$forum[parentid]"]["$forum[title]"]["$forum[forumid]"] = $forum;
}
$DB_site->free_result($forums);
unset($forum);