mattsmith Posted December 29, 2012 Report Share Posted December 29, 2012 Could someone tell me the code i need to show who's online? guests and pilots please Quote Link to comment Share on other sites More sharing options...
Virtualei Posted December 29, 2012 Report Share Posted December 29, 2012 I think this is what you need <?php $cws = new CodonWebService(); $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <div style='text-align: left; font-weight: bold; font-size: 200%; color: #009933'>Pilots Online <p> </p> </div> <?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname}<br />"; echo "</p>"; } ?> <div style='text-align: left; font-weight: bold; font-size: 200%; color: #009933'>Guests Online <p> </p> </div> <div> <p class="txt-red10">Currently <?php echo count($guestsonline);?> guest(s) visiting</div> <p></p> Quote Link to comment Share on other sites More sharing options...
mattsmith Posted December 29, 2012 Author Report Share Posted December 29, 2012 Thanks Quote Link to comment Share on other sites More sharing options...
Gantcho Posted April 9, 2013 Report Share Posted April 9, 2013 where I have to put it? Quote Link to comment Share on other sites More sharing options...
BaRBeR Posted April 9, 2013 Report Share Posted April 9, 2013 if you only want it to show up on your hompage then put it in your frontpage_main.tpl Quote Link to comment Share on other sites More sharing options...
Gantcho Posted April 9, 2013 Report Share Posted April 9, 2013 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.