Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 1 reply
- 1.8k views
Please help me, i want to limit access to specific module. Probably via .htaccess and password. Please help if you know how ... P.
Last reply by simpilot, -
- 0 replies
- 1.8k views
Hi all, I am sure this has been asked and answered more than once but I am struggling to find the correct way to display if a Pilot is flying on Vatsim. I would like to display it on the live flights board. Any help would be great Thanks in advance Scott
Last reply by Angel Air, -
- 2 replies
- 1.8k views
Is there a way to sort the pages by name instead of their ID number?
Last reply by t_bergman, -
- 0 replies
- 1.8k 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, -
- 2 replies
- 1.8k views
Hello I have set up a module in my phpvms and when I link my button in the nav bar it show to everybody as normal but what I would like to do is only show the button to people in a group I have made up in the admin panel. I have found this but it doesn't work just returns and error on the line with the link on. <?php if(Auth::UserInGroup('GroupName')) { echo '<li>Your link here</li>'; } ?> Any ideas how to fix this? Thanks
Last reply by lancaster123, -
- 1 reply
- 1.8k views
Closed topic
Last reply by shakamonkey88, -
- 2 replies
- 1.8k views
Hi, is there a code snippet available for the following, a pilot joins and receives BBB002 then leaves another pilot joins, they are given BBB003 by the system, instead of the lowest available number. thanks in advance
Last reply by shaun105, -
- 0 replies
- 1.8k 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, -
- 2 replies
- 1.8k views
I need to know how I could have on passenger flights, cargo transport
Last reply by AlessandroCuba, -
- 3 replies
- 1.8k 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, -
- 0 replies
- 1.7k views
-- Delete -- thanks
Last reply by Daniel, -
- 1 reply
- 1.7k views
Every time one of my flights prices should show something like 151.70 it always removes the 0 on it and it shows up like 151.7 Is there a change I need to make for it to show up as 151.70? If the number is even (ex: 151.00) is comes up like 151
-
- 0 replies
- 1.7k 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, -
- 3 replies
- 1.7k views
Hi, there is some error in getReportsByAcceptStatus function in PIREPData.class.php. It is in around line 438. Change /** * Get all of a pilot's reports by status * * @param int $pilotid The Pilot ID to find * @param integer $accept PIREP_PENDING, PIREP_ACCEPTED, PIREP_REJECTED, PIREP_INPROGRESS * @return */ public static function getReportsByAcceptStatus($pilotid, $accept = 0) { return self::findPIREPS(array( 'pilotid' => intval($pilotid), 'accepted' => intval($accept) ) ); } to /** * Get all of a pilot's reports by status * * @param int $pilotid The Pilot ID to find * @param integer $accept PIREP_PENDING, PIREP_ACCEPTED, PIREP_REJEC…
Last reply by Kyle, -
Hi i have loded it all up and all ok but when you click the generate button i get this error in the console.. https://imgur.com/3MJL04T
Last reply by sev, -
- 0 replies
- 1.7k views
hello, im use this module, but between to 50 files i want pagination.... <div class="table-responsive"> <table class="table table-hover"> <thead > <tr align="center"> <th>Tipo de Aeronave</th> <th>Matricula</th> <th>Rango</th> <th>Aerolinea</th> <th>Pasajeros</th> <th>Carga Maxima</th> <th>Detalles</th> </tr> </thead> …
Last reply by OWA001, -
- 0 replies
- 1.7k views
Hi, I wanna share my code that I'm using to the briefing to my pilots. This code display the pax and cargo that they will use to their flight. It incluides Cargo and Passengers flight. <div class="col-md-4"> <table style="width: 100%"> <tr> <td class="auto-style12"><span class="auto-style26"><strong> <?php if($schedule->flighttype == "P") { echo "Pasajeros:"; } else if($schedule->flighttype == "C") { echo "Carga (KG):"; } ?></strong></span> <span class="auto-style26"><?php $allaircraft = OperationsData::GetAllAircraft(true)…
Last reply by ProSkyDesign, -
- 0 replies
- 1.7k views
Hi, Would anybody please have a snippet of code that I can add to my pending PIREPs page, which has a drop down of the airports stored in my phpvms_airports database? When selecting an airport, it will filter the PIREPs to show only those with a departure/arrival airport of the one selected? I hope that makes sense, Thank you in advanced. Daniel
Last reply by danielp1997, -
- 0 replies
- 1.7k 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, -
Flight Board
by sev- 0 replies
- 1.7k views
Hi im looking for the code to apply a acars map and flight board on a landing page before going into crew centre...Thanks Karl Alden
Last reply by sev, -
Mass Email Validation Form
by Guest lorathon- 1 reply
- 1.7k views
Replace the admin/templates/mailer_form.tpl with the one located in the ZIP file. It uses a validate script to stop you from submitting the email form without a subject. Minimally tested mailer_form.zip
Last reply by freshJet, -
- 0 replies
- 1.7k 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, -
- 1 follower
- 1 reply
- 1.7k views
Hello, Am wondering if anyone would be ever so kind to tell or send me some code. I have seen on various websites airport delays NOTAMS, I would like to implement this into my home page. Thanks
Last reply by Vangelis, -
- 0 replies
- 1.7k views
Hello everyone ... it is possible to access a page (eg: liveries) only pilots who have completed certain routes for download of a premium (special livery)? thanks to a possible reply.
Last reply by gio1961, -
- 0 replies
- 1.6k 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
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, -
- 3 replies
- 1.6k 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, -
Shadow Text
by Jeff- 0 replies
- 1.6k 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.6k 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.6k views
Closed
Last reply by PedroBoreio,