FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to order by locked status first, date secondly?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to order by locked status first, date secondly? [message #26110] Tue, 05 July 2005 09:56 Go to next message
Tension   Netherlands
Messages: 2
Registered: July 2005
Karma: 0
Junior Member
(I hope this is the correct place to ask.)

Is it possible to sort a forum first by locked/unlocked status, and only after that in date? I admin a forum where lots of posts are locked quite fast and are in the majority. I'd like to filter them out by first sorting them by locked status (unlocked messages first, locked messages after that) and only apply order-by-date after that.

I know another way to achieve this would be to move all locked topics to another forum, but then I get loads of "This thread has been moved to <forum>" messages which are even more annoying.

Any help would greatly be appreciated.

--Tension
Re: How to order by locked status first, date secondly? [message #26115 is a reply to message #26110] Tue, 05 July 2005 13:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
There is no way to filter out or sort topics inside the forum based on their locked/unlocked status. If you want to get such a list use an SQL query to fetch topics where (thread_opt & 1) > 0.



FUDforum Core Developer
Re: How to order by locked status first, date secondly? [message #26118 is a reply to message #26115] Tue, 05 July 2005 13:40 Go to previous messageGo to next message
Tension   Netherlands
Messages: 2
Registered: July 2005
Karma: 0
Junior Member
Ilia wrote on Tue, 05 July 2005 15:13

There is no way to filter out or sort topics inside the forum based on their locked/unlocked status. If you want to get such a list use an SQL query to fetch topics where (thread_opt & 1) > 0.




Thanks for the quick response, but it does not really help. In what file are the fetch topic routines defined? Where should I tinker?
Re: How to order by locked status first, date secondly? [message #26119 is a reply to message #26118] Tue, 05 July 2005 14:17 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
There is a fetch topic API, inside fudapi.inc.php inside scripts/ directory.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Changing membership list
Next Topic: Porting FUDforum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 10:13:05 GMT 2024

Total time taken to generate the page: 0.02410 seconds