Kishshey Posted May 13, 2015 Report Posted May 13, 2015 Hello, I would like to show Live flight data on a different page that I created, and I do require to show this page with a custom module called Ops.php Can anyone help me with this. Quote
alpyeni1 Posted May 13, 2015 Report Posted May 13, 2015 Hey, Copy your page's source and create a template with your soruce. After that, Maybe this could work: <?php Template::Show('nameoftemplate.tpl'); ?> Thanks! Quote
Kishshey Posted May 14, 2015 Author Report Posted May 14, 2015 Hello, I have already created the Module and the page, And when I view vasite.com/action.php/Ops/page I can view my page, all i need to do is include the Acars live flight data in a table Quote
alpyeni1 Posted May 14, 2015 Report Posted May 14, 2015 Hey, What does it mean? You find a solution? Thanks! Quote
Kishshey Posted May 15, 2015 Author Report Posted May 15, 2015 What I'm trying to say is I want the Live Flights data table, on a separate page, not on acarsmap.tpl, lets say live.tpl Quote
gio1961 Posted May 15, 2015 Report Posted May 15, 2015 I'm not 100% sure, however, just open the file "ACARS.php" and add public function live() { $this->set('acarsdata', ACARSData::GetACARSData()); $this->render('live.tpl'); } Quote
Kishshey Posted May 15, 2015 Author Report Posted May 15, 2015 I'm not 100% sure, however, just open the file "ACARS.php" and add public function live() { $this->set('acarsdata', ACARSData::GetACARSData()); $this->render('live.tpl'); } done that already, no luck, so far i noticed the acarsmap.tpl page uses js to create the body of the table, i tried the same thing I added this to my ACARS.php public function live() { $this->title = 'Live Map'; $this->set('acarsdata', ACARSData::GetACARSData()); $this->render('live.tpl'); And included this table in live.tpl, just like it is in the acarsmap.tpl for testing <table border = "0" class="table table-striped" width="100%" class="acarsmap"> <thead> <tr> <td><b>Pilot</b></td> <td><b>Flight Number</b></td> <td><b>Departure</b></td> <td><b>Arrival</b></td> <td><b>Status</b></td> <td><b>Altitude</b></td> <td><b>Speed</b></td> <td><b>Distance/Time Remain</b></td> </tr> </thead> <tbody id="pilotlist"></tbody> </table> <script type="text/javascript" src="<?php echo fileurl('/lib/js/acarsmap.js');?>"></script> <script type="text/html" id="acars_map_row"> <tr class="<%=flight.trclass%>"> <td><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotid%> - <%=flight.pilotname%></a></td> <td><%=flight.flightnum%></td> <td><%=flight.depicao%></td> <td><%=flight.arricao%></td> <td><%=flight.phasedetail%></td> <td><%=flight.alt%></td> <td><%=flight.gs%></td> <td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%></td> </tr> </script> I'm sorry if i sound like a noob, I really am not good at this =D Quote
Administrators simpilot Posted April 23, 2016 Administrators Report Posted April 23, 2016 The code you are using builds a table using the javascript from the acars map which you have cut off. If you do not want the map, just a table, your best bet is probably to load the acars data into a variable like you are doing and then just loop through the data on the template page to create your table rows. Do not use any of the javascript functions, there is no need for them. Quote
Kishshey Posted April 24, 2016 Author Report Posted April 24, 2016 The code you are using builds a table using the javascript from the acars map which you have cut off. If you do not want the map, just a table, your best bet is probably to load the acars data into a variable like you are doing and then just loop through the data on the template page to create your table rows. Do not use any of the javascript functions, there is no need for them. Hello, Perhaps could you give me an example? I appreciate your help Quote
Administrators simpilot Posted April 24, 2016 Administrators Report Posted April 24, 2016 Just have to search a little bit http://forum.phpvms.net/topic/21259-live-flight-board-airlines-display-solved http://forum.phpvms.net/topic/19943-live-deaprture-board http://forum.phpvms.net/topic/4969-live-flight-board-problem-solved/page__st__20#entry33478 http://forum.phpvms.net/topic/8050-how-to-change-status-to-gif-animated-image 1 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.