Page 1 of 1
Show forums with new posts indicator
Posted: Mon Aug 14, 2006 12:32 am
by AlecH
Hello all,
I am trying to make a bulletin board system for my site and I am trying to make a Forums with new posts inidcator on the index page. For example, when you make a new post in a forum that hasnt been posted in in a while, the icon next to the forum turns a different color or something normally. Well I know this has something to do with cookies, but I cant figure it out. So, could someone possibly give me a real straight forward example of how you might do this.
Thanks!
-maddog39
Posted: Mon Aug 14, 2006 1:00 am
by RobertGonzalez
This does not necessarily have to do with cookies. What is your comparison of new based on?
Posted: Mon Aug 14, 2006 1:00 am
by feyd
There's a couple of things recorded: The major one is the last time the user was seen from a previous login. This creates your new posts list. The second recording is when posts/threads are read, so they disappear from the new list. The time of reading is needed for each of them so you know when the thread becomes new again during their session.
Posted: Mon Aug 14, 2006 2:50 pm
by AlecH
Okay, but what I dont understand is how you record the last time the user visited, because I cant figure out how and when you would update that,
Posted: Mon Aug 14, 2006 3:01 pm
by RobertGonzalez
You update it as the user visits... in their row of the sessions table (if you are using stored session data).
Posted: Mon Aug 14, 2006 3:32 pm
by feyd
The only time it ever gets updated would be when the user logs in, or visits from a machine that uses some form of "Remember Me" that doesn't have a current session.
Posted: Tue Aug 15, 2006 12:32 am
by AlecH
Okay, thanks I think i've got it now.
Posted: Tue Aug 15, 2006 5:23 am
by Tom420
Or you get phpBB at
http://www.phpbb.com/
Free (as in Free Speech) forum. You are using phpBB at the moment

Re: Show forums with new posts indicator
Posted: Tue Aug 15, 2006 11:59 am
by RobertGonzalez
AlecH wrote:I am trying to make a bulletin board system for my site and I am trying to make a Forums with new posts inidcator on the index page.
He's trying to make one, not find one.
Posted: Tue Aug 15, 2006 3:11 pm
by Tom420
I was just giving a suggestion. Maybe he didn't know phpBB was freely available. Sometime, people go for the long solution without realizing there is an easy solution available. I didn't says phpBB would suits his needs though.
Posted: Tue Aug 15, 2006 3:50 pm
by RobertGonzalez
Fair enough. Typically I give the poster the benefit of the doubt... when they say that are building something then I assume they actually want to do that. But I can see your point. I have approached several posts that way before. No harm done.