Aaron Posted April 7, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
Aaron Posted April 7, 2012 Author Report Share Posted April 7, 2012 Users Online Scott Clifford Aaron Schpitzer Scott Clifford Scott Clifford 0 guest(s) online Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted April 7, 2012 Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Aaron Posted April 7, 2012 Author Report Share 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 Link to comment Share on other sites More sharing options...
nabpp Posted November 21, 2012 Report Share Posted November 21, 2012 kind bump having this error as well Quote Link to comment Share on other sites More sharing options...
Stealthbird97 Posted November 21, 2012 Report Share Posted November 21, 2012 i'll have a look ad see what i can find. Quote Link to comment Share on other sites More sharing options...
nabpp Posted November 21, 2012 Report Share Posted November 21, 2012 ok kool thanks 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.