Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2009
    Location
    in .........
    Posts
    260
    Thanks
    183
    Thanked 0 Times in 0 Posts

    2 problems in private messages system

    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.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Mido™ (02-19-2010)

  • #3
    Regular Coder
    Join Date
    Aug 2009
    Location
    in .........
    Posts
    260
    Thanks
    183
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    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.
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •