Page 1 of 1

new?

Posted: Mon Nov 10, 2003 2:01 pm
by Johnzer
Hey all,

I was wondering does anyone know how to do this:

When you login, and if you have a new pm or theres a new upcoming important event how would I got about displaying this??

A perfect example is when you recieve a new pm (on this forum) and you login and it says how many new pm's you have, but I dont want it in a popup just an echo statement and another good example is when the images change to orange (on this board), when there is a new message since the last time you logged in/read that thread, btw I not making a forum just wondering how to do these things as I am making a script for my clan site (not up yet).

All help apperiated

Posted: Mon Nov 10, 2003 2:08 pm
by qads
in the database, the PMs table has a field called "read", when you have viewd your messsage, it puts a value in it, later when you move to another page, it checks to see if there is any message with out a value in "read" field, if there is then thats the new message.

make sense?

Posted: Tue Nov 11, 2003 10:06 am
by Johnzer
Yes I understand quite perfectly, how would i go about inserting this value into the database when the user checks on the message and goes into it to read it (the message it self)

Posted: Tue Nov 11, 2003 10:09 am
by twigletmac
When the user goes to read the message there's a bit of script that runs which uses the user's ID and the message's ID in order to update a record. So basically all you need is a unique identifier for your user and one for the message and you can mark stuff read for a particular user.

Mac

Posted: Tue Nov 11, 2003 11:38 am
by Johnzer
Thanks qads and twigletmac, I'll try the user id and message id thing, once again thanks!