Guest itrobb Posted November 4, 2010 Report Share Posted November 4, 2010 How do I customize this? e.g: I only want the departure and arrival fields, and a few custom fields that won't have any actions. Quote Link to comment Share on other sites More sharing options...
Guest itrobb Posted November 7, 2010 Report Share Posted November 7, 2010 Well? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 7, 2010 Author Administrators Report Share Posted November 7, 2010 Well? Well.... I have been away for a week on vacation and you need to have a little patience... 2 Quote Link to comment Share on other sites More sharing options...
Guest itrobb Posted November 7, 2010 Report Share Posted November 7, 2010 Well.... I have been away for a week on vacation and you need to have a little patience... Well one I was meaning the entire forum, but preferably you, and two, I am not used to forums that take a week to get a reply, I'm more used to within a few hours. Quote Link to comment Share on other sites More sharing options...
Bueno93 Posted December 21, 2010 Report Share Posted December 21, 2010 Hi, folks! Does anyone have an extension for this great module to add the possibility to search for the day of flight? I had some tries, but it doesn't really work for me. So, is it possible to select the day of flight in addition to the other values or has someone already coded this? Doesn't matter if it is not possible, would be just a nice extension Kind regards Bueno Quote Link to comment Share on other sites More sharing options...
Cor Posted December 28, 2010 Report Share Posted December 28, 2010 Hello all, Is there a way to let the outcome be sorted on departure time rather then Flightnumber. When you use the original schedules module it looks at the config and there I changed it so the outcome has to be sorted on deptime. But in this modules it isn't workimg. Tnx and have a great 2011 Regards, Cor Quote Link to comment Share on other sites More sharing options...
greertr Posted March 2, 2011 Report Share Posted March 2, 2011 I re-attached it to the original post in this thread. Worked fine right out of the box, tyvm! http://www.vsimair.com/index.php/FrontSchedules Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 6, 2011 Moderators Report Share Posted April 6, 2011 Dave, I am trying go to restrict the return to enabled schedules only and aircraft would be good but more importantly enabled schedules only, I have tried putting a WHERE enabled='1' but its not making any difference, can you help please? This is the FrontSchedulesData.class.php code that i tried it in. <?php //by:simpilot //www.simpilotgroup.com class FrontSchedulesData extends CodonData { public function findschedules($arricao, $depicao, $airline, $aircraft) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_schedules.aircraft LIKE '$aircraft' AND phpvms_aircraft.id LIKE '$aircraft'"; return DB::get_results($query); } public function findschedule($arricao, $depicao, $airline) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_aircraft.id LIKE phpvms_schedules.aircraft"; return DB::get_results($query); } public function findaircrafttypes() { $query = "SELECT DISTINCT icao FROM phpvms_aircraft"; return DB::get_results($query); } public function findaircraft($aircraft) { $query = "SELECT id FROM phpvms_aircraft WHERE icao='$aircraft'"; return DB::get_results($query); } public function findcountries() { $query = "SELECT DISTINCT country FROM phpvms_airports"; return DB::get_results($query); } } Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 6, 2011 Moderators Report Share Posted April 6, 2011 Dont worry i got it Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 6, 2011 Moderators Report Share Posted April 6, 2011 For reference, <?php //by:simpilot //www.simpilotgroup.com class FrontSchedulesData extends CodonData { public function findschedules($arricao, $depicao, $airline, $aircraft) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules .enabled=1 AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_schedules.aircraft LIKE '$aircraft' AND phpvms_aircraft.id LIKE '$aircraft'"; return DB::get_results($query); } public function findschedule($arricao, $depicao, $airline) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules .enabled=1 AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_aircraft.id LIKE phpvms_schedules.aircraft"; return DB::get_results($query); } public function findaircrafttypes() { $query = "SELECT DISTINCT icao FROM phpvms_aircraft"; return DB::get_results($query); } public function findaircraft($aircraft) { $query = "SELECT id FROM phpvms_aircraft WHERE icao='$aircraft'"; return DB::get_results($query); } public function findcountries() { $query = "SELECT DISTINCT country FROM phpvms_airports"; return DB::get_results($query); } } Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted May 20, 2011 Report Share Posted May 20, 2011 G'day Simpilot, For some reason i recieve this error whenever i attempt to use you module Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/qantasvi/public_html//lib/skins/brilliancev1/<h4>Schedule Search</h4> <form action="http://qantasvirtual.com/index.php/FrontSchedules" method="post" enctype="multipart/form-data"> <table width="100%" cellpadding="10px"> <tr> <td>Select An Aircraft Type</td> <td> <select class="search" name="aircraft"> <option value="">All</option> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/qantasvi/public_html/lib/skins/brilliancev1/airport_search.tpl</b> on line <b>21</b><br /> </select> </td> </tr> <tr> <td>S in /home/qantasvi/public_html/core/classes/TemplateSet.class.php on line 96 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 23, 2011 Author Administrators Report Share Posted May 23, 2011 You need this changed in php.ini -> open_basedir restriction in effect Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted May 28, 2011 Report Share Posted May 28, 2011 You need this changed in php.ini -> open_basedir restriction in effect Ok my php.ini is empty, apparently i am meant to comment it out, but there is nothing to comment out haha. Actually it isnt completely empty, i have timezone configuraition info in there. So how can i go about disabling this feature ? Regards Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 30, 2011 Author Administrators Report Share Posted May 30, 2011 Ok my php.ini is empty, apparently i am meant to comment it out, but there is nothing to comment out haha. Actually it isnt completely empty, i have timezone configuraition info in there. So how can i go about disabling this feature ? Regards If you do not have root access to the server you are probably going to have to conatct your host as most shared environments do not allow some configuration items in local php.ini files. Quote Link to comment Share on other sites More sharing options...
stuartpb Posted June 1, 2011 Report Share Posted June 1, 2011 Hi Simpilot, I'm looking at adding the schedule search to the new website, but I'm having problems with getting the depname and arrname to show. I've checked what variables are available (depicao and arricao are). I've been trying to figure out how to get these to display in the search results. Any assistance you can offer would be very much appreciated. Thanks, Stuart Quote Link to comment Share on other sites More sharing options...
stuartpb Posted June 3, 2011 Report Share Posted June 3, 2011 Well after a couple of days trying, and many failed attempts in trying to get the airport name to be output in the schedule search results, I've finally cracked the problem To get the airport names to appear in the search results page I used the following code on the schedules_results.tpl page: For the departure airport name: <?php $field = OperationsData::getAirportInfo($route->depicao);?> <td><?php echo $field->name;?></td> for the arrival airport name: <?php $field = OperationsData::getAirportInfo($route->arricao);?> <td><?php echo $field->name;?></td> I tried creating new queries, modules, and also templates, trying to figure out how to get around the problem, and it turns out all I needed was one extra line of code I knew there was a simple way but struggled finding it! Quote Link to comment Share on other sites More sharing options...
stuartpb Posted June 3, 2011 Report Share Posted June 3, 2011 I've also modified the departure form field, so that when a pilot is logged in, the first option in that field will be the airport they are currently located at (or their hub if they've never filed a PIREP). This means that pilots can easily view flights only from their current location, and also view all other flights too. If they want to view flights which are departing from their current location, they just select the option. If they want to view flights from other depart airports, they select them etc. If a person viewing the page is not logged in, then this option will not appear. I think this works much better than restricting flight viewing permissions being listed by altering the schedules_result.tpl file. Here's the code: On the airport_search.tpl file of this addon, enter the following at the top of the page: <?php $lastreport = PIREPData::GetLastReports(Auth::$userinfo, 1); if(!$lastreport) {$location = Auth::$userinfo->hub; } else {$location = $lastreport->arricao;} ?> Then in the departure airport search field part of the same file, I made the following adjustment: Original: <tr> <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> Amended Code: <tr> <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <?php if(Auth::LoggedIn()) {echo '<option value="'.$location.'">Your Current Location</option>';}?> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> The added line is: <?php if(Auth::LoggedIn()) {echo '<option value="'.$location.'">Your Current Location</option>';}?> Cheers, Stuart EDIT: I've just finished modifying the airport_search.tpl and the schedule_results.tpl files, so that if a pilot is not at the airports shown in the search results lists, then the "add to bid" (or book flight) link will not show. It also won't show for flights that are not being operated on the day, and if the pilot is not ranked high enough. I didn't want pilots not to be able to see the schedules, so that's why I modded the two files. I also had to make a change or two in the frontschedulesdata.class.php file too. Here's a couple of screens: This is the new despatch front page. Pilots start here, and search for a flight, or view them all. This is the results page. I've used the Datatables js script, so I can easily paginate and sort the table columns. Notice the options, where the add to bid (book flight) isn't present. Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 5, 2011 Report Share Posted June 5, 2011 That looks unreal stuart, great job Unfortunatley, i get this issue when i attempt to search. This great little module has a bone to pick with my site, everytime i go to use it haha Warning: Invalid argument supplied for foreach() in /home/qantasvi/public_html/lib/skins/brilliancev1/schedule_results.tpl on line 59 Quote Link to comment Share on other sites More sharing options...
kyubiaza1076 Posted June 5, 2011 Report Share Posted June 5, 2011 Module creates a schedule search form that includes the ability to choose the airline, aircraft type, arrival field, and departure field. You can choose one or all of the parameters to find what you are looking for in your schedule database. To install Download and unzip Place the files in the proper paths as structured in the download No new sql tables or anything needed. Copy and place the airport_search.tpl file from the core/templates folder to your skin folder and skin it to match your site. Point your browser to mysite/index.php/FrontSchedules and start searching. Enjoy! Hy guys is possible to customize a search schedules by Deptime? any idea? Quote Link to comment Share on other sites More sharing options...
Mark J Posted June 10, 2011 Report Share Posted June 10, 2011 Great Addon! Quote Link to comment Share on other sites More sharing options...
Mark J Posted June 13, 2011 Report Share Posted June 13, 2011 im having a problem. i have all of the a/c listed in the menu, but when i select on and search for a route, it says no routes found.. example here. Quote Link to comment Share on other sites More sharing options...
Mark J Posted June 15, 2011 Report Share Posted June 15, 2011 bump Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted June 15, 2011 Author Administrators Report Share Posted June 15, 2011 Is the touchdownstatsdata.class.php file in the correct place and not blank? Quote Link to comment Share on other sites More sharing options...
kyubiaza1076 Posted June 15, 2011 Report Share Posted June 15, 2011 Is the touchdownstatsdata.class.php file in the correct place and not blank? Hi guys how to insert on schedule search "search by departure time & arrive time"? any idea? ;-) Quote Link to comment Share on other sites More sharing options...
kyubiaza1076 Posted June 17, 2011 Report Share Posted June 17, 2011 Module creates a schedule search form that includes the ability to choose the airline, aircraft type, arrival field, and departure field. You can choose one or all of the parameters to find what you are looking for in your schedule database. To install Download and unzip Place the files in the proper paths as structured in the download No new sql tables or anything needed. Copy and place the airport_search.tpl file from the core/templates folder to your skin folder and skin it to match your site. Point your browser to mysite/index.php/FrontSchedules and start searching. Enjoy! Hi it's possible please,to have a code for search by dep time on schedules search? Thank's :-D Quote Link to comment Share on other sites More sharing options...
Mark J Posted June 20, 2011 Report Share Posted June 20, 2011 im having a problem. i have all of the a/c listed in the menu, but when i select on and search for a route, it says no routes found.. example here. still having this problem... can anyone help? Quote Link to comment Share on other sites More sharing options...
Mark J Posted June 27, 2011 Report Share Posted June 27, 2011 so i restored the original files and now none of the routes work... i really need help fast because no flights can be booked Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2011 Report Share Posted June 27, 2011 Just let all u guys know found a way to get rid of that confirm refresh stuff. Just change all "post" commands to "get" commands. I think in the files modules/Frontschedules/Frontschedules.php and airport_search.tpl Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted June 28, 2011 Author Administrators Report Share Posted June 28, 2011 im having a problem. i have all of the a/c listed in the menu, but when i select on and search for a route, it says no routes found.. example here. It is an issue for anyone running the latest beta. The variable in the template has changed to $schedule_list from $allroutes 2 options for now: 1 - Change the variable name supplied to the template in FrontSchedules.php OR 2 - Create a dupllicate of the schedule_results.tpl file, name it something else, change the reference from $schedule_list to $allroutes in the template, and change the template being called in FrontSchedules.php. Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted August 17, 2011 Report Share Posted August 17, 2011 G'day Simpilot, I have come back to this module in an attempt to try and get it working within my site, everytime i attempt a search, i recieve this error: Warning: Invalid argument supplied for foreach() in /home/qantasvi/public_html/lib/skins/brilliancev1/schedule_results.tpl on line 58 I have also noticed that no aircraft display under the aircraft list If you can give me some advice in fixing this up, that would be greatly appreciated, as it's driving my head in haha Cheers Tylor 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.