Ivan André Posted January 14, 2010 Report Share Posted January 14, 2010 1_Edit the "frontpage_main.tpl" in /core/templates or /lib/Skins/. 2_ Place this code: <h3>Users Online<br /> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> </h3> <h4 class="style6">Pilots Online </h4> <?php foreach($usersonline as $pilot) { echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname}<br />"; echo "</p>"; } ?> <br /> Have <?php echo count($usersonline);?> Pilots Online. <h4 class="style3">Guests Online </h4> <p class="txt-red10"> Have <?php echo count($guestsonline);?> Guests Online.</div> 4_ Have Good Flight´s....Be happy.... ;D Preview.... http://www.kafly.net http://atc.kafly.net/ Quote Link to comment Share on other sites More sharing options...
G-NEWC Posted January 14, 2010 Report Share Posted January 14, 2010 Thanks alot for this! Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted January 15, 2010 Moderators Report Share Posted January 15, 2010 Excellent works straight off the page lol. Thanks. Quote Link to comment Share on other sites More sharing options...
g3r84 Posted January 15, 2010 Report Share Posted January 15, 2010 Great code it worked perfect but i added something more to it Your code show this when there are no pilots on line It looked extrange to me so i added this to your code under Pilots Online <p class="txt-red10"> Have <?php echo count($usersonline);?> Pilots Online. And now when there is no pilots online it shows this and pilots online this Happy coding and good landings... Quote Link to comment Share on other sites More sharing options...
Ivan André Posted January 16, 2010 Author Report Share Posted January 16, 2010 Thank you, any change is welcome .. Have good flights ... ;D Quote Link to comment Share on other sites More sharing options...
pouzo Posted January 30, 2010 Report Share Posted January 30, 2010 Nice, is it possible to add the Callsign of the Pilot instead of the name and lastname Quote Link to comment Share on other sites More sharing options...
g3r84 Posted January 31, 2010 Report Share Posted January 31, 2010 Change this echo " {$pilot->firstname} {$pilot->lastname}<br />"; For this one echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname; Result: Quote Link to comment Share on other sites More sharing options...
pouzo Posted February 1, 2010 Report Share Posted February 1, 2010 Thank you man Quote Link to comment Share on other sites More sharing options...
Thomas Posted February 1, 2010 Report Share Posted February 1, 2010 Sorry to be a pain, But is there anyway you can take the flag/country and name off so you would be left with basically the callsign? eg: PLS012, PLS001, PLS015, PLS040, etc... Thomas. Quote Link to comment Share on other sites More sharing options...
g3r84 Posted February 2, 2010 Report Share Posted February 2, 2010 Yup sure you can just delete or comment this row echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; and here echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname; erase this part . ' ' .$pilot->firstname . ' ' . $pilot->lastname Quote Link to comment Share on other sites More sharing options...
CPC900 Posted February 2, 2010 Report Share Posted February 2, 2010 Anyone know why this would be........When I sign in on my main computer to my site, it does not show me online; just says 0 pilots online and 1 guest. But when I login on my other computer and sign in, it works correctly and show me online with my name and flag etc. I am confused on that one?!?? Quote Link to comment Share on other sites More sharing options...
Thomas Posted February 2, 2010 Report Share Posted February 2, 2010 Thankyou sooo much! This will be added to our site on the next skin. -Thomas. 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.