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. Quote Link to comment 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. Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.