next Posted July 29, 2008 Share Posted July 29, 2008 How does this feature works? I'm building a forum and about to get to this part, but have absolutely no idea on how to implement it. Could anyone explain please? Thanks. Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/ Share on other sites More sharing options...
obsidian Posted July 29, 2008 Share Posted July 29, 2008 The basic premise is that you store the time of the person's last visit (session time) in the DB so that you can easily query against the database for any topics with posts that have been made since the member's last activity. Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602760 Share on other sites More sharing options...
d.shankar Posted July 29, 2008 Share Posted July 29, 2008 You need to look at www.phpbb.com Dont put yourself in strain to reinvent the wheel ! Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602761 Share on other sites More sharing options...
revraz Posted July 29, 2008 Share Posted July 29, 2008 While I would agree with this most of the time, it depends on what his purpose is. If it's to learn how to code, then there is nothing wrong with writing his own. If we all didn't reinvent the wheel once in awhile, we'd still be using wheels made of stone. You need to look at www.phpbb.com Dont put yourself in strain to reinvent the wheel ! Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602768 Share on other sites More sharing options...
TempleDMDKrazd Posted July 29, 2008 Share Posted July 29, 2008 well, since all the threads should be timestamped then it should be relatively easy...the question you need to ask yourself is how many new posts should be shown? query the mySQL database server and ORDER BY timestampVariable DESC LIMIT 10; if you want the 10 most recent ones... Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602777 Share on other sites More sharing options...
d.shankar Posted July 29, 2008 Share Posted July 29, 2008 yes revraz... sorry next Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602778 Share on other sites More sharing options...
next Posted July 29, 2008 Author Share Posted July 29, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602812 Share on other sites More sharing options...
d.shankar Posted July 29, 2008 Share Posted July 29, 2008 Click "Topic Solved" please. Link to comment https://forums.phpfreaks.com/topic/117187-solved-new-posts-in-forum/#findComment-602814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.