MyBB Community Forums

Full Version: Can the most recent reply be at the top?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been playing with a MyBB at http://demo.opensourcecms.com/mybb and it appears to have everything I want for my board; however, is it possible to have the most recent reply to a thread appear at the top?

It looks like I can change the order that the Thread's appear in within a Forum, but is it possible to change the order that the Reply's appear in within a single Thread?

What I want to do is use a thread as a blog of events/announcements/updates and I don't want my users to have to click on a new thread every time or to have to go to the last page on that thread to see the most recent activity.

Thanks,
Randy
Interesting; It may confuse your users but you can do this:

In showthread.php find:

$query = $db->query("
			SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername
			FROM ".TABLE_PREFIX."posts p
			LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
			LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
			LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)
			WHERE $pids
			ORDER BY p.dateline
		");

Replace with:

$query = $db->query("
			SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername
			FROM ".TABLE_PREFIX."posts p
			LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
			LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
			LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)
			WHERE $pids
			ORDER BY p.dateline DESC
		");

Haven't tested so there's no guarantee it won't break something.
I'll let you know if it works.

Thanks for the quick reply.
Randy