...

View Full Version : 2 problems in private messages system



Mido™
02-19-2010, 02:29 PM
I have 2 problems in my private messages system and hope if any one could help me in them.
the first problem, is how do allow the sender to delete the pm who he sent it and this won't make it delete in the inbox of the member who recieved it.
in my script when any of the sender or the reciever of the pm delete it it deleted from the table and doesn't show to the other.

the second problem, is how to make the seen or read messages show in bold text or different than the unread messages, I make a column called seen in the pm table but I couldn't find how to make this have an effect.

abduraooft
02-19-2010, 02:45 PM
I have 2 problems in my private messages system and hope if any one could help me in them.
the first problem, is how do allow the sender to delete the pm who he sent it and this won't make it delete in the inbox of the member who recieved it.
in my script when any of the sender or the reciever of the pm delete it it deleted from the table and doesn't show to the other. Without knowing anything about your table structure, I'd say, you'd either need to duplicate the row - one for the sender and the other for the receiver OR use some flag fields to denote the "is deleted" status, instead of actually deleting a row.
the second problem, is how to make the seen or read messages show in bold text or different than the unread messages, I make a column called seen in the pm table but I couldn't find how to make this have an effect.
Again, add an extra column and update the value upon reading it. Each time, when you display the PM-title, check for the value of this field.

Mido™
02-19-2010, 07:18 PM
Without knowing anything about your table structure, I'd say, you'd either need to duplicate the row - one for the sender and the other for the receiver OR use some flag fields to denote the "is deleted" status, instead of actually deleting a row.
the second problem, is how to make the seen or read messages show in bold text or different than the unread messages, I make a column called seen in the pm table but I couldn't find how to make this have an effect.Again, add an extra column and update the value upon reading it. Each time, when you display the PM-title, check for the value of this field.


Thanks for reply,you usually help in this cases.:thumbsup:
about the problem of seen pm I found a solution by adding if with the seen value inside the while looping.
but about the problem of deleting messages I still didn't find the perfect solution, the one I found and tried is to make 2 tabkes one for inbox and another for outbox.
and my table columns are: id,sen_id,rec_id,title,content,date,seen.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum