Aaron Posted April 7, 2012 Report Posted April 7, 2012 Is there a way to make the Users Online tab on my sidebar so that it only shows users once. If someone is logged in maybe in two browsers or maybe it would do that for another reason, idk. Is there a way to show them only once? Quote
Aaron Posted April 7, 2012 Author Report Posted April 7, 2012 Users Online Scott Clifford Aaron Schpitzer Scott Clifford Scott Clifford 0 guest(s) online Quote
Moderators Kyle Posted April 7, 2012 Moderators Report Posted April 7, 2012 Yep, It's common becasue of ACARS, users logs them in. if(in_array($pilot->pilotid, $shown)) { continue; } That code will skip the same pilots and only show one. Add it into your online users code. Quote
Aaron Posted April 7, 2012 Author Report Posted April 7, 2012 It give me an error, this is where I put it: else foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)){ continue; } ?> <tr And for each user it puts one of these above them: Warning: in_array() expects parameter 2 to be array, null given in /home2/canforce/public_html/lib/skins/canforce_1204/layout.tpl on line 192 Quote
nabpp Posted November 21, 2012 Report Posted November 21, 2012 kind bump having this error as well Quote
Stealthbird97 Posted November 21, 2012 Report Posted November 21, 2012 i'll have a look ad see what i can find. Quote
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.