Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 2 replies
- 1.7k views
I need to know how I could have on passenger flights, cargo transport
Last reply by AlessandroCuba, -
- 1 follower
- 3 replies
- 2.4k views
Is it possible? So that you can have the latest route from vRoute in the schedules for all flights?
Last reply by druptown, -
- 2 replies
- 1.8k 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, -
- 3 replies
- 1.7k 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, -
- 2 replies
- 1.8k 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 reply
- 4k 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
- 1.9k 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, -
- 0 replies
- 1.8k 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
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
- 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, -
- 3 replies
- 1.5k views
Just looking to see if anyone wants to recommend some codes to make a site look better. Anything you find cool comment it here.
Last reply by Sava, -
- 9 replies
- 2.9k views
Hello, Could Some one provide me the code to echo the password for the signed in pilot, for creation of kAcars config file. pilot id was: <?php echo $pilotcode?> is there some same code but, for the password? greetz, Jacques
Last reply by Oxymoron290, -
- 1 follower
- 9 replies
- 3.4k views
I posted this question in a older skinning thread, but the thread appears to be closed or at least does not show up on the "new posts list and no one may have seen my post. There is a great code snippet for adding the GC Maps to the site. thread: http://forum.phpvms.net/topic/8040-adding-map/page__hl__+great%20+circle#entry53587 The above thread lists code that will plot the last 10 flights on the main page and ALSO the last 10 flights by a pilot on the pilot's profile page. I would like to modify so that the last 10 flights by a particular airline are shown. My code snippet question: how to make only the flights from one airline appear? I assume you can use some form…
Last reply by Marmus, -
- 0 replies
- 2.6k views
It's that time of year again so I thought I would share a script I found last year. Really easy to use. <!--Simply copy and paste into <BODY> Just above the </BODY> tag. --> <script type="text/javascript"> /* Snow Fall 1 - no images - Java Script Visit http://rainbow.arch.scriptmania.com/scripts/ for this script and many more */ // 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 Ar…
Last reply by RogerB, -
GCMap - Great Circle Mapper 1 2
by Guest lorathon- 42 replies
- 19.5k views
This will display the last 10 flights in a GCMap Great Circle Mapper Visit this site to customize the display of the map. <?php $flights = PIREPData::getRecentReportsByCount(10); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=650x360&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl …
Last reply by Marmus, -
- 3 replies
- 2k views
Is there anything out there that let's the pilots spend the money they earn in VA on virtual things?
Last reply by nabpp, -
- 2 replies
- 1.9k views
How can I add Notam's to the pilot center for that the pilots can see?
Last reply by souljony, -
- 4 replies
- 2.5k views
How can I get the Great Circle Mapper Code only show the Pilots flights. <?php $flights = PIREPData::getRecentReportsByCount(5); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=790x400&PM=permr:diamond7:green%2b%22%25I%22:white&PC=%fffff" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> It should only show the logged in pilots flights on the map. Thanks in Advance.
Last reply by Stealthbird97, -
- 11 replies
- 3.6k views
Hello, Would anybody know the code to split up the hubs into airline categories on the registration page like this?. Regards Michael
Last reply by Stealthbird97, -
My intent is to be able to click on the "File a new PIREP" link....have it take me to a page with only two buttons....."File a FSX Flight" and "File a DCS Flight." Each a link to a different PIREP form. I utilized David Clarke's great content module tutorial to create two new pages (tutorial: http://david-clark.n...content-module/). It appears that I used the tutorial correctly...my links are working, but the data stream seems to have been broken somewhere. Explanation: New pages are called "pirep_fsx.tpl" and "pirep_dcs.tpl" I created the new module, as directed in the tutorial....but I do not think it is the problem (I could be wrong) I replaced the data in the def…
Last reply by Parkho, -
- 9 replies
- 3.6k views
Hi all I have adapted my code to show country and rank but I have a problem it shows the country fine but not the rank here is my code any help would be great thanks. <div id="box"> <div> <h2>Users Online</h2> <p> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <h4>Pilots Online</h4> <?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot-&…
Last reply by Stealthbird97, -
- 2 replies
- 2.1k 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, -
- 7 replies
- 3.1k views
I DO NOT TAKE ANY CREDIT FROM SIMPILOT'S SCREENSHOT MODULE! This is a new function to delete the screenshot.
Last reply by TAV1702, -
- 4 replies
- 2.6k views
Does anyone know how do I add like to a fleet page how many planes we have on order something that can change automatically
Last reply by Dominican Airways, -
- 28 replies
- 9.8k views
$last_location = PIREPData::getLastReports([PILOT_ID], 1, PIREP_ACCEPTED); echo "This pilot's last location is: {$last_location->arricao}"; Of course, replacing the [PILOT ID] with the variable holding the pilot's ID
Last reply by Marmus, -
% complete flight 1 2 3
by fsx- 1 follower
- 74 replies
- 34.5k views
how can I get this?
Last reply by Angel Air, -
- 1 reply
- 1.5k 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.5k views
Anyone have the code or know how I can add like something showing our Team Speak Server?
Last reply by servetas, -
- 7 replies
- 3.1k views
Has anyone got a script which creates a different pilot badge depending on the pilot rank? Thanks
-
- 5 replies
- 7.1k views
No charts are displayed for any airports in the schdule briefing, so I modified the code to display charts found in the database. If no charts are found it will display the default link for airnav.com plus the message "No local charts found, try - [airnavlink]". You can see it here: http://www.flybritair.com/index.php/schedules/brief/1 You have to edit schedule_briefing.tpl Replace: <table width="98%" align="center"> <tr style="background-color: #333; color: #FFF;"> <td>Charts for <?php echo $schedule->depicao?></td> <td>Charts for <?php echo $schedule->arricao?></td> </tr> <tr align="center"> &l…
Last reply by tgycgijoes,