liam1412 Posted December 27, 2006 Share Posted December 27, 2006 How do I create the "Sticky" topics that always remain at the top. What theoretically is the code involved for this. Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/ Share on other sites More sharing options...
obsidian Posted December 27, 2006 Share Posted December 27, 2006 Theoretically, you simply need to have a flag that designates whether or not each thread is sticky. Then, when you run your query to retrieve all your records, simply order by the flag first, then alphabetically or by datestamp or however you wish to sort. Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148251 Share on other sites More sharing options...
liam1412 Posted December 27, 2006 Author Share Posted December 27, 2006 Cheers Obsidian. Thought it would be a lot more complicated than that. Now just one more thing. How do I lock a topic so it can still be read but not ba added too. in fact do you just want to write my script. ha ha Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148293 Share on other sites More sharing options...
obsidian Posted December 27, 2006 Share Posted December 27, 2006 [quote author=liam1412 link=topic=120020.msg492097#msg492097 date=1167232543]Cheers Obsidian. Thought it would be a lot more complicated than that. Now just one more thing. How do I lock a topic so it can still be read but not ba added too. in fact do you just want to write my script. ha ha[/quote]LOL... no thanks ;) I've already written enough of my own :PYou could do it with another flag or attribute. If it is set to "locked," you know not to allow anyone but admin and mods to write to it. Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148313 Share on other sites More sharing options...
liam1412 Posted December 27, 2006 Author Share Posted December 27, 2006 [quote]You could do it with another flag or attribute. If it is set to "locked," you know not to allow anyone but admin and mods to write to it.[/quote]It's all so simple when you tell say it. I just can't seem to think of a way at the time.Ta Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148454 Share on other sites More sharing options...
obsidian Posted December 27, 2006 Share Posted December 27, 2006 [quote author=liam1412 link=topic=120020.msg492260#msg492260 date=1167251685]It's all so simple when you tell say it. I just can't seem to think of a way at the time.[/quote]Sometimes (well, OK, [i]most[/i] of the time), the planning is the hardest part. Also, it can be very tricky to make sure that you have accounted for all the flags and rules you set up when it comes time to actually process posts and threads. The best thing you can do sometimes is to sit down and draw out the full flow on paper. Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148457 Share on other sites More sharing options...
liam1412 Posted December 27, 2006 Author Share Posted December 27, 2006 I figured this from this project but it's too late to start again. I will learn from my mistakes!!!! I find this is my best way to learn tho. I just jump in and figure out what I did wrong. Its worked for everything I have learned. Seems silly i know but we all have our ways eh!!! ha ha Link to comment https://forums.phpfreaks.com/topic/31945-help-with-my-forum/#findComment-148476 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.