Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 1 follower
- 4 replies
- 1.9k views
Prompt how to report (pirep_viewreport.tpl) on the flight of the log page to display a pitch angle of (...) deg.?
Last reply by bass, -
- 1 follower
- 2 replies
- 2.1k views
Hello, A few months ago I found a script on this forum to show all the awards next to each other instead of in a row below each other. I cant find it anymore on the site. So can anyone tell me how to create the profile in a way that all the awards will be shown with 4 in a horizontal row, then the fifth is starting on a new row? Kindly regards, Rick Winkelman
Last reply by ncd200, -
- 6 replies
- 2.9k views
full article on my blog: http://code.voemercosul.com/ CODES: http://pastebin.com/jXJFrLL1 http://pastebin.com/TAguaNYb PS.: This is not the best programming method for phpVMS, soon I will post an update of the traditional form code, this is a more inciante method. DEMO: http://voemercosul.com/v2/index.php/Dataroutes aeroportos_tw.sql.zip
Last reply by LuisMoraes132, -
- 1 follower
- 8 replies
- 2.9k views
I've finished a little code snippet for everyone, I was prompted to create this in regards to a particular individual that posted someone else's PHPVMS Skin. Well, the only way this person got this, was either through Fire Fox FireBug plugin, or just plain hacked it. ( the code source that is.) Easy to do now a days, so here, this is for Everyone, and is really simple, short and to the point. This will Protect against a right click to view the page source, if you put this into the ---> layout.php page, and/or the , frontpage_main.php "Anywhere", and of course this can be used anywhere you want. And it IS HTML compliant !! Period. php,htm, html, xml, and xhtml. B…
Last reply by Vangelis, -
- 1 follower
- 2 replies
- 2.3k views
Hello everybody. There is free use of the site on which the script has useful addons for us. Help adapt some scripts under phpvms. Dispatch. I found this site on the hosting, it has become a bit errors, but it does not matter. The main thing is to understand that there can be useful to him. I recorded a short video on how to create a briefing on this site. Can we pull this script and adapt it to our system? Script Download http://www.avsim.su/f/raznoe-24/skript-bukinga-54006.html?action=download&hl=
Last reply by bass, -
- 1 follower
- 3 replies
- 1.9k 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, -
- 0 replies
- 1.9k views
I have recently re-vamped the default Modules with some neat Embedded links, pop-up windows that are "Live" and full of cool Features for everyone. it took a little while, but if using this, PAY ATTENTION to it !! I have included a live Metar...Live Map section that is embedded if paying attention to each Arr/Dep... you will see brackets that will throw you into an instant PDF downloadable file. There are a TON of embedded features in this Pilot Brief section, below is the code, the file name is ; schedule_briefing.php Backup your original by just re-naming it, pretty simple. there is also a IFR link directly to flightaware for the Live route. All I can say is this, m…
Last reply by Heritage1, -
- 4 replies
- 2.2k views
Can someone please help? I have 2 active airlines on my VA and need a code to show what airline does the route. Airline: AUR Flight No: AUR002 Departure: LFLS - 14:30 Arrival: EGJB - 15:20 Equipment: ATR72-500 (G-VZON) Distance: 404.633nm Days Flown: S Route: DANBO UT133 AMORO UT140 PIBAT UM976 OKRIX UH10 AMODO UM729 RESMI UN491 PIGOP UN160 CAN By Airline i have the Airlines code but want it to display its name if possible.
Last reply by web541, -
- 5 replies
- 2.1k views
vFleetTracker I try to make so that page (indeks.tpl) shows the status of each aircraft. - This plane is not booked - This plane is booked - The aircraft in flight - You do not have access to this aircraft. If the aircraft is free - it is possible to click and see which flight you can do it in view of what he's airport. <?php $data = OperationsData::getAllAircraft(); $online = ACARSData::GetACARSData(); $lastbid = ACARSData::GetACARSData(); $airports = array(); foreach(OperationsData::getAllAirports() as $aircraft) $airports[$aircraft->icao] = $aircraft; foreach($data as $aircraft){ if($aircraft->charter == 0) { if($aircraft->icao != 'SU95') conti…
Last reply by bass, -
- 1 reply
- 1.5k views
Help to complete the code. This code should reflect the flight status. - Flight free - No aircraft at the airport - Book as can be seen from the code below, now there is no warning that the aircraft is out of this airport. How do I add ??? at the moment I am using the following code: <?php if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <?php $search1 = (array( 'a.registration' => $route->registration, 's.bidid != 0' )); $schedules = SchedulesData::findSchedules($search1); $disabled = $schedules[0]->registration;if($route->registration==$disabled) { continue; } ?> <div class="btn…
Last reply by bass, -
- 2 replies
- 2k views
Hi folks, If anyone could lend help with this, I would appreciate it. Per this post, I was able to modify the download_list.php file get the image added. What I am trying to figure out now is how to make a link out of the IMG tag so that if a person clicks on the reduced size picture (reduced due to the width attribute), they would be able to see the original full size picture (in a separate window of course). <li style="overflow:hidden;"> <a href="<?php echo url('/downloads/dl/'.$download->id);?>"> <?php echo $download->name?></a><br /> <img src="<?php echo $download->image?>" style="width:150px; vertical-alig…
Last reply by natcret, -
- 0 replies
- 2.4k views
Hello, someone has put to your website this flight map? https://github.com/R-Tur/Vatsim-Flight-Map I have now is a map from another website (Iframe). I would not depend on anybody and put his flight map. Now there is an error associated with the key. Maybe I'm wrong, can someone help make flying the card to work?
Last reply by bass, -
- 1 reply
- 1.6k 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, -
- 5 replies
- 3k views
I need help. I am trying to make the generator Dispatch. But it does not work (((( This link is found a php file associated with the Dispatch https://github.com/noodlehaus/dispatch. Can you suggest how to install it on the site?
Last reply by Yash, -
- 0 replies
- 1.5k 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, -
- 7 replies
- 6.1k views
UPDATE ON 1/30/2016 To start off thanks dave for the Simpilotgroup charter system ! I have modified this script so it would fit my needs and now i thought that i would share it with everyone so whoever had this script would be able to use my idea. My idea was to modify the script so that it would automatically calculate a price for each flight and so it does now. It calculates the price by how many miles the flight is in total and then multiplies 0.75 or however much you want it to be per mile. ps.. No i didnt take this idea from the Realschedule. You will have to have a valid version of this module whether it might be php or the tpl version i have edited a…
Last reply by smokey68, -
- 0 replies
- 1.7k views
I did widget page "EVENTS" and trying to do so that the informer was deduced on the personal page of pilots ... can someone tell me how to do it? <!-- START .main-contents --> <div class="main-contents"> <div class="container"> <div class="row"> <div class="col-md-3"> <div class="ft-item"> <span class="ft-image"> <img src="<?php echo $event->image; ?>" alt="Event Image" /> </span> <div class="ft-data"> <p><a href="#" class="ft-plane text-upper"><?php echo $event->arr; ?>-<?php echo $event->arr; ?></a></p> <p>Sch/Num: <?php echo $event-…
Last reply by bass, -
Tourcenter
by bass- 5 replies
- 2.9k views
Hi all, tell me where to get this module ??? Tourcenter modules
Last reply by Tummi, -
- 0 replies
- 1.6k 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, -
- 1 follower
- 7 replies
- 3.6k views
How would I go about getting each pilot's total miles flown (all time) on the roster? Like they have the flights and hours, how would I add the miles?
Last reply by ercio, -
- 1 follower
- 6 replies
- 2.9k views
Good morning to all , How are you ? I am trying to do something for pilots who has less than 10 flights in our Virtual to prevent download the files from Downloads page in our Virtual how can i do that ?? i have this code but i am not sure if it work and where can i put it $userid = $_SESSION["userid"]; $result = mysql_query("SELECT count(*) from `topics` where `userid` = '$userid') or die(mysql_error()); $topicCount = mysql_result($result,0); if($topicCount < 10){ echo "You have $topicCount topics so far. You need a minimum of 10 to get access to downloads."; } download just for pilot who has more than 10 flights otherways pilot cannot download the fi…
Last reply by servetas, -
- 0 replies
- 2k views
Hello help me? I'm having trouble because my phpvms not this show the information in pafina / index / profile I already tried the tutotial (Getting variables in templates) more will not Tutorial:(http://forum.phpvms.net/page/index.html/_/skinning-and-customization-guides/getting-variables-in-templates-r34) <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link href="<?php echo SITE_URL?>/lib/skins/flytam/style.css" rel="stylesheet" media="all" /> <?php /*Any custom Javascript should be placed below this line, after t…
Last reply by pedrobrandine, -
- 2 replies
- 1.9k views
Can anyone share there pilots page that separates by Airline?
Last reply by Strider, -
- 9 replies
- 2.7k views
I have top 5 pilots on home page, however the callsign and total hours show like this ... callsign is EIN1234 and the hours are 67 there isnt a space. Could you tell me how to do this. I have added the code below. Thanks in advance. EN123467 <?php $year = date("Y"); $month = date("m")-1; if($month == 0) { //If it's january, previous month is december. $month = 12; $year -= 1; } $pilot = TopPilotData::top_pilot_hours($month, $year, 5); echo '<table>'; foreach ($pilot as $top) { $pilot = PilotData::GetPilotData($top->pilot_id); echo '<tr>'; echo '<td>'.$pilot->firstname.' '.$pilot->lastname…
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, -
- 2 followers
- 2 replies
- 2.6k views
Wondering if any of the folks out there know code i can use for my registration to take all the airline options away but one? There is a dropdown on the registration form where pilots can choose an airline and i want to get rid of that and make to where, when they all join its under the same airline identifier. Thanks for any help Tyson
Last reply by tdohrer, -
- 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, -
- 4 replies
- 5.4k views
Hello, I'm looking for the code to show the airline logo on the schedule list when pilots search for it? Does anybody have this code? Regards
Last reply by fardly83, -
- 1 follower
- 4 replies
- 2.3k views
In pirep_viewreports.tpl, it tells you the actual flight time, I want to display the expected flight time as set in schedules>flighttime. I came up with: <li><strong>Expected Time: </strong><?php echo $schedule->flighttime; ?></li> But I'm thinking that this doesn't work because it doesn't know what flight to look at? Any help gratefully received
Last reply by Vangelis, -
- 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,