Topic: A proper working new messages system

I noticed that the new message option shows posts since last visit, I would like a option that replaces that function with a real new messages system that only shows the ! in front of messages that the user hasn't read yet so when the user has read it the sign will dissapear.

is this possible? or isn't it? would it be alot of work and how it work?

I have little php skills but i understand scripts a little and i now how they work.

I thought of a system:

1: add a field to the users table called "unreadmessages" (or something like that)
2: Everetime a message is post on the board write "the message "id" or something like that" to all the users their "unreadmessages" field.
3: replace the original unread messages coding with something that checks if the post id is in the "unreadmessages" field if so add the "! image" in front of the forum and in front of the messages that are new.
If the post is read some kind of code should remove the message id from the "unreadmessages" field.

Please feel free to ask me if anything if something isn't clear to you.

2

Re: A proper working new messages system

NO, that slowing post message if you have many users, and growing the database size.

If your people come crazy, you will not need to your mind any more.

Re: A proper working new messages system

would it really matter so much? can you give me a number of seconds per 1000 users?

4

Re: A proper working new messages system

if you find a big rock in your road, you can break it to many pieces, or remove it to side of road or change your way, or return to your home,
choosing depends on the cost.

If your people come crazy, you will not need to your mind any more.

5 (edited by Smartys 2004-10-26 00:52)

Re: A proper working new messages system

sanjay: I suggested a similar idea to Rickard a month or so back

It looked something like yours, except it worked like this:
New table, viewed_thread. 2 columns, thread id and user id
When a user views a thread, their user id and the thread id is added
If someone makes a new post in the thread, all people who had viewed the thread there get their entry deleted from the table
When the user's last logged in time is updated, all of their entries in that table are deleted.
When viewing, PunBB checks against last_login and the user id's views as recorded by the table

Rickard said at the time he would take a look at it, dunno what he decided to do tongue
Of course, using this table could be enabled/disabled if someone felt it was adding too much load (at least you should be able to)

6

Re: A proper working new messages system

that "change your way", why not make it as MOD.

If your people come crazy, you will not need to your mind any more.

7

Re: A proper working new messages system

See here: http://punbb.org/forums/viewtopic.php?id=4148

Re: A proper working new messages system

zaher wrote:

that "change your way", why not make it as MOD.

Because I wouldn't know how to change it tongue

9

Re: A proper working new messages system

I did it with cookies, without modifying the database. It also needed an additional query, and does not work very well with multiple forum. I think I could improve it... well, do you really need this feature? big_smile
It also only works for registered users.