UseBB Community

UseBB support, discussion and development

Sticky topics function

Post Reply

Page: 1

Author Post
Member
Registered: Apr 2006
Posts: 52
Location: Athens, Greece
Where is the function which makes a topic sticky? I mean, not setting the status to 'sticky' but showing it above normal topics in the forums page.

I 've been searching all day.. :x Im asking cuz im planning to make a mod and I need this function..
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
There isn't really a "function" for this. Sticky is a flag in the database. Upon requesting topics, they are sorted by sticky flag (among others). If a topic is sticky, it gets the sticky prefix.

if ( $topicdata['status_sticky'] )
$topic_name = $lang['Sticky'].': '.$topic_name;
Member
Registered: Apr 2006
Posts: 52
Location: Athens, Greece
Oh, I see..

ORDER BY t.status_sticky DESC, p2.post_time DESC


That's why I couldn't find what I wanted. That is done from within the db query.. :oops:

Thank you Dietrich!

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software