mattsmith Posted December 29, 2012 Report Posted December 29, 2012 Could someone tell me the code i need to show who's online? guests and pilots please Quote
Virtualei Posted December 29, 2012 Report 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
BaRBeR Posted April 9, 2013 Report Posted April 9, 2013 if you only want it to show up on your hompage then put it in your frontpage_main.tpl 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.