0

In inbox link i want to show how many massage are in it,in such a way if in inbox there are 20 messages and only 5 are unread then to be shown in that link.
like this Inbox(5).
Also in inbox if message is unread to be highlighted,meaning all 5 message to be highlighted.
How can i do this,i`ve seen this in facebook and other dating sites.
Anyone to help me please.

4
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by mrcniceguy
0

Couldn't you just have a status field in your message object? This could be used to determine whether a message has been read, unread, deleted, caught by spam filter etc.

0

Actually i`m new to this and i dont know anything about spam.
Can you please explain how can i get started.

0

You have to sort unread messages out with your own index. For example you save all read messages (with POP every mail as a unique ID defined by the server) in a simple text-file. When the user logges in you catch all emails from the server and compare the IDs with your thumb-file. Every ID that is not in the file is new. As soon as the user reads it you add the message ID to your thumb file.
When you use your own messaging-system (eg forum, etc) you can simply add a flag as darkagn proposed. That can save you much trouble.

0

I would do what darkagn said and just have a status field since I assume you are using a database, then it would just be a select count(messageid).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.