flyalaska Posted August 30, 2011 Report Share Posted August 30, 2011 Can anyone tell me how to make the user's online show in real time. I have a chat the is in real time and looks funny when its not matching the users online. 1 Quote Link to comment Share on other sites More sharing options...
fsxsimulation Posted August 30, 2011 Report Share Posted August 30, 2011 Can anyone tell me how to make the user's online show in real time. I have a chat the is in real time and looks funny when its not matching the users online. i think that those pilots that are not being showed in the chat list are not being showed because those pilots must be flying maybe on kacars.. Just a thought. 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted August 30, 2011 Author Report Share Posted August 30, 2011 Has nothing to do with kACARS, I don't even use kACARS. Both list are people who are actaully on the website. By default the phpVMS users are static. I want it to be real time like the chat. Quote Link to comment Share on other sites More sharing options...
fsxsimulation Posted August 30, 2011 Report Share Posted August 30, 2011 Has nothing to do with kACARS, I don't even use kACARS. Both list are people who are actaully on the website. By default the phpVMS users are static. I want it to be real time like the chat. OH.. i think it show's the Guests & Pilots who are on the site withn the 15 minutes right? 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted August 30, 2011 Author Report Share Posted August 30, 2011 OH.. i think it show's the Guests & Pilots who are on the site withn the 15 minutes right? Yes, I need to to show real time. Quote Link to comment Share on other sites More sharing options...
Tom Posted August 30, 2011 Report Share Posted August 30, 2011 The online users is based on login sessions which last 30 mins I think... just get the same list as the chat? 3 Quote Link to comment Share on other sites More sharing options...
fsxsimulation Posted August 30, 2011 Report Share Posted August 30, 2011 The online users is based on login sessions which last 30 mins I think... just get the same list as the chat? TOM WHY DID U GIVE ME A -1!!!!!!!!!!!!!!!!!!!!!!! THIS IS VERY UNFAIR CAN SOME ADMIN PLEASE TELL ME WHAT IS THE PROBLEM WHERE EVER ANYONE SEE'S MY POST I GET A -1. WHAT IS UR PROBLEM!!!! 2 Quote Link to comment Share on other sites More sharing options...
Tom Posted August 30, 2011 Report Share Posted August 30, 2011 What is wrong with you people. I don't rate posts. Thanks for the -2 though... I'll keep my knowledge to myself next time. Also, fsxsimulation. I might just -1 all your posts now for lolz because you'll rage in caps and I'll laugh. Edit: Not that it'd matter, you're already on -147 bahaha 2 Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted August 30, 2011 Moderators Report Share Posted August 30, 2011 TOM WHY DID U GIVE ME A -1!!!!!!!!!!!!!!!!!!!!!!! THIS IS VERY UNFAIR CAN SOME ADMIN PLEASE TELL ME WHAT IS THE PROBLEM WHERE EVER ANYONE SEE'S MY POST I GET A -1. WHAT IS UR PROBLEM!!!! OH GROW UP ALREADY! Your pathetic! And you don't know what your doing when you are fixing the problem. So I'm going to say it again! GROW UP! Sorry for hijacking the thread, but I had to say something. 1 Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 Back on topic...... You would have to change the following in the StatsData public static function UsersOnline($minutes = '') { $key = 'users_online'; $users_online = CodonCache::read($key); if($users_online === false) { if($minutes == '') $minutes = Config::Get('USERS_ONLINE_TIME'); $sql = "SELECT p.* FROM ".TABLE_PREFIX."pilots p, ".TABLE_PREFIX."sessions s WHERE s.pilotid = p.pilotid AND DATE_SUB(UTC_TIMESTAMP(), INTERVAL {$minutes} MINUTE) <= s.`logintime`"; $users_online = DB::get_results($sql); # Check if it's blank, then return an empty array if(!$users_online) $users_online = array(); CodonCache::write($key, $users_online, 'short'); } return $users_online; } The problem is you would also have to remove the cache of this query. Since the query may keep the list old even if you change the time comparison in the query. So change the USER_ONLINE_TIME to say 1 min ( a least it will be closer) and then remove the cache scripting. Quote Link to comment Share on other sites More sharing options...
flyalaska Posted August 30, 2011 Author Report Share Posted August 30, 2011 TY Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 NP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.