callesson Posted April 16, 2010 Share Posted April 16, 2010 How can i check if a forum topic or a Private message has been Viewed? Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/ Share on other sites More sharing options...
TeddyKiller Posted April 16, 2010 Share Posted April 16, 2010 You'd have a status in the private message table. When the user recieving the private message, clicked on it.. it sets status to 1. (Meaning read) else it is 0 by default (Meaning unread) Simple. As for forum topic, it can be the same.. but it would change to read if any user read it.. rather than for each user. It's a little complicated. Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1043014 Share on other sites More sharing options...
callesson Posted April 19, 2010 Author Share Posted April 19, 2010 Thanks! Well, yea xD Sound very simple. But how can I create a function if the user clicks the link ? Im only used to buttons. Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1044475 Share on other sites More sharing options...
TeddyKiller Posted April 19, 2010 Share Posted April 19, 2010 You don't. You'd do a query or whatever your wanting to do.. as a piece of code in the body section of the private message Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1044507 Share on other sites More sharing options...
callesson Posted April 20, 2010 Author Share Posted April 20, 2010 oh Yea, then it will run the first time i visit, then next time it wont run (Y) Now i get it Ty m8 Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1045040 Share on other sites More sharing options...
TeddyKiller Posted April 20, 2010 Share Posted April 20, 2010 Well yeah. if(status == '0') { set it to 1 } Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1045103 Share on other sites More sharing options...
callesson Posted April 20, 2010 Author Share Posted April 20, 2010 Yepp, btw can you check on my other topic about the Ajax update? If you know that language ofc Link to comment https://forums.phpfreaks.com/topic/198744-viewed-or-not/#findComment-1045129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.