truemo9 Posted August 7, 2011 Report Posted August 7, 2011 hey guys, I was wondering if any one can do or has a code for a mini schedule search in the sidebar.. An example that i found was flyuk. http://www.flyuk.aero If you look on the right side of the page, they have like a find a flight search and i was wondering if i could insert that into my sidebar. Thanks Quote
Jeff Posted August 8, 2011 Report Posted August 8, 2011 Click to view You can edit it to fit your needs. Quote
Moderators mark1million Posted August 8, 2011 Moderators Report Posted August 8, 2011 If you wanted to you could just include it on your page or put in in a frame. Quote
truemo9 Posted August 8, 2011 Author Report Posted August 8, 2011 I tried that front schedule but notes happening, thats what in the sidebar now, Quote
Jeff Posted August 8, 2011 Report Posted August 8, 2011 If you can post the link to your site I might be able to see if I can help code it to fit where you want it. Quote
truemo9 Posted August 8, 2011 Author Report Posted August 8, 2011 http://www.ukvfrvirtual.co.cc/en/index.php/ The Left hand side.. Quote
Moderators mark1million Posted August 8, 2011 Moderators Report Posted August 8, 2011 Jamie your site seems to have some problems mate, Quote
truemo9 Posted August 8, 2011 Author Report Posted August 8, 2011 Found it, your security is banning it cos it has /en in it. Quote
Jeff Posted August 8, 2011 Report Posted August 8, 2011 First off, you'll need to go in your Admin Center an rename all your airports to something smaller in order to fit it in such a tight space. What I did was went in and renamed them to the Airport's city name (if Hartsfield-Jackson Atlanta International, then I just named it Atlanta) If you come across a city that has multiple airports (London Heathrow or London Gatwick) then name them London-LHR and London-LGW). This will save a huge headache trying to fit something that large in a small space. Next you can see if this code will work. (I'm not sure because I don't have it coded like this on my site. <form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data"> <table align="left" border="0" width="100%"> <tr> <td bgcolor="#05305D" border="1"><font color="#FFFFFF"><b>Departure</b></font></td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php if (Auth::LoggedIn()) {?> <?php $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); if(is_object($reports)) {echo '<option value="'.$reports->arricao.'">Your current location ('.$reports->arricao.')</option>';} elseif(!$reports) {echo '<option value="'.Auth::$userinfo->hub.'">Your current location ('.Auth::$userinfo->hub.')</option>';}}?> <?php foreach ($airports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>'; }?> </select> </td> </tr> <td bgcolor="#05305D" border="1"><font color="#FFFFFF"><b>Arrival</b></font></td> <td> <select class="search" name="arricao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - ('.$airport->name.')</option>';} ?> </select> </td> </tr> <tr> <td> <input title="Click here to search for flights" type="hidden" name="action" value="findflight" /> <input title="Click here to search for flights" type="submit" name="submit" value="Search" /> </td> </tr> </table> </form> You are going to have to do some editing to remove some of the colors' codes I have in there. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 so place all that code in the siderbar bit?? Quote
Jeff Posted August 9, 2011 Report Posted August 9, 2011 Place it where you have your other coding in that spot. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 ye ive edit abit and this is the outcome http://www.ukvfrvirtual.co.cc/en/index.php/ To say im amateur for php, i need abit more exact code for it to fit, i have also shortend the airport name aswell Quote
Jeff Posted August 9, 2011 Report Posted August 9, 2011 try to add a </div> at the end of the code. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 its changed but the box around it has gone.. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 and the box below has gone sideways, have u got msn jeff or skype? so we can get abit more detail Quote
Jeff Posted August 9, 2011 Report Posted August 9, 2011 If you would like for me to try to enter and get it sorted for you, PM me. Quote
Jeff Posted August 9, 2011 Report Posted August 9, 2011 I was able to get it on the side menu correctly, but somehow the Dep and Arr don't have the airport's name come up. If anyone has a solution that may solve this issue, please share. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 ye if anyones intrested to hlpe about it please reply Quote
Guest lorathon Posted August 9, 2011 Report Posted August 9, 2011 Try This <form action="<?php echo url('/Schedules');?>" method="post" enctype="multipart/form-data"> <table> <tr> <td>Departure</td> <td> <select name="depicao"> <option value="">All</option> <?php if (Auth::LoggedIn()) { $report = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); if($report) { echo '<option value="'.$report->arricao.'">Your current location ('.$report->arricao.')</option>'; } else { echo '<option value="'.Auth::$userinfo->hub.'">Your current location ('.Auth::$userinfo->hub.')</option>'; } } $airports = OperationsData::getAllAirports(); foreach ($airports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>'; }?> </select> </td> </tr> <td>Arrival</td> <td> <select name="arricao"> <option value="">All</option> <?php foreach ($airports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao.' - ('.$airport->name.')</option>'; } ?> </select> </td> </tr> <tr> <td> <input type="hidden" name="action" value="findflight" /> <input title="Click here to search for flights" type="submit" name="submit" value="Search" /> </td> </tr> </table> </form> 1. Changed the form target to the standard "Schedules" module. 2. Filled the $airports with the airport array 3. Cleaned up some of the php tags Should work but NOT tested Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 i get this error, if you jeff, you can pm for the ftp details and sort it out.. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 Parse error: syntax error, unexpected '}' in /home/airlinef/public_html/ukvfrvirtual.co.cc/en/lib/skins/cityportal/frontpage_main.tpl on line 42 Quote
Guest lorathon Posted August 9, 2011 Report Posted August 9, 2011 I fixed the parse error in my other post. Recopy and insert and give it a try. Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 ok its right, but its too big and i dont want the highlight for the dep and arr Quote
Guest lorathon Posted August 9, 2011 Report Posted August 9, 2011 I removed the styling. You can now style it to fit. Does it return flights when searched? Quote
truemo9 Posted August 9, 2011 Author Report Posted August 9, 2011 right, done that, but now the width of the drop bar.. 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.