Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 3 replies
- 1.5k views
I've noticed the ACARS map only leaves the popup bubble open for around 5 seconds, how can this be changed so that it stays until the user closes it or clicks on another plane? I'm assuming it's in Javascript...
Last reply by edmundk, -
- 1 follower
- 3 replies
- 5k views
Hello, i'm trying to use google flight search api but dont know how to "decode" the result. The search is ok, i'm using this code with (solutions => "1") i put 1 just for tests, but want more <?php $data = array ( "request" => array( "passengers" => array( adultCount => 1 ), "slice" => array( array( origin => "LIS", destination => "OPO", date => "2015-05-09"), ), solutions => "1" ), ); $data_string = json_encode($data);$ch = curl_init('https://www.googleap...ch?key=MyAPIKey'); curl_setopt($ch, CURLOPT…
Last reply by aliatwa, -
- 1 follower
- 3 replies
- 2.1k views
Im mot sure if this is in the right forum so delete if needed. Is there a way to show who is logged into our TeamSpeak3 server on our website? I've seen a few VA's that have this and was wondering if it is some kind of code or program.
Last reply by Arctiq, -
- 3 replies
- 2.4k views
Hi. What do I need to do to activate the landing rate on the pireps? Thank you, Kenny.
Last reply by Strider, -
- 3 replies
- 2.1k views
Hello, I'm trying to do a search for bands of time using the form Frontschedules. In the airport search.tpl I entered this search option: <tr> <td>Orario</td> <td> <select class="search" name="deptime"> <option value="">All</option> <option value="00:01|08:00">00.01/08.00</option> <option value="08:01|16:00">08.01/16.00</option> <option value="16:01|24:00">16.01/24.00</option> </select> </td> </tr> In the FrontSchedules.php: public function findflight() { $arricao = DB::escape($this->post->arricao); $…
Last reply by ln-asm, -
- 1 follower
- 3 replies
- 2.5k views
Hi Guys, On our site, when in the registration process, the pilot has to enter their VATSIM CiD. Once registered, that data gets passed to the back-end for the pilot to get accepted/rejected, and the CiD they entered is displayed, my question is, is there a piece of code or API out there that will display the pilots name from VATSIM on the back-end VMS so we can check the name they entered in our system corresponds with that of the VATSIM account. Thanks, Joe
Last reply by joeholden, -
- 3 replies
- 1.9k views
Hi Guys, I have a Question about the Standart News System of phpVMS. Is there a way to change the News Layout from TITLE BODY POSTED BY to TITLE | TITLE BODY | BODY POSTED BY | POSTED BY so that in one row are two news items Great Thanks xhubix
Last reply by xhubix, -
- 3 replies
- 1.8k views
Hi all, Is there a module about or a piece of code that would send an email automatically to a pilot if he/she has not completed a flight within the first 10 days of registering. Or within 30 days of a completed flight Thanks in advance Scott
Last reply by flyalaska, -
- 1 follower
- 3 replies
- 1.6k views
Anyone know where the list of queries are kept for returning data to a page on your site ?
Last reply by shaun105, -
- 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, -
- 1 follower
- 3 replies
- 1.8k views
Hello all , i am trying to add the Airport Metar in frontpage_main can anyone help how to do it ? i am trying with several ways but dose not work . also NOTAMS if possible Thank and Regrade.
Last reply by alyousafi, -
- 3 replies
- 1.8k views
Hi, I'm not the best at coding but I would like to know if anyone knows a function that will count all live flight from the acars db and put it in a number. For example if the acars map shows 6 flight I would like the function to show 6 Thanks
Last reply by tim260, -
- 3 replies
- 1.6k views
Hi all, hope all is well with everyone. Anyways, I've been trying for few days on how to change the length size of the slider images on my new VA website, I have no clue! can someone please help me. Please visit the site at http://lifeflightvirtual.us/index.php/ Thanks, Tac
Last reply by Karamellwuerfel, -
- 1 follower
- 3 replies
- 659 views
Hello, I have been searching the forums but I cannot find anything similar to what I am looking for. I was wondering if there may be a bit of code to check if flight bids are currently being flown. Im trying to display a flight status under the bids that are in progress such as "Departed", or "Scheduled Departure" Thanks!
Last reply by ProAvia, -
- 2 replies
- 2.5k views
Hey guys, Im trying to have some kind of a document center in my pilot center, So I created a category in the downloads called Documents, Now I want to display only that Category in the Profile_main.tpl I used <?php MainController::Run('Downloads', 'index'); ?> and it displays all the downloads. How would I accomplish this could I use an IF statement? Thanks, Chad C.
Last reply by piper338, -
- 2 replies
- 2.1k views
I want to change the title to the Russian language, in which file can I change this? I was looking but never found! Schedules - KD Avia Profile - KD Avia Thanks!
Last reply by Artjom, -
- 2 replies
- 3.1k views
I have searched the forum and might have missed it, but does anyone have a code snippet to add TS3 server status to the front page of the crystal II skin? Thanks in advance
Last reply by simpilot, -
- 1 follower
- 2 replies
- 2.9k views
Ok I have spent a month now trying to write my own module... I simply want a list of all the airports and its details (name, icao, and chartlink) I have even tried using an existing class (operations data) and I just can't figure it out. I have a book on php code, but it seems to be different from the VMS. I have used this: and get a table with only the aiport name. The module file simply calls the template. My original class (that I gave up on and have now used the Operation Data one was: I was hoping that someone would be able to give me a very simple example of a class, module, and template so that I can reverse engineer it and figure this all out. I wou…
Last reply by kbohme, -
- 2 replies
- 2.5k views
Hello, I was wondering if it was possable to put the latest news from your phpvms website into a channel discription on a teamspeak 3 server? Thanks, James
Last reply by James142, -
- 2 replies
- 2.3k views
anyone know the code to put there PID in the welcome email?
Last reply by Ahmad, -
Browser Icon
by Jeff- 2 replies
- 1.9k views
Here's another code for you who are having trouble adding an icon to your web browser. First, create your .ico using whichever program or online generator you wish, and upload it to: public_html Next add this code to your layout.tpl just after <head> <link rel="icon" type="image/png" href="http://www.yoursite.com/site.png"> <link rel="icon" href="http://www.yoursite.com/favicon.ico" type="image/x-icon"> Rename the favicon.ico to the name of your .ico image and change both address to your website (do not include /index.php). Leave the site.png and type="image/x-icon" as they are, and it should show. This method is tested, and works on both IE9 and…
Last reply by mark1million, -
- 2 replies
- 1.8k views
Hi how do I align my pilot roster so all the ranks and everything are all aligned under each other?
Last reply by bunoire14, -
- 2 replies
- 2k views
Is there any way to get like a roster of the pilots in a hub on to a hub page?
Last reply by rpalmer800, -
- 2 replies
- 2.3k views
I have the currently booked flights showing on my main page of my site. I am having a problem trying to show the airline image for the current booked flight. I can get it to show the spot for the Airline in the title, but I cannot get the image to pull from my image folder. Can someone please please assist me with this. I have been up searching on here for hours and trying to make it work: this is my code:\ Thanks to anyone that can help me with this <h3>Currently Booked Flights</h3> <?php if(!$lastbids) { echo '<p align="left">No flights have currently been booked</p>'; return; } ?> <table width="100%" cellpadding="1" cellspacin…
Last reply by smoke2312, -
- 2 replies
- 1.9k views
Hi guys, Sorry for my persistance, But i'd like to request some codes... I want to change money to points system... Exemple every flight do by pilot, he make 1 point per 10 minutes. Is possible? And implement a pilot efficiency system... Exemple 90% average pilot efficiency... And Restrict some routes to pilots without required rank and award to fly for exemple LPMA. And is possible restrict some pages in profile_main.tpl and only show exam center for pilots with 'Student' rank? And how I do to when the pilot chooses the HUB in registration proccess, exemple if he choose LPPT for his HUB, his location is automatically LPPT (HUB chosen) and automatically just ha…
Last reply by Parkho, -
- 2 replies
- 1.8k views
How can I add Notam's to the pilot center for that the pilots can see?
Last reply by souljony, -
- 2 replies
- 1.7k views
For the ones who have a Wordpress and would like to have your recent post on your phpvms site. Here is how I do it. http://feed2js.org/index.php?s=build Than you will need to know your RSS feed url. http://example.com/?feed=rss http://example.com/?feed=rss2 http://example.com/?feed=rdf http://example.com/?feed=atom If you are using custom permalinks, you should be able to reach them through this usage: http://example.com/feed/ http://example.com/feed/rss/ http://example.com/feed/rss2/ http://example.com/feed/rdf/ http://example.com/feed/atom/ I am using /?feed=rss2. Make sure that you preview it first. Place the code where you want to display the post.
Last reply by flyalaska, -
- 2 replies
- 1.7k views
Hello, Is there any code I can use to display how many airlines we have? Regards. Daniel Cormack Website : http://www.corporateva.co.uk/index.php Email : ceo@corporateva.co.uk
Last reply by CorporateVirtual, -
- 2 replies
- 1.5k views
I need to know how I could have on passenger flights, cargo transport
Last reply by AlessandroCuba, -
- 2 replies
- 1.9k views
I have domicile managers that serve three hubs. I would like them to be able to view there three hubs when they are in the admin center. Right now they can only view the hub they are assigned to. Does anyone know how i can get this to work? Thanks Jorge O'Connor
Last reply by jeep865,