Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 0 replies
- 2k views
This topic has been moved to Releases. [iurl]http://forum.phpvms.net/index.php?topic=2091.0[/iurl]
Last reply by Nabeel, -
- 0 replies
- 1.6k views
Hey Guys, All my cargo routes have flight numbers starting with 9. Currently www.zonexecutive.com/index.php/routemap shows ALL routes. I want a separate map maybe like www.zonexecutive.com/index.php/routemap/cargo that shows all schedules with a flight number with a first digit being 9. Any Ideas? Nout
Last reply by Nout - Zon Executive, -
- 0 replies
- 1.6k views
If you are like me and have not got pagination working yet, some pages can get real long. Here is a quick little trick to get you back to the top of the page and save your index finger for later use. At the very top of the tpl file (page you are working on) add <body id="top"> then add your link at the bottom of the page like such <a href="#top">Back To Top</a> Someone sent me a pm some time back and asked me about it and I forgot to post it in the forums. Better late then never.
Last reply by TAV1702, -
- 0 replies
- 1.5k views
-- Delete -- thanks
Last reply by Daniel, -
- 0 replies
- 2.2k views
Does anyone have the HTML of the last flights of the "Pilot" and the flights booked?
Last reply by Rafael, -
- 0 replies
- 1.5k views
Recently I have been working on a VA for a client and I noticed im using quite a bit of jquery. Maintaining this code can be a bit of a headache so ive decided to create a boilerplate to maintain ALL my jQuery in one place. Before I began I done a quick search and was unable to find exactly what I wanted, there was a similar method used by studioforty9.com, however it relied on a body class produced by in their case magento e-commerce. This would not work in phpvms's case as it does not apply a class to the body for each page(controller) so here is my work-around for a global scope. The method: init Loads any code used cross domain initSiteSection Loads the correct …
Last reply by pkav, -
- 0 replies
- 1.3k views
OK, so I posted a thing about a Login PopUp a while ago, but now I'm stuck. I found this: http://docs.jquery.com/UI/Dialog What the hell do I do? I want it to show after the user has logged in and is being redirected to the profile_main.tpl. What parts of the code on the jQuery tutorial do I need, and where do I put them? Also, I only want this to show once.
Last reply by freshJet, -
- 0 replies
- 2.8k views
Instead of selecting 'More Than' or 'Less Than' and then typing the value, is there a way to make it so that it displays a jQuery slider to choose the distance filter, changing the results as you slide it? I'm sure most of you know what a jQuery slider is anyway, but here is an example: http://jqueryui.com/demos/slider/
Last reply by freshJet, -
- 0 replies
- 2k views
Hello community, I have a question again. is it possible to Statistics, pilots, user load and install Flights Online ad on this page: Nightfly Test site If so link with what I can do this? So everything that is seen on the picture! would be observed then there are the new website is not in the Directory phpvms and there should not lie and has so far held in html and will remain so.
Last reply by Passion, -
Shadow Text
by Jeff- 0 replies
- 1.4k views
I found this little code that will give you a shadow under your text. You can change the font color, type, size, and more. <span style='font-family:monotype corsiva;font-size:40px;color:#aaaaaa;'>Text goes here</span><span style='display:block;position: relative;left: -4px;top: -22px;font-family:monotype corsiva;font-size:40px;color:#048DC6;'>Text goes here</span>
Last reply by Jeff, -
- 0 replies
- 1.4k views
Hey, I'm searching for an addon that let me see all the aircraft and their current location on a map (airport)... not like the Live map thanks
Last reply by Moritus, -
- 0 replies
- 1.3k views
How can i make it that the search schedules on the site .../pireps/routesmap on several undersides are indicated. Any help would be great... Regards from Germany
Last reply by AEUfly, -
- 0 replies
- 1.6k 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, -
- 0 replies
- 1.8k 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
- 1.8k 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, -
- 0 replies
- 1.5k views
If you have manual rank settings, this code seems more appropriate for promotion information than the default. Default file name: profile_main.tpl default code: <p>You have <?php echo ($nextrank->minhours - $pilot_hours)?> hours left until your promotion to <?php echo $nextrank->rank?></p replacement code: <p>You must have at least <?php echo ($nextrank->minhours)?> hours to be eligible for <?php echo $nextrank->rank?>.</p>
Last reply by C1971W, -
- 0 replies
- 1.7k 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, -
- 0 replies
- 1.3k views
Hi, How would I go about creating a page in the Admin panel of PHPVMS? I understand about adding the link in the nav on the left, but I can't link it up etc. If anybody could help, would be great. Thanks Daniel
Last reply by PlumbBum, -
- 0 replies
- 1.3k views
Hello, with the release 5.5 the ranks are calculated with the totalhours is possible calculate the ranks by totalhours + transferhours? If i put on Dbase the number of totalhours + transferhours when recalculate the ranks the system put only the totalhours Thanks
Last reply by Tato123, -
- 0 replies
- 2.5k 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, -
- 0 replies
- 1.7k 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.8k 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, -
- 0 replies
- 1.4k views
Hello all, is possible to compress phpvms with something like this? if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); I have tried but allways get errors and css problems. My homepage(root) isn't phpvms and is compressed, the foruns phpbb3(root/phpbb3) is compressed too. The phpvms is in root/folder/phpvms but can´t compress. To do the tests i used this website http://www.gidnetwor...s/gzip-test.php Anyone ever tried? Thank you
Last reply by piuozorio, -
- 0 replies
- 1.8k 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
- 1.5k views
Similar to my simpleSlideshow plugin, only for an image gallery instead. Released under the MIT licence, free for personal or commercial use provided that the copyright header remains intact. Note: Due to file size restrictions on the forum, I was forced to delete a few of the demo images. simpleGallery.zip
Last reply by freshJet, -
- 0 replies
- 1.7k 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
- 3k views
Unless google comes out with a quick fix, here is a fix for an error you are, not a matter of if but when, going to see it. PLEASE RESEARCH THIS FIRST!!!!! DO NOT USE UNLESS YOU ARE SURE! I WILL NOT BE RESPONSIBLE FOR YOUR SECURITY OR WEBSITE. I am not a pro. I just read this on stackoverflow and it worked. line 42 reads: function ReCaptcha It needs to be : public function __construct to fix this: Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ReCaptcha has a deprecated constructor in C:\wamp\www\phpvms\core\lib\recaptcha\recaptchalib.php on line 42 That error is a result of running phpvms on php 7 and m…
Last reply by TAV1702, -
- 0 replies
- 1.4k views
Hey guys. I just wanted to share with you a small bit of code that I am using. This will format your total earnings in your pilot's signatures as a monetary amount. An example of this is in my forum signature. Should you wish to use it, the code needs to be placed in line 977 of the PilotData.class.php file. Overwrite anything that's already there but I would advise you make a backup. Hope someone finds this useful! if(Config::Get('SIGNATURE_SHOW_EARNINGS') == true) { $output[] = 'Total Earnings: ' . FinanceData::FormatMoney($pilot->totalpay); }
Last reply by TB1, -
- 0 replies
- 1.6k 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, -
- 0 replies
- 2.1k views
<img src="<?php echo SITE_URL?>/lib/images/acars/<%=flight.phasedetail%>.png" alt="<%=flight.phasedetail%>"/> Place the above code in your acarsmap.tpl file, in your lib/images folder create a folder called acars. and use your acars map to create the images and name the images exactly how it looks on your acars map. You should have something that looks like: http://malaysiava.org/index.php/acars
Last reply by Strider,