jrws Posted June 30, 2009 Share Posted June 30, 2009 Hey there, I have made a custom forum and so far so good, I was wondering how I can make the topics become 'stickyed' and stay at the top of the page? Would I need a new row on the topic table? What about locking, I am thinking only access levels can post. Or something like that. Any help is appreciated, Thanks, James. Link to comment https://forums.phpfreaks.com/topic/164183-solved-lock-and-sticky-posts/ Share on other sites More sharing options...
Daniel0 Posted June 30, 2009 Share Posted June 30, 2009 Create extra columns on the topic table, like is_locked and is_sticky. Then just do something like: SELECT id, subject FROM topics WHERE forum_id = 5 ORDER BY is_sticky DESC, last_post_date DESC; The ordering by is_sticky being the most important part here of course. When people try to reply you would just check if it's locked and if they have the appropriate permissions for posting in a locked topic. Link to comment https://forums.phpfreaks.com/topic/164183-solved-lock-and-sticky-posts/#findComment-866198 Share on other sites More sharing options...
jrws Posted June 30, 2009 Author Share Posted June 30, 2009 Thanks. I can't believe I am always so silly, the answers I want are usually the simplest. Thanks again! Link to comment https://forums.phpfreaks.com/topic/164183-solved-lock-and-sticky-posts/#findComment-866729 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.