Jump to content

New post in thread, forum question


red-x

Recommended Posts

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

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.

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.....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.