Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 4 replies
- 2k views
Whilst looking at my bookings list for my pilots the idea of having a reminder of bookings hit me. I know this can be done. I was considering something along the lines having an email sent to the pilot if their bid is more than one week old. And to prevent several emails at once (say the pilot booked a 10-leg journey) mention each booking in the one mail. I would do a rough code but my brain won't work. I've been working on a lot tonight. ----- Oh and one more thing, some of you may remember me asking what the cons of deleting a pilot were. Well, I found this in my PilotData.class.php: public static function deletePilot($pilotid) { $sql = array(); unset(self::$pi…
Last reply by freshJet, -
- 2 replies
- 2k views
How can I add Notam's to the pilot center for that the pilots can see?
Last reply by souljony, -
- 1 reply
- 2k 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, -
- 3 replies
- 2k 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 reply
- 2k 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, -
- 0 replies
- 2k views
Hello everyone, I have a French VA and I would like to know how to get the same theme one in English and one in French? Someone there can you help me please? Regards Fred. http://phpvms.p3d-simulation.fr session_start(); if(isset($_GET['template']) && $_GET['template'] != ''){ $_SESSION['template'] = $_GET['template']; define('CURRENT_SKIN',$_GET['template']); } if(isset($_SESSION['template']) && $_SESSION['template'] != '') { define('CURRENT_SKIN',$_SESSION['template']); } ?template=fr or ?template=uk Solution HERE Thanks to monkeypaw201
Last reply by FSX30HD, -
- 0 replies
- 2k views
The Europe Weather Maps have been down for a few months now, but here's the fix! Replace your old code with the following: <div align="center"> <img src="http://www.jetplan.com/weather/data/maps/euwt10006.gif" /> <img src="http://icons-ak.wunderground.com/data/640x480/2xeu_st.gif" /> <img src="http://icons-ak.wunderground.com/data/640x480/2xeu_st_anim.gif" /> <img src="http://icons-ak.wunderground.com/data/640x480/2xeu_rh.gif" /> <img src="http://icons-ak.wunderground.com/data/640x480/2xeu_rh_anim.gif" /> <img src="http://icons-ak.wunderground.com/data/640x480/2xeu_ws.gif" /> <img src="http://icons-ak.wunderground.com/data/…
Last reply by freshJet, -
- 0 replies
- 2k views
Does anyone know of a code or something else that I can use to allow the pilots to pic one language before signing up? For example they would press on the registration link but it would take them to some where that would let them pic either English or French. Also does anyone know how I can make a separate different language pilot application.
Last reply by Dominican Airways, -
- 1 reply
- 2k 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, -
- 2 replies
- 2k 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
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, -
- 1 reply
- 2k 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, -
- 2 replies
- 1.9k views
Hello guys, I would like to ask if you can display your IP on a page of the site. Every driver, when you plug should see your ip. Can anyone help me?
Last reply by Tato123, -
- 1 reply
- 1.9k 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, -
- 3 replies
- 1.9k 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, -
- 0 replies
- 1.9k views
Want to make your images a bit more interactive? You can now with the following image style. Just hover over the image and it will bounce. Instructions ------------------------------ 1. Place the following CSS in your main style or css file http://pastebin.com/Z7hguc1j 2. Place the following HTML where you want the image(s) to appear. http://pastebin.com/cufq8En2 Enjoy! Video Demo http://www.youtube.com/watch?v=8pNvzUbkdu4
Last reply by StartVM, -
- 0 replies
- 1.9k views
Hi, i like have the module with Awards in the Pilot's Profile, with the comment: Issued by .... and the date and/or other comments from the staff member... Like IVAO's profile, or you can view it: http://www.transavia-virtual.com/index.php?action=rosterdetail〈=en&name=Nino&prefix=&surname=Beerens If you click in the images on the left you have this: Dispatch qualified by: Byron Visser @ 06-01-2010 18:09z Exam/training did on 6-01-2010, goodluck en have fun with dispatching ! I really like it... Do you know any code for do that? Thank you so much!
Last reply by Blu-Express VA, -
- 1 reply
- 1.9k views
Would like to see what the code is to show the number of pending pilots.
Last reply by Kyle, -
- 0 replies
- 1.9k views
Small code showing the VATSIM weather in the template, random <div id="metar"> <?php $sql = "SELECT ".TABLE_PREFIX."airports.id, ".TABLE_PREFIX."airports.icao as icao, ".TABLE_PREFIX."airports.name, ".TABLE_PREFIX."airports.country as country FROM ".TABLE_PREFIX."airports ORDER BY RAND() LIMIT 1"; $result = mysql_query( $sql ); while ($row = mysql_fetch_row($result)) { echo"<h3>METAR (ICAO: ".$row[1].")</h3>"; echo "Aeropuerto: <font color='#ff6600'>".$row[2]."</font><br />"; $adresse = 'http://metar.vatsim.net/metar.php?id='; $homepage = file_get_contents($adresse.''.$row[1]); echo "<font color='#2997ba'>".$homep…
Last reply by AlessandroCuba, -
- 0 replies
- 1.9k views
Hi all,Iwould like someonecould help me, ImountedmyAVsystembutwhen I connectFSFKto trackon the map, insteadof maintaininga line tothe pilot and theflight dataposition andeachonceIupdatedacarsgeneratesa new lineandsoindefinitely, asinthe mapdoes not generatea singleplaneiconbutit generatesan icon ineach positionwith the correspondingaspect ofthe planerow of iconsfor eachpositionthatI triedsendingtheacars.Lowithfsacarsand does not generatethiserror, but reportsthat buildsFSFKare much morecomplete. I hopeyour help. Thanksand sorry forthe grammarbecauseI do not speakEnglishproperly
Last reply by AirLevante, -
- 2 replies
- 1.9k views
Hi guys, wondering if there is any tweaks out there to change fleet page. Is it posssible to seperate all fleet by airline?
Last reply by ProSkyDesign, -
- 2 replies
- 1.9k 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, -
- 1 follower
- 3 replies
- 1.9k 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
- 1 reply
- 1.9k 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 reply
- 1.9k 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.9k 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, -
- 0 replies
- 1.9k views
Place the following on your site to randomly display a quote on page load. I recommend putting it in something like a bootstrap alert as done here http://redwoodva.net. Cheers! http://pastebin.com/KZasTXy6 Note: Everything between the quote that is written in blue, is the text that should be modified. Feel free to add as many quotes to the array as you wish.
Last reply by StartVM, -
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.8k 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, -
- 0 replies
- 1.8k views
friends, I wonder if you can, make a simple flight. example: A pilot with an initial rating, can operate for 6 airports to complete your scale flight. The pilot rating and an average amount of time is released routes to 12 airports to complete your scale flight. When you get to the last rating will be released all domestic and international flights, is it possible? the idea is good? tks.
Last reply by CN@ndo,