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

Home » FUDforum » How To » force announcements above stickies
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
force announcements above stickies [message #27549] Mon, 12 September 2005 14:05 Go to next message
Marticus   United States
Messages: 272
Registered: June 2002
Karma: 1
Senior Member
How would one force announcements to have higher importance than stickies so that they reside above them in the forums?
Re: force announcements above stickies [message #27551 is a reply to message #27549] Mon, 12 September 2005 14:14 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
Post a reply in them, the sorting of announcement and stickies is still by date of the last post inside the topic.

FUDforum Core Developer
Re: force announcements above stickies [message #27552 is a reply to message #27551] Mon, 12 September 2005 14:21 Go to previous messageGo to next message
Marticus   United States
Messages: 272
Registered: June 2002
Karma: 1
Senior Member
Some of the stickies are ongoing conversation. It seems like announcements should go on top anyway. They are -red- after all. Red means read or die Smile
Re: force announcements above stickies [message #27555 is a reply to message #27552] Mon, 12 September 2005 14:37 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
That's not how it works.

FUDforum Core Developer
Re: force announcements above stickies [message #27573 is a reply to message #27555] Mon, 12 September 2005 17:57 Go to previous messageGo to next message
Marticus   United States
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 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
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 Go to previous messageGo to next message
Marticus   United States
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 #27582 is a reply to message #27581] Tue, 13 September 2005 14:42 Go to previous messageGo to next message
Marticus   United States
Messages: 272
Registered: June 2002
Karma: 1
Senior Member
Or not... I changed a sticky to an announcement and it seems to only work after I run the consistency checker. I suppose this is what I get for not completely understanding the code. Another little hint would be greatly appreciated.

[Updated on: Tue, 13 September 2005 14:43]

Report message to a moderator

Re: force announcements above stickies [message #27583 is a reply to message #27582] Tue, 13 September 2005 16:36 Go to previous message
Ilia is currently offline  Ilia   Canada
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to sort for popular topics
Next Topic: Rank picture for admin and moderator
Goto Forum:
  

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

Current Time: Sun Nov 10 02:55:14 GMT 2024

Total time taken to generate the page: 0.02578 seconds