Damn Forum Viewing Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Damn Forum Viewing Problem

Post 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.
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post 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.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

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