red-x Posted February 15, 2009 Share Posted February 15, 2009 Hi, I coded my own forum (or I'm trying) and I don't know how to make it so the user knows when there's a new post in a thread. Like you know in every forum when there's a new post inside a thread a image icon changes. I'm trying to do that, but I just don't know how. I'm not sure if I have to use cookies or if I can do it with mysql? Any help will be really helpful. Thank you in advance. Link to comment https://forums.phpfreaks.com/topic/145284-new-post-in-thread-forum-question/ Share on other sites More sharing options...
Mchl Posted February 15, 2009 Share Posted February 15, 2009 If you do this with cookies, it will not work really well. It will be enough for user to change computer or even a browser to loose this information. That's how it worked in phpBB2 if I recall correctly. I guess you could just download source for SMF or other forum, and take a peek on how it's done. Link to comment https://forums.phpfreaks.com/topic/145284-new-post-in-thread-forum-question/#findComment-762690 Share on other sites More sharing options...
red-x Posted February 15, 2009 Author Share Posted February 15, 2009 Yeah I tried doing that, looking how other forums do it but is hard, the scripts are huge. and it's hard to find it. That's why I'm asking for help Link to comment https://forums.phpfreaks.com/topic/145284-new-post-in-thread-forum-question/#findComment-762771 Share on other sites More sharing options...
allworknoplay Posted February 15, 2009 Share Posted February 15, 2009 It's definitely not done with cookies because like Mchl said, you can just log into another PC and the info would be different. It probably has to deal with sessions of some sort that is also then stored in the DB. The session info is compared to the last post and if you log in, you can compare that info, if nothing has changed, then you get the old icon, if there's a new post, then when you compare, it's different, and you would get a new icon. I've never wrote my own forum so this is only how I see it happening logically..... Link to comment https://forums.phpfreaks.com/topic/145284-new-post-in-thread-forum-question/#findComment-762779 Share on other sites More sharing options...
red-x Posted February 15, 2009 Author Share Posted February 15, 2009 Thanks allworknoplay but I need some code to help me open my eyes. I was thinking the same thing, compare time between posts but I'm just not clear on how to do it. Link to comment https://forums.phpfreaks.com/topic/145284-new-post-in-thread-forum-question/#findComment-762971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.