Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 11 replies
- 4.6k views
If you would like to use phpfree chat, here goes. Visit their page for docs, their info is really helpful. Upload phpfree chat to your website . Place this at the beginning of your chat page. <?php require_once dirname(__FILE__)."/phpfreechat-1.5/src/phpfreechat.class.php"; //this is the location of your chat directory $params = array(); $params["admins"] = array('your-admin-name' => 'your-password');//this is the admin name and password - you can have more than one admin $params["title"] = "Pilot's Lounge"; //name of the chat room $params['firstisadmin'] = false; //do not change this $params["theme"] = "blune"; //this is where you change the theme $params['…
Last reply by RogerB, -
- 4 replies
- 4.6k views
I have created awards for our va and have no problem adding them to the pilots and they display just fine when you click the pilot id. What I would like to have and don't know how to code this so please help if you can, what do I need to add where to get the awards to appear in a horizontal row under each pilot when anyone guest or not clicks the Pilots tab on the main page of the phpvms of our va site.
Last reply by Steve Bartlett, -
- 16 replies
- 4.5k views
Hey Guys, Well this is a record, I aint asked for help for a bit of time! Ok, So is there a way to do something like this... (UK FLAG) Total Pilots: 100 (US FLAG) Total Pilots: 100 (DE FLAG) Total Pilots: 100 etc... Thomas.
Last reply by mark1million, -
- 1 follower
- 3 replies
- 4.5k views
How to Change the Look of the ACARS Map As usual, We highly suggest backing up before making any changes. 1. Find the Style you want on https://snazzymaps.com 2. Click on "COPY" by the Code Snippet 3. Open up the file "acarsmap.tpl" located in your skins folder 4. Around line 38, BEFORE the acars_map_default variable add the following code: var myStyle = PASTE HERE 5. Paste what you copied in step #2 where it says "PASTE HERE" in the snippet above. 6. INSIDE the acars_map_default variable add the following code: var acars_map_defaults = { autozoom: true, styles: myStyle, // <-- ADD THIS zoom: 4, center: new google.maps.LatLng("<?php echo Config::…
Last reply by Ariel, -
- 5 replies
- 4.5k views
Hey Guys, Just wanted to give everyone the opportunity to use this great Javascript snow script. To use it for phpVMS just simply follow the directions below. Open layout.tpl and find the </body> tag. Create a line above it and copy and paste the code below. <SCRIPT type="text/javascript"> // Set the number of snowflakes (more than 30 - 40 not recommended) var snowmax=35 // Set the colors for the snow. Add as many colors as you like var snowcolor=new Array("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff") // Set the fonts, that create the snowflakes. Add as many fonts as you like var snowtype=new Array("Times","Arial","Times","Verdana") // Set the lett…
Last reply by Taran, -
- 9 replies
- 4.5k views
Hi is there a quick way of displaying the current flight bids on another page just like they are in the admin section?
Last reply by Aaryan, -
- 7 replies
- 4.5k views
Anyone know how I can show the live flights on my home page?? Thanks
Last reply by Jeff, -
- 6 replies
- 4.5k views
Here is the code for the IVAO status image in the roster: $feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID'); if($feildvalue != '') { echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; } Place it in your pilots_list.tpl, and save it to your skin folder. Change the IVAO ID to what ever it is in your database. You can use the correct spelling for feildvalue to what you want, you can even change it to another name if you like.
Last reply by buraktiftikci, -
- 13 replies
- 4.5k views
Hi Guys, I'm trying to code a form that enables pilots to enter in a nickname of their choice and click connect and then it logs them into the server with that nickname but i already have this working.The bit I would like to do is that once the pilot is logged in to phpVMS. When he uses the form to login to the TeamSpeak server his username is already there in the nickname box in a defined pattern. I would like the value box on the form to be able to pull the firstname lastname and pilot id, For example Michael Atherton JCA001. I have tried this code <center>Pilot Name - Pilot ID<br> <input type="text" name="NICKNAME" value="<?php echo PilotData::get…
Last reply by kkoseoglu, -
- 20 replies
- 4.4k views
Hello, I am looking for the aircraft registration, the flight number without the IATA Code, the departure hour, departure minute, arrival hour, arrival minute and the route on the briefing page. Does someone have this codes? Greetings Julius
Last reply by alpsJet, -
- 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, -
- 8 replies
- 4.3k views
The rule n° 17 for a va on ivao say: §17: 17. If the VA is active also on other networks and/or allows pilots to fly off-line, thence not necessarily registered on the IVAO network, the pilot roster page on the website should clearly emphasize those registered on the IVAO network. The pilot roster could be divided in 2 or more sections (IVAO pilots, other network pilots, pilots flying off-line etc.) or show, close to each pilot name or callsign, the logo of the network the pilot belongs to with his Vid. for this I modified the code of my phpvms ... anyone is interested?
Last reply by Tato123, -
In the downloads section index.php/Downloads is there a way to split the categories so all categories don't show. Have a link for each cat?
Last reply by Tylor Eddy, -
- 12 replies
- 4.2k views
Hi guys, I'm trying to populate the the route_detais in phpvms_acarsdata table. Now im using a custom KACARS by Jeff. But, at this moment, he can't get any new order. Thanks for any help,
Last reply by Ademar Andrade, -
Sorting Active/Inactive Pilots [SOLVED]
by Guest lorathon- 11 replies
- 4.2k views
I looked for the original thread for this but could not find it. This fixes the problem where if you attempt to sort the status of pilots by Active/Inactive the entire list of pilots would disappear. To fix you need to make a modification to one file. /admin/templates/pilots_list.tpl Replace the code in the template with this. (Be sure to make a back-up of the original first.) <h3>Pilots List</h3> <table id="grid"></table> <div id="pager"></div> <br /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo fileurl('/lib/js/jqgrid/css/ui.jqgrid.css');?>" /> <script src="<?php echo fileu…
Last reply by Nabeel, -
- 1 follower
- 8 replies
- 4.2k views
Hello guys is there code for showing last recent flight details can anyone help me to get these information for last flight Callsign: Departure Airport: Arrival Airport: Aircraft: flight time: Date of Flight status of the pirep: thank you
Last reply by LeonardIGO4036, -
- 7 replies
- 4.1k views
Hey, Does anyone know how to make a popup box appear on login? For example, a survey, or a status telling the pilot how many messages they have, their bids, etc. So: Pilot Logs in > PopUp displays > Pilot can then click on one of the links or click 'Close'.
Last reply by freshJet, -
- 8 replies
- 4k views
Hello All, does anybody have the code for this, I need the green table around it as well. it is on Alaska adventures virtual. Thanks
Last reply by Cor, -
- 4 replies
- 3.9k views
Hi, does anyone have a code for a load sheet in the pilot briefing or does anyone know where I can get the auto-generated pax and load for a flight? The system generates automatically Paxnumber and load when clicking on Send Pirep but I'd like to have it before starting a flight in the briefing in order to load the aircraft correctly. Thanks, Chris.
Last reply by stuartpb, -
- 18 replies
- 3.9k views
I am trying to create another aircraft list but with registrations and type only, for the maintenance module. I've got this: <?php foreach $aircraft as $aircraft( ?> <html> <table border="1"> <tr> <td width="200"><?php echo $aircraft->registration ?></td> <td width="200">Last Check</td> <td width="200">Next Due</td> </tr> </table> </html> <?php ) ?> But get: Warning: Invalid argument supplied for foreach() in /home/freshje1/public_html/testskin/core/templates/fleet_maintenance.tpl on line 1
Last reply by stuartpb, -
- 6 replies
- 3.9k views
Below is a function which will take any givin pilot and find the appropriate avatar for him and re-associate the avatar with the pilot after said pilot has been moved to another airline, or had their ID changed. ​it also deletes any unnecessary avatars. public static function fixAvatar($pilotid){ // Get the pilots Information. $pilotid = (int)$pilotid; $sql = "SELECT * FROM `".TABLE_PREFIX."pilots` WHERE `pilotid`=$pilotid"; $pilot = DB::get_row($sql); unset($pilotid); $err = DB::errno(); if($err != 0){ return false; } // Setting up the check (with regex) for an avatar with the pilots current ID. $pilotcode = PilotData::getPilotCode($pilot->code, $p…
Last reply by Ademar Andrade, -
- 8 replies
- 3.9k views
Hi How can i change recaptcha theme ? <script type="text/javascript"> var RecaptchaOptions = { theme : 'theme_name' }; </script>
Last reply by joeri, -
- 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 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, -
- 5 replies
- 3.8k views
Is possible in phpvms prevent to receive pireps for flights who are non booked? One of my pilots manualy fill acars and after flight complete send and system receive flight which is not in va system.
Last reply by Ephendi, -
- 5 replies
- 3.8k views
Can somebody please explain to me how to get the vatsim ID on the pilot roster. If it is already here, i just cant find it... sorry, Thanks!
Last reply by rpalmer800, -
- 6 replies
- 3.8k views
Hi there, I dont know if this is the rigth site to post this message. Im making a progress tours table, the previous versión work (http://sparkadsl.0lx...progresodetours) But, i cant make a condition with ten values (ten routes) because not work. Actually I did that when a pilot complete the last route (the numer ten) the data base send the answer "pilotid" and "accepted", so are two values. mysql_select_db($database_byethost, $byethost); $query_Tablafinaltours = "SELECT `phpvms_pireps`.`pilotid` , `phpvms_pireps`.`accepted` FROM phpvms_pireps WHERE ( ( `phpvms_pireps`.`flightnum` ='GB10' ) AND ( `phpvms_pireps`.`accepted` =1 ) ) ORDER BY `phpvms_pireps`.`pilotid`…
Last reply by ARV187, -
- 6 replies
- 3.8k views
Hello Apologies if this is elsewhere, I have been searching the forums and I couldn't find the information. I want to add to my pilot badge a line with "last flight" info, in the following format: Last Flight: KLAX-KBOS A320-232 CS-TYB Which is basically route, aicraft name/type and registration. Could someone please help me with this, in terms of code and which file to edit? Many thanks Cheers
Last reply by mark1million, -
- 4 replies
- 3.8k views
Hello, I am wonder if some one would have the a code to allow me to issue pilots free jumpseats to work along side the fltbook V2 booking system.
Last reply by PikoSim, -
- 1 reply
- 3.7k views
Hello This is my first release.Everyone specially who is using the IP Board forum must be looking on how to display recent forum posts on your PHPVMS Home Page. Well here is how to do that. YOU NEED TO HAVE IP CONTENT INORDER TO USE THIS. STEP 1: Login to your admin cp. STEP 2: Create a block through the IP Content. STEP 3: Follow what to do in these screenshots which i am attaching. STEP 4: After creating the block near the block where all the blocks are displayed there must be a small sign and wgeb u will put your mouse on it it will say "Get code for widget" copy that code and paste it where ever u want to display RECENT FORUM POSTS. Enjoy! IP BOARD SCREENSHOT…
Last reply by fsxsimulation,