Jump to content

Recommended Posts

Posted

Hello, I have a small Problem with kACARS:

If a Pilot is logged in phpvms AND started a flight with the client, then he's shown twice.

Any ideas to fix that?

phpvms:Version 2.1.934

kACARS: kACARS_Free Application v1.0.0.8

Chris

kacars01.jpg

<div id="Info">
	<h3>Users Online</h3>
	<?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline();

		foreach($usersonline as $pilot)
		{
               echo '<p><img src="'.Countries::getCountryImage($pilot->location).'"   alt="'.Countries::getCountryName($pilot->location).'" />';
               echo " {$pilot->firstname} {$pilot->lastname}</p>";                
		}?>
           <p>Pilots Online: <?php echo count($usersonline);?> / 
           Guests Online: <?php echo count($guestsonline);?></p><br />
</div>

Guest lorathon
Posted

This has been gone over before.

<?php
$shown = array();
foreach($usersonline as $pilot)
{
if(in_array($pilot->pilotid, $shown))
	continue;
else
	$shown[] = $pilot->pilotid;	
echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo "  {$pilot->firstname} {$pilot->lastname}<br />";
}
?>

  • 5 weeks later...
Posted

I got this to work. Thanks for the fix.

Now it shows me only logged in one time as it should. ;) But in the pilot's online/Guests online it shows 2 pilots online and I am the only one logged in at this time. Issue on my end maybe?

Guest lorathon
Posted

Where ever you have the list of online pilots. Depending on your skin it could be multiple places.

Posted

Where ever you have the list of online pilots. Depending on your skin it could be multiple places.

Your first choice would be to look on the layout tpl file or front page main. BUT I suggest looking at layout.tpl file first.

  • 8 months later...
Guest lorathon
Posted

Sorry for bumping this quite old topic but I don't feel like this needs a new topic.

I'm not great at PHP, how would I add a Pilot Code before the pilot name and a link to their profile?

This is not a kACARS question. Please ask in the general support forum.

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...