MyBB Community Forums

Full Version: Separate Locked topics on bottom of threadlist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want the locked topics on the bottom of the threadlist. Example:

Sticky topics
Topic 1
Topic 2
Regular Topics
Topic 3
Topic 4
Topic 5
Locked Topics
Locked topic 1
Locked topic 2

is there a way how to do this?
Sticky's go at the top anyway so that's not an issue. For the locked topic part you would need some sort of plugin to do that. (I don't know of one that exists).
do you want this setup in all forums or only specific ones?

if all forums and only for the forum display, then you can alter a single line in a single core file by inserting "t.closed, " after "ORDER BY" on line 704 of forumdisplay.php

its not an easy thing to put into a plugin as the query to obtain the thread list is directly in a $db->query() function and there are no variables to modify via a plugin that are used in the proper location of the query statement.

if you want to be able to select which forums to apply this to, you would still need to modify the core file with a variable instead of the "t.closed, " then populate that variable via your plugin when the forum ID is listed to be sorted in that way.
(2010-10-15, 07:41 PM)pavemen Wrote: [ -> ]do you want this setup in all forums or only specific ones?

if all forums and only for the forum display, then you can alter a single line in a single core file by inserting "t.closed, " after "ORDER BY" on line 704 of forumdisplay.php

its not an easy thing to put into a plugin as the query to obtain the thread list is directly in a $db->query() function and there are no variables to modify via a plugin that are used in the proper location of the query statement.

if you want to be able to select which forums to apply this to, you would still need to modify the core file with a variable instead of the "t.closed, " then populate that variable via your plugin when the forum ID is listed to be sorted in that way.

It worked, but how can i add a separator for the closed topics?
can i do this for all forums ? i mean in any forum to separate active topics from closed topics ... please tell me how to do that !
(2010-10-16, 06:55 AM)ThunderStorm Wrote: [ -> ]It worked, but how can i add a separator for the closed topics?

That would require a lot more edits and a new template. More than I can get into right now

(2010-10-16, 03:23 PM)newb Wrote: [ -> ]can i do this for all forums ? i mean in any forum to separate active topics from closed topics ... please tell me how to do that !

See above, not without a lot of edits to deal with the separate type of threads; sticky, normal and now closed.

Also, what about sticky threads that are closed? Where do you want those shown? If you would want closed sticky threads at the bottom of the sticky section, then that would take even more work since it would involve additional queries and a lot more code change.