Cor Posted February 27, 2011 Report Share Posted February 27, 2011 Hi Dave, 2 questions after I have said, another great addon 1) I have put in the line so it does not show the inactive route, but it still shows the airportname if there are no further routes. 2) I would like within the airport the flight sorted on departure time. Hope somebody cab help me, Regards, Cor Quote Link to comment Share on other sites More sharing options...
jantorre Posted February 27, 2011 Report Share Posted February 27, 2011 You should be able to add if($schedule->enabled <> '1'){continue;} on line 45 of the original timetable_index.tpl file and it should skip any schedule that is not enabled. Sweet, worked out great! Added to our site. Thank you for making so many great things for VMS Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 27, 2011 Author Administrators Report Share Posted February 27, 2011 Hi Dave, 2 questions after I have said, another great addon 1) I have put in the line so it does not show the inactive route, but it still shows the airportname if there are no further routes. 2) I would like within the airport the flight sorted on departure time. Hope somebody cab help me, Regards, Cor The module really isnt capable of sorting the schedules that way. It can be done but it would have to be approached from a different direction than getting all the airfields forst then the flights as it si structured now. You could write it to collect all the enabled routes and group them by airfield then create a display from that. 2 Quote Link to comment Share on other sites More sharing options...
Cor Posted February 28, 2011 Report Share Posted February 28, 2011 Nr 1 is good now, just had to put if($schedule->enabled <> '1'){continue;} on line 41 and not on line 45 Nr2 not fixed yet as I have no idea how to do that. I have noticed that it makes the list in order of route entry in the databse. Regards, Cor Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted March 4, 2011 Report Share Posted March 4, 2011 Hi Dave. Great module. I just now got around to checking this one out. Wonderful! +1 for sure. Thanks for all the hard work you do. This is a great add on. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted June 29, 2011 Report Share Posted June 29, 2011 I was messing around on a test site of mine that I have this time table on and where it shows the aircraft that is used for the flight, I also made it show the registration for that flight. As always, please create a backup of the file before editing. Line 51 timetable_index.tpl FIND echo '<td>'.$aircraft->icao.'</td>'; REPLACE WITH echo '<td>'.$aircraft->icao.' - '.$aircraft->registration.'</td>'; SAVE FILE AND UPLOAD TO SERVER Not sure if this is of use to anyone but if so, have at it. Quote Link to comment Share on other sites More sharing options...
Colonia Posted July 9, 2011 Report Share Posted July 9, 2011 Fantastic module. Thanx for it, Dave. I've modified it a little bit, so now it is sorted by departure or arrival times, shows airport full names, flight types (pax, cargo) and arrival times. And for this great work I've added a link to simpilotgroup.com at the bottom of the page. Example: Colonia VA. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 9, 2011 Author Administrators Report Share Posted July 9, 2011 @Colonia Very nice work! Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted October 8, 2011 Report Share Posted October 8, 2011 one thing I discovered is that schedule count is always one higher like it should be! means if you have 150 schedules it says 151 for example that solve that problem Total Flights: <?php echo $total-1; ?> best regards Thomas Schedl Quote Link to comment Share on other sites More sharing options...
Remington Box Posted February 9, 2012 Report Share Posted February 9, 2012 Awesome addon! On my site (flyalaskavirtual.com) I have more than one airline, is there anyway to code each line by airline code (ex. ASA110, QXE419, etc.)? Nevermind, I screwed around a little and got it: http://flyalaskavirtual.com/vacms/index.php/Timetable Quote Link to comment Share on other sites More sharing options...
Ephendi Posted July 9, 2012 Report Share Posted July 9, 2012 The data is not there, the tpl only calls the field name for the departure field once for each departure field. You can use the coding on line 49 of timetable_index.tpl as guide to get the field name you are looking for. $field1 = OperationsData::getAirportInfo($schedule->arricao); echo '<td>'.$schedule->arricao.' - '.$field1->name.'</td>'; Quote Link to comment Share on other sites More sharing options...
michael Kraan Posted November 24, 2013 Report Share Posted November 24, 2013 Awesome addon! On my site (flyalaskavirtual.com) I have more than one airline, is there anyway to code each line by airline code (ex. ASA110, QXE419, etc.)? Nevermind, I screwed around a little and got it: http://flyalaskavirt...x.php/Timetable that is a good question, have any one here a answer for? Quote Link to comment Share on other sites More sharing options...
KenG Posted October 24, 2015 Report Share Posted October 24, 2015 Gentlemen, I know this is older code but anyone know how to adjust the file to get ride of the following strict standards error in php 5.5: Strict Standards: Non-static method TimetableData::get_schedules() should not be called statically, assuming $this from incompatible context in /homepages/4/d597168468/htdocs/phpvms/core/templates/timetable/timetable_index.php on line 38 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 25, 2015 Author Administrators Report Share Posted October 25, 2015 Try the fix here -> https://github.com/DavidJClark/phpVMS-Timetable/commit/8c3a55e4129eac4d2092f90734f8eaa17c7b04dc Quote Link to comment Share on other sites More sharing options...
KenG Posted October 26, 2015 Report Share Posted October 26, 2015 Try the fix here -> https://github.com/D...4f8eaa17c7b04dc Thank you, perfect fixed the timetable. Quote Link to comment Share on other sites More sharing options...
gio1961 Posted December 13, 2015 Report Share Posted December 13, 2015 Good afternoon, you can insert icon plane? thanks for a possible answer. Best regards .Util::GetDaysCompact($schedule->daysofweek). Quote Link to comment Share on other sites More sharing options...
polirom Posted February 12, 2016 Report Share Posted February 12, 2016 Error timetable Timetable Install Manager 1.0 with pluguins PHPVMS 5.5.x to run the link I get this error Notice: The template file "/home/mundoairlines/www/core/templates/timetable/timetable_index.php" does not exist in /home/mundoairlines/www/core/classes/TemplateSet.class.php on line 231 Line 231 de TemplateSet.class.php if (!file_exists($tpl_path)) { trigger_error('The template file "' . $tpl_path . '" doesn\'t exist'); return false; } This plugin is not valid for phpvms 5.5.x? Quote Link to comment Share on other sites More sharing options...
polirom Posted February 12, 2016 Report Share Posted February 12, 2016 I have this in TimetableData.class class TimetableData extends CodonData { public static function get_schedules($offset) { $query = "SELECT * FROM ".TABLE_PREFIX."schedules ORDER BY depicao ASC LIMIT 30 OFFSET $offset"; return DB::get_results($query); } } 1 Quote Link to comment Share on other sites More sharing options...
web541 Posted February 12, 2016 Report Share Posted February 12, 2016 Did you install it with the plugin manager, or did you install it manually? If you installed it manually, try re-uploading the files Quote Link to comment Share on other sites More sharing options...
polirom Posted February 12, 2016 Report Share Posted February 12, 2016 The first with Plugin Manager The second manually The error persists Quote Link to comment Share on other sites More sharing options...
web541 Posted February 12, 2016 Report Share Posted February 12, 2016 Try this one for 5.5.x Timetable_1.0.zip 1 Quote Link to comment Share on other sites More sharing options...
polirom Posted February 12, 2016 Report Share Posted February 12, 2016 Right. Thank you Quote Link to comment Share on other sites More sharing options...
Iraklis Posted August 16, 2016 Report Share Posted August 16, 2016 is there a way the module to show only the schedules from one airline?? i have 3 airlines AXN, AXG and CH and i watt the schedules for the CH not to been showed!! Quote Link to comment Share on other sites More sharing options...
web541 Posted August 16, 2016 Report Share Posted August 16, 2016 Go into core/common/TimetableData.class.php And replace the first function with this one public function get_schedules($offset) { $query = "SELECT * FROM ".TABLE_PREFIX."schedules WHERE code <> 'CH' ORDER BY depicao ASC LIMIT 30 OFFSET $offset"; return DB::get_results($query); } 2 Quote Link to comment Share on other sites More sharing options...
Iraklis Posted August 17, 2016 Report Share Posted August 17, 2016 Go into core/common/TimetableData.class.php And replace the first function with this one public function get_schedules($offset) { $query = "SELECT * FROM ".TABLE_PREFIX."schedules WHERE code <> 'CH' ORDER BY depicao ASC LIMIT 30 OFFSET $offset"; return DB::get_results($query); } thanks a lot!! Worked like a charm!!!! Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 6, 2016 Report Share Posted September 6, 2016 (edited) ITS SOLVED Edited September 6, 2016 by Industrialshadow Quote Link to comment Share on other sites More sharing options...
Thomasha Posted March 6, 2017 Report Share Posted March 6, 2017 (edited) On 12.2.2016 at 9:53 PM, polirom said: I have this in TimetableData.class class TimetableData extends CodonData { public static function get_schedules($offset) { $query = "SELECT * FROM ".TABLE_PREFIX."schedules ORDER BY depicao ASC LIMIT 30 OFFSET $offset"; return DB::get_results($query); } } Thanks for this. Searched a long time how to change the sort of Flights. With this post i finaly got it. Just change here the "ORDER BY depicao ASC" to "ORDER BY flightnum ASC" Edited March 6, 2017 by thomasha Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted May 25, 2017 Report Share Posted May 25, 2017 Hello, I made some changes. I add some extra columns from templates page and works good only problen this: I want banner comes till end. Here is my code: $offset = 0; $total = 1; $page = 1; while($offset < $numschedules) { ?> <center> <h3><?php echo SITE_NAME; ?> Timetable</h3> </center> <table width="100%" frame="box"> <tr align="center"> <?php $count = 1; while($count <= 1) { ?> <td width="100%" valign="top"> <table width="100%"> <tr bgcolor="#cccccc"> <td width="13%">Arr</td> <td width="12%">Code</td> <td width="13%">Flight</td> <td width="12%">Type</td> <td width="13%">Freq</td> <td width="12%">Dep. Time</td> <td width="13%">Arr. Time</td> <td width="12%">Duration</td> </tr> <?php $schedules = TimetableData::get_schedules($offset); foreach($schedules as $schedule) { if($departure <> $schedule->depicao) { $field = OperationsData::getAirportInfo($schedule->depicao); echo '<tr>'; echo '<td bgcolor="#cccccc" colspan="5"><b>'.$schedule->depicao.' - '.$field->name.'</b></td>'; echo '</tr>'; } $departure = $schedule->depicao; echo '<tr>'; echo '<td>'.$schedule->arricao.'</td>'; echo '<td>'.$schedule->code.'</td>'; echo '<td>'.$schedule->flightnum.'</td>'; $aircraft = OperationsData::getAircraftInfo($schedule->aircraft); echo '<td>'.$aircraft->icao.'</td>'; echo '<td>'.Util::GetDaysCompact($schedule->daysofweek).'</td>'; echo '<td>'.$schedule->deptime.'</td>'; echo '<td>'.$schedule->arrtime.'</td>'; echo '<td>'.$schedule->flighttime.' Hr/s</td>'; echo '</tr>'; $total++; } $offset = $offset + 30; ?> </table> </td> <?php $count++; if($offset >= $numschedules) { while($count <= 1) { echo '<td width="100%" valign="top"> <table width="100%"> <tr bgcolor="#cccccc"> <td width="13%">Arr</td> <td width="12%">Code</td> <td width="13%">Flight</td> <td width="12%">Type</td> <td width="13%">Freq</td> <td width="12%">Dep. Time</td> <td width="13%">Arr. Time</td> <td width="12%">Duration</td> </tr> </table>'; $count++; } } } ?> </tr> </table> <center> <br /> <h5>Page <?php echo $page; $page++; ?></h5> </center> <hr /> <br /> <?php } ?> Total Flights: <?php echo $total; ?> <br /><br /> Thanks... Quote Link to comment Share on other sites More sharing options...
Moderators shakamonkey88 Posted May 25, 2017 Moderators Report Share Posted May 25, 2017 change: colspan="5" to: colspan="8" 1 Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted May 25, 2017 Report Share Posted May 25, 2017 4 minutes ago, shakamonkey88 said: change: colspan="5" to: colspan="8" Works well. Thank you my friend... 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.