tiki Posted August 4, 2008 Share Posted August 4, 2008 Ok I know my way around PHP fairly well, but on this im quite stumped on the best approach. I recently built my own forum system that has shared users, forums, messages, etc across two sites. http://www.sc2armory.com/forums/ (sc2a) http://www.d3armory.com/forums/ (d3a) Notice at the bottom they both have the same forums, and then different forums per domain. They also share the same user base, which all works out perfectly. The problem im having is this: - When a user logs in (with cookie or without) it updates a last login and current login time. Last login time is used to determine the "users online" as well as grab all topics with new posts since their last login time. - This all works fine, but if I go to sc2a and view new posts it works (but updates the last login time). And then if I go to d3a and view new posts, there isnt any because I just checked on sc2a and the times have been updated. So I can only view one site or the other. I know I can easily fix this by storing session data in the database that routes to each domain per user, thats simple... but. - I also want to be able to make it so when a user views a thread, it marks it as read. This is the part I am confused on, how do I do this? Do I store all topics ids since last visit in an array in the session/db? Then remove an id if they have read it? Or is there another way to do this? -------------- If you dont want to read above: - How do I mark topics as read/unread and keep consistency since last visit, per domain? Link to comment https://forums.phpfreaks.com/topic/118142-forum-system-new-posts-since-visit-mark-as-read/ Share on other sites More sharing options...
lemmin Posted August 4, 2008 Share Posted August 4, 2008 Why don't you just set up two different "last login" times, one for each site? Link to comment https://forums.phpfreaks.com/topic/118142-forum-system-new-posts-since-visit-mark-as-read/#findComment-607889 Share on other sites More sharing options...
tiki Posted August 4, 2008 Author Share Posted August 4, 2008 Why don't you just set up two different "last login" times, one for each site? Well how am I supposed to do the read/unread thing? If I can combine the read/unread with the last login, then ill do it that way. If I cannot, then id probably have to do something like you said. Link to comment https://forums.phpfreaks.com/topic/118142-forum-system-new-posts-since-visit-mark-as-read/#findComment-607891 Share on other sites More sharing options...
lemmin Posted August 4, 2008 Share Posted August 4, 2008 I would just log every thread that the user clicks on to mark it as read. Then, when someone posts on that thread, remove EVERY occurance of it in that log for every user. Link to comment https://forums.phpfreaks.com/topic/118142-forum-system-new-posts-since-visit-mark-as-read/#findComment-607974 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.