|
|
|
|
Re: force announcements above stickies [message #27573 is a reply to message #27555] |
Mon, 12 September 2005 17:57 |
Marticus
Messages: 272 Registered: June 2002
Karma: 1
|
Senior Member |
|
|
This brings me back to my original question as to how one would go about making it work that way and/or how difficult it would be. I know everyone has different ideas for how a forum should work. Here are my two cents. It would seem to make sense that announcements go above all other stickies. As stickies are usually regular threads that got stickied and announcements are usually one time posts.
|
|
|
Re: force announcements above stickies [message #27575 is a reply to message #27573] |
Mon, 12 September 2005 20:39 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, you'd modify the code inside th_adm.inc.t that generates the initial order. In particular the rebuild_forum_view() function.
FUDforum Core Developer
|
|
|
Re: force announcements above stickies [message #27581 is a reply to message #27575] |
Tue, 13 September 2005 14:29 |
Marticus
Messages: 272 Registered: June 2002
Karma: 1
|
Senior Member |
|
|
This seems to have done the trick.
ORDER BY (CASE WHEN thread_opt>=4 THEN 4294967294 WHEN thread_opt>=2 THEN 4294967296 ELSE {SQL_TABLE_PREFIX}thread.last_post_date END) ASC');
Thanks for the pointer. By the way, that's a very clever approach to ordering, at least from my perspective.
[Updated on: Tue, 13 September 2005 14:31] Report message to a moderator
|
|
|
|
Re: force announcements above stickies [message #27583 is a reply to message #27582] |
Tue, 13 September 2005 16:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well the rebuild code only runs in some situations, most operations like adding a topic or posting a new just update position index. What you need to do is add handlers to the other functions inside th_adm.inc.t to differentiate between stickys and announcements.
FUDforum Core Developer
|
|
|