UseBB Community

The official board for UseBB help and discussion

UseBB Community » 1.0 Discussion » Sticky topics function

Sticky topics function

Page: 1

Author Post
Member
Registered: Apr 2006
Posts: 54
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: 2202
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;
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Apr 2006
Posts: 54
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!

Page: 1

UseBB Community » 1.0 Discussion » Sticky topics function

UseBB Community is powered by UseBB 1 Forum Software