sasvirtual Posted March 23, 2011 Report Share Posted March 23, 2011 I was wondering where the .tpl files are for the latest flights and pilots hired. I know it is somewhere in the core/template area but I couldn't find it. Can you please tell me the name of the file or attach one on here so I can get the code. Using the Brilliance template at http://www.alaskaairvirtual.com Quote Link to comment Share on other sites More sharing options...
Nuclear Posted March 23, 2011 Report Share Posted March 23, 2011 They're in frontpage_recentpilots.tpl and frontpage_reports.tpl Quote Link to comment Share on other sites More sharing options...
sasvirtual Posted March 23, 2011 Author Report Share Posted March 23, 2011 I got an error. Here is my coding: <div id="sidearea"> <h3>Newest Pilots</h3> <?php foreach($pilots as $pilot); { ?> <p><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?></a></p> <?php } ?> </div> Warning: Invalid argument supplied for foreach() in /home/alaskaai/public_html/lib/skins/brilliancev1/layout.tpl on line 166 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted March 23, 2011 Report Share Posted March 23, 2011 Yeah that wont work with Brilliance. I already went down that road. Try this <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <h2>Pilots Online</h2> <?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>"; } ?> <h2>Guests Online</h2> <p class="txt-red10">Currently <?php echo count($guestsonline);?> guest(s) visiting. </p> </ul> I grabbed that out my old ObsessBlue template and it works. I did end up changing my frontpage_recentbids.tpl file too because it was also showing the bid id # which I did not like. If this code fails, I got one more little trick you can try. Try this first though and let me know how it goes. If it works, please mark your original post as solved. PLEASE NOTE: This may not look right on your page. This code is rather generic so it will need to be altered to fit your needs and or wants. I would love to show an example but it is on a local host WAMP server. Quote Link to comment Share on other sites More sharing options...
sasvirtual Posted March 23, 2011 Author Report Share Posted March 23, 2011 Looks good! If you want to see go to http://www.alaskaairvirtual.com If you have a code for recent PIREPS and new hires, that would be AWESOME! Thank You! 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.