Hi all
I\'m developing a forum for my website. I almost complete the scripting. But now i\'m facing a problem that is abt new. Like this php world what is happening.. when a new topic submitted a \'new\' word shown beside it. And untill a perticular user see this, he/she see that topic as new. I hope u understand what i mean. Please i need this as soon as possible. Please help me.
how to set 'new' word
That's precious little information on your forum to work with. Maybe store a 'read'-flag in a database?
Yes i thought first like this but he problem is how can i set this for every uesr. Say i will see new word until i don't read or see that topic. If oncce i see that topic the new word will not be available for me but that will new for other users.
I hope u understand what i mean.
I suppose u will have to maintain 2 tables.
1 for user accounts other for Topics.
In user account table have a field that will hold a serial nubber for everyuser.
This serial number will be in the power of two(1,2,4,8,16,32.....)
And in the Topics table have a feild(say SUM) that actually is the sum of these serial numbers for users.
So say u have 3 users A,B,C they will have serial no. as 1,2,4 in the Accounts table.
now if a new topic is added the value for the feild will be 7(ie 1+2+4). Now suppose User B has read the Topic so this topic will not be new to him so eliminate his serialno. The value for sum is 5(1+4). In this way u can keep the track of who all r still to view the Topic.