Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 1 reply
- 1.7k views
I am a web designer and would like to build my own VA website, do you guys have all the codes that i would need to add different functionality to my site and is there any video tutorial that explains step by step how to go about adding such scripts in for some who may not know who are beginners....reason i ask is because i have many folks here who is into aviation looking to start a VA and get their sites up but i have to first get clearification as to building one and teaching them how i got it done.
Last reply by Sava, -
- 1 reply
- 1.8k views
Hi, i hope that anyone can help me. i search for a code that pilots can schedules on time. example: Select An Airline Select your departure airport: Select your arrival airport: Select aircraft: and than: schedule time: i hope that anyone can help greets michael kraan
Last reply by Tato123, -
- 1 reply
- 1.4k views
Does anyone know the code or what I have to do to be able to add notes to the pilot center for the pilots to see?
Last reply by Parkho, -
- 1 reply
- 1.4k views
Anyone have the code or know how I can add like something showing our Team Speak Server?
Last reply by servetas, -
- 1 reply
- 1.8k views
Hey guys so I installed the Pilot Shop Add-on nothing appears in it and it tells me PilotHome No products have been bought! that's in the pilot home page. Then via the admin center when I try to add some products it saids " An Error Was Encountered The module "SHOPADMIN" doesn't exist!" Anyone know how to fix it?
Last reply by TAV1702, -
- 1 reply
- 1.6k views
Hi! This is my first post here =) I've been working on a module where the central idea is to dynamically update airports visited and divided by country and continent. Just follow the template module. If anyone wants to help me, any help is welcome....pm me. teste.zip
Last reply by nabpp, -
- 1 reply
- 3.9k views
how would i set my site up so it says welcome guest when ur not logged in but ur name when u are logged in?
Last reply by flyalaska, -
- 1 follower
- 1 reply
- 1.7k views
Hey, I use the .csv file to upload schedules and some flights have the same FlightID I know there used to be a code allowing you to upload same flight numbers. Does anybody know it? Regards, Daniel Cormack Website : www.corporateva.co.uk Email : ceo@corporateva.co.uk
Last reply by crnjola, -
- 1 follower
- 1 reply
- 4.4k views
To anybody that uses bootstrap on their site: You will notice that on a site running bootstrap, any use of google maps will screw up. This is due to conflicting css statements in the bootstrap.css. If you look in your acars.js, find the following line: var map = new google.maps.Map(document.getElementById(acarsmap"), options); Notice the word "acarsmap" and this is important. In bootstrap.css find this (or similar): #map_canvas img { max-width: none; } and change it to look like this: #acarsmap img { max-width: none; } And, it should be perfect now. It may still conflict with the maps on flight briefings, and this may involve add another few li…
Last reply by Strider, -
Hi to All !! How is possible have only the join date and not the hours ? If i put <?php echo $userinfo->joindate;?> The result is: 2008-03-25 01:00:00 I need only 2008-03-25 Thanks
Last reply by Tom, -
- 1 reply
- 1.9k views
Hey all, Does anyone have a snippet that will display a pilot his past flights on a google map? I am planning on putting it under the pilot center. Thanks!
Last reply by atulumello, -
- 1 reply
- 2.2k views
Hi, we have multiple Airline in our system but we require our pilots to start out at DLH . How can i make it to where that is the only DLH they can choose upon registration? Best Regards
Last reply by Steve Bartlett, -
- 1 reply
- 1.7k views
Many people have commented that their pilot list items get out of alignment as items go on. Add the following line in each <th> tag as so Example: <th align= "center" width="200px">Crew ID</th> It will make a once misaligned table: http://i.gyazo.com/6df264d06a0e144c5da2548ce0e920e5.png Look Aligned: http://gyazo.com/935e4c5e7015075368ff381217c59b2e Cheers!
Last reply by in2tech, -
- 1 reply
- 2.1k views
Does anyone know the code to get stats based upon airlines in the system rather than HUBs?
Last reply by MaciejO, -
- 1 reply
- 1.6k views
A little snipet that will help you add links for pilots over an amount of logged hours Example i let people over 80 hours to access charter flights so when they go over 80 hours a link comes up in their profile Change number 10 to less or more hours accordingly <?php $url = "http://www.websiteurl.net/index.php/charter"; $site_title = "Charter Flights"; if((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)<10) { //Dont show anything if hours are less than needed } else { Echo "<a href=$url>$site_title</a>" ; } ?>
Last reply by servetas, -
- 1 reply
- 1.5k views
Help to complete the code. This code should reflect the flight status. - Flight free - No aircraft at the airport - Book as can be seen from the code below, now there is no warning that the aircraft is out of this airport. How do I add ??? at the moment I am using the following code: <?php if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <?php $search1 = (array( 'a.registration' => $route->registration, 's.bidid != 0' )); $schedules = SchedulesData::findSchedules($search1); $disabled = $schedules[0]->registration;if($route->registration==$disabled) { continue; } ?> <div class="btn…
Last reply by bass, -
- 1 reply
- 1.9k views
Hi Guys, What im trying to do is when a manual PIREP is submitted on my website I need the arricao to go into a custom field in my aircraft table called location. I have tried changing this section in PIREPData.class.php but it don't work: $sql = "INSERT INTO ".TABLE_PREFIX."pireps( `pilotid`, `code`, `flightnum`, `depicao`, `arricao`, `location`, `route`, `route_details`, `distance`, `aircraft`, `flighttime`, `flighttime_stamp`, `landingrate`, `submitdate`, `accepted`, `log`, `load`, `fuelused`, `expenselist`, `source`, `pob`, `exported`, `rawdata`) VALUES ( {$pirepdata['pilotid']}, '{$pirepdata['code']}', '{$pirepdata['flightnum']}', '{$pi…
Last reply by simpilot, -
- 1 reply
- 1.8k views
I have been playing around with some simple little scrolling News Boxes, and came up with this for everyone. You can have a peek at ; PhPvMs Site= http://heritage-va.net/hva or http://heritage-va.net (Main Site) Look to the right on theses sites, on the home pages. Below are some code snippets for above, and I have added some page scrolling scripts that Work great with PHPVMS also. Hope ya all can use these. Jimbo "Jungle" Heritage VA , CEO <!--Heritage VA 2016 , Demo; http://heritage-va.net/hva--> <!-- Scrolling News or what ever you'd like to scroll in your site The below script must be after the head tag, or the body tag.--> <!-- NOTE: this …
Last reply by shakamonkey88, -
- 1 reply
- 1.3k views
Hello, I want to manual submit pilot ranks So I have changed off the rank_auto_calculate to off. No I am wondering if there is a script that will warn all admins when a pilot is reaching the hours needed for promotion. Any help would be appreciated. Rick
Last reply by Heritage1, -
- 1 reply
- 1.7k views
Hey! This code snippet shows the METAR of the current location airport of the pilot. You can put it anywhere (I use it on my frontpage_main) <?php $last_location = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); if(!$last_location) { echo ''; } else { ?> <br><br>Your current airport METAR: <i><?php echo file_get_contents("http://wx.ivao.aero/metar.php?id=$last_location->arricao"); ?></i> <?php } ?> This code snippet uses the IVAO-METAR.
Last reply by servetas, -
- 1 reply
- 1.3k views
Hello, if i have the function: <?php echo date(DATE_FORMAT.' ', strtotime($data->date)); ?> How is possible show only the Day and not the complete date? Thanks
Last reply by servetas, -
- 1 reply
- 1.2k views
Help to make in PHP code. A visual example of what I want to show on the page of the pilot. Want to get to the page profile_main.TPL information.In a Reminder that I'm part of the event (date of event date and time ) Tried to put some of the code from events_event.tpl <?php $check = EventsData::check_signup(Auth::$userinfo->pilotid, 6); if($check->total >= '1') { echo '<td>Yes</td>'; } else { echo '<td>No</td>';?> <?php } ?>
Last reply by Heritage1, -
- 1 follower
- 1 reply
- 1.5k views
Hello, Am wondering if anyone would be ever so kind to tell or send me some code. I have seen on various websites airport delays NOTAMS, I would like to implement this into my home page. Thanks
Last reply by Vangelis, -
- 1 reply
- 1.8k views
I am trying to make a way for pilots to search any meter they want. I have done this so far, and it doesn't work, can someone please help? <div> ICAO Code: <input type="text" name="icao"> <input type="submit"> <?php $metar = $_POST['metar']; $url = 'http://metar.vatsim.net/'.'icao'.''; $page = file_get_contents($url); echo $page; ?> …
Last reply by ProSkyDesign, -
- 1 reply
- 1.6k views
Closed topic
Last reply by shakamonkey88, -
- 1 reply
- 1.8k views
I was wondering if there was a way we could check if pireps are accepted or unaccepted. I was think of something like we can check if the user is an admin or not if he is then the system would check if there are unaccepted pireps. If there are the user would be redirected to the admin page or could be given a notification?
Last reply by Heritage1, -
- 1 reply
- 3.5k views
Hello, How to recover some information on the log with the variables For example: 12:35 start engine 2, 12:50 overspeed .... Thanks for your help
Last reply by loganq, -
- 1 reply
- 3.9k views
Surely this has been asked before, but I'd really like to implement a FR24 style flight tracker that when you click on the aircraft, instead of just showing a straight line from Dep to Arr, it shows a clear line where the aircraft has been, and a dotted line where it has got to go to. Cheers in advance
Last reply by Mickey, -
- 1 reply
- 3.3k views
Hello all, (sorry my english) i’m trying to make the flightMarkers keep moving (with or without click marker) but no success. When i try, from multiple markers only one moves or all blink and jump to new position. Whem the marker moves and arrives to next destination/point and the map refresh, the marker go back and start again. Need to continue to next new position. This is the code i’m trying to adapt with speed: http://jsfiddle.net/HYuRR/2/ Can someone help to implement the code? Thank you This is the original acarsmap.js var flightMarkers = []; var routeMarkers = []; var flightPath = null; var depMarker = …
Last reply by piuozorio, -
- 1 reply
- 3.1k views
Hi everyone! Is there any code with which I can display the airline logo automatically depending on the flight number? Somewhere I don't remember, I found this one but it doesn't work: <td align="center"><img src="https://(website)/lib/skins/ocean_blue/images/airlines/<%=flight.flightcode%>.png"></td> Thank you!
Last reply by flyalaska,