Laura Posted March 7, 2013 Report Posted March 7, 2013 I'd like to view the current flights on the frontpage in a box like the "Recent Pilots" & "Recent Pireps" Boxes, shown as "Flight number - Dep - Arr." I guess i have to get the code from the /acars page and simply exclude the map and all the stats (name, status, speed, dist/time remaining) i don't want to show .. ? If yes, where to get that code from ? And if no, where's my mistake ? Quote
Mike Posted March 7, 2013 Report Posted March 7, 2013 Hi Laura, Paste the below into your frontpage_main.tpl where you want the table to display. That should work ok... hopefully <div class="left_block_wide"> <h2 class="home_title style4">Pilots Flying Now </span></h2> <table width="920" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:1px solid grey;"> <tr> <th colspan="6" align="center" bgcolor="#FF9900" style="background-color: #FF9900; width: 3.5%;"><div align="left"></div></th> </tr> <tr> <th align="center" bgcolor="#CC0000" style="background-color: #CC0000; width: 3.5%;"><span class="style8"></span></th> <th width="10%" align="center" bgcolor="#CC0000" class="style1" style="background-color: #CC0000;"><span class="style12">Flight</span></th> <th width="30%" align="center" bgcolor="#CC0000" class="style1" style="background-color: #CC0000;"><span class="style12">Origin </span></th> <th width="30%" align="center" bgcolor="#CC0000" class="style1" style="background-color: #CC0000;"><span class="style12">Destination</span></th> <th align="center" bgcolor="#CC0000" class="style1" style="background-color: #CC0000;"><span class="style12">Status</span></th> <th width="15%" align="center" bgcolor="#CC0000" style="background-color:#CC0000;"> </th> </tr> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $flight) { ?> <tr> <td height="33" align="center"> </td> <td align="center"><font size="3" color="#852025" face="digi"><font style="text-transform:uppercase"><?php echo $flight->flightnum;?></font></td> <td align="center"><font size="3" color="#852025" face="digi"><font style="text-transform:uppercase"><?php echo $flight->depname;?></font></td> <td align="center"><font size="3" color="#852025" face="digi"><font style="text-transform:uppercase"><?php echo $flight->arrname;?></font></td> <td align="center" background=""><font size="3" color="#852025" face="digi"><font style="text-transform:uppercase"> <?php if($flight->phasedetail != 'Paused') { echo $flight->phasedetail; } else { echo "Cruise"; }?> </font></td> </tr> <?php } } else { ?> <tr> <center> <td width="20%" colspan="5" align="center" style="padding: 5px; font-size: 13px; font-weight: bold; color: #852025;">No Pilots Currently Flying. </td> </center> </tr> <?php } ?> </table> </div> 1 Quote
flyalaska Posted March 7, 2013 Report Posted March 7, 2013 You are missing a closing </div>. Other than that, its nice! 1 Quote
Mike Posted March 7, 2013 Report Posted March 7, 2013 yup... also, I forgot that I changed mine and put the digi font in there... shouldnt be a problem, it will just display a different font I think Quote
flyalaska Posted March 7, 2013 Report Posted March 7, 2013 It messed up my sites when I did it. Just copy <table> to </table> and you will be fine. Quote
Txmmy83 Posted March 26, 2013 Report Posted March 26, 2013 I have a simple question but think not exactly on topic how can I include simpilots flightboard into acarsmap.tpl to show it below and refreshing with Acars? thanks in advance, Thomas 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.