Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted

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.

Posted

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

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...