PDA

View Full Version : How to sort forums automatically


mickmel
12-09-2004, 01:25 AM
I'm building a site that has a ton of forums, sub-forums, etc. I'd like it if they could all be sorted alphabetically, ignoring the "display order" key. It's quite a pain to keep up with the "display order" for all of the games. It'd be much easier if I could just drop new forums in there and they'd be sorted automatically.

In fact, if I could just change it site-wide (which would probably be easiest anyhow), that'd be fine. I figured I could just find the ORDER BY clause in there somewhere, but I'm not having much luck.

I imagine this is a very minor code change somewhere. Any ideas?

mickmel
12-09-2004, 12:35 PM
I found in "functions_databuild.php", on line 48, the following:

$forums = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "forum ORDER BY parentid, displayorder");

I changed it to:

[code]$forums = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "forum ORDER BY parentid, title");

but that didn't do it. Any thoughts?