Page 1 of 1

Damn Forum Viewing Problem

Posted: Thu Jan 02, 2003 1:46 pm
by Gen-ik
I only have 3 hairs left on my head after a mammoth 42.. no 43 hour long PHP scripting/debugging session.... this is me -> 8O

I've been pulling my hair out because of a problem which should be pretty straight forward to work out.. but after trying a million different ways of trying to make it work properly it does not.

The problem..

I've created quite a nice multi-level Forum similar (but not the same as) this one.. but I can't get the 'have I seen this one' script to work properly (you know when a new message or reply is posted and you know about it because the graphic net to it turns orange).

Does anyone know how to do this, or know somewhere I can take a look at some examples of how this is done.

My sanity is at stake!



Thanks in advance.

Posted: Thu Jan 02, 2003 4:14 pm
by qads
have you tried it with a cookie?
set a cookie with a time stamp and when the user visits agian just compare it with the posts time stamp, if it is new then change the graphic to orange or whatever u wanna do.

you can use a db table too, just make another field in user table, 'last_visit', update it with time(); every time the user moves to a page and compare it's value with posts time stamp to show if the post is new or not.

Posted: Thu Jan 02, 2003 4:22 pm
by Gen-ik
Doh!

Probably one of the easiest ways to do it.. and it's the one thing I didn't think of trying!

I'm going to get some much needed sleep and then try it out.

Thanks for your help.