Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 4 replies
- 2.3k views
Need a new twitter feed in light of the new API (yes, it's been some time now). It's useless how the new one requires OAuth etc, whereas with the old one it was a case of a few lines of PHP or Javascript. Any suggestions?
Last reply by freshJet, -
- 4 replies
- 1.9k views
hey all i wanted to create sertain pages but only visible for a select user group in my dropdown. i tried it with a modified version i found here on the forum but no luck annybody care to help me out here. thanks
Last reply by Sava, -
- 1 follower
- 4 replies
- 2.4k 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, -
- 4 replies
- 2.3k views
Hello Is their some existing module or if some one could create a module which allows admin to reject a member but also allows the admin to keep the reason of rejection internally? Regards
Last reply by BaRBeR, -
- 4 replies
- 2.1k views
I have tried <?php echo $price;?> and it didn't giveme error codes but it didn't show it ether is here something im missing? like the guy had code it it put it like this <td><?php echo util::FormatDration($route->flighttime) ; >--></td>
Last reply by jusromaine, -
- 4 replies
- 1.9k views
Anyone know of a script for falling fall leaves or pumpkins? or something for the Fall season? Like the snow effect for xmas?
Last reply by Taran, -
- 1 follower
- 4 replies
- 4.9k views
Hi there. I'm the technical support staff from royal jordanian airlines which we are working on. I want to make an online box like this: http://rj-va.uphero.com/box.png. now i used this code <html> <head> <title>...</title> <style type="text/css"> .bg { width:300px; background:#333; border:1px solid #999; border-radius:10px; margin-left:auto; margin-right:auto; } </style> </head> <body> <?php $lng['trafficingb'] = 'Pilots'; $lng['notrafficingb'] = 'There is no traffic in the Jordanian Airspace.'; $weekdays = array( 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 =>…
Last reply by Tameem, -
- 4 replies
- 3k views
Hi there! As Air Anatolia VA , we're new on phpvms system and currently we are still stylizing. I was planning to change aircraft icons, there was 360 images files for each heading.Rotating,saving...rotating saving...just boring! And i noticed that ystem works like that in acarsmap.js ; It gets the heading data , and takes the image! I have an idea to simply that but i dont know anything about javascript :/ here is my idea; What if there is just one image file for aircraft icon , and javascript turns it by codes as the heading? Is it possible? If its possible and easy , can anyone help me? Thanks a lot!
Last reply by FSX30HD, -
- 4 replies
- 5.5k 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, -
- 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, -
- 4 replies
- 2.1k views
By default, the custom profile fields in phpVMS can't be set as required and most of us have issues when it comes to IVAO or VATSIM ids etc. Today, I decided to implement that feature. The changes can be found here. Let me list them here too: 1) On your database, go to your "TABLE_PREFIX"_customfields table and add a new column with the following details: `required` smallint(6) NOT NULL DEFAULT '0' 2) On your core/templates/registration_customfields.php (or the custom one if you are using a custom template) find this: <dt><?php echo $field->title; ?></dt> and replace with this: <dt><?php echo $field->title; ?><?php if(…
Last reply by servetas, -
- 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, -
- 4 replies
- 3.3k views
Hello, if you want to add METAR & TAF IVAO on your homepage, you can add this litlle part of code : <center><b> METAR: </b> <?php echo file_get_contents("http://wx.ivao.aero/metar.php?id=xxxx"); ?> <br>br> <b> TAF: </b> <?php echo file_get_contents("http://wx.ivao.aero/taf.php?id=xxxx"); ?> <br> </b></center> Replace just the xxxx with the ICAO you want to display.
Last reply by TennShadow, -
- 4 replies
- 1.8k views
Just a quick query, I know we have the nav database we can add. Question is, has anyone ever bombed their database with thousands of airports and then exported the table?
Last reply by TAV1702, -
- 4 replies
- 2k views
Dear friends, please help me with the site. I want to not registered polzavateli vidili here it is: and authorized vidili here it is: How is it possible to implement?
Last reply by sev, -
- 4 replies
- 1.7k views
Hello php coders, I wanted to create a module for my airline such that an admin can assign a particular flight for the pilot. How do I create it? Can anyone give me a start for this as I tend to create more modules. Thanks!
Last reply by ProSkyDesign, -
- 4 replies
- 3.8k views
Hello, I am wonder if some one would have the a code to allow me to issue pilots free jumpseats to work along side the fltbook V2 booking system.
Last reply by PikoSim, -
- 4 replies
- 3.2k views
Hi all. I have a section on the front page of my crew center that gives a snapshot of how many hours are left before the pilot reaches the next rank. The problem... When the pilot maxes out it starts to give a negative number. I would like to add an "if" statement to the following code that says basically, if the hours = < 0, then display "Congratulations<br>You have reached the highest rank." <div class="small-box bg-blue"> <div class="inner"> <h3><?php echo ($nextrank->minhours - $pilot_hours)?> Hours</h3> <p>until promotion to<…
Last reply by djtiger76, -
Getting airport country names
by Guest chikolol- 3 replies
- 2.8k views
sorry to post this again, i know i have posted this before but no one answers me, how can i call for the country name of the airport to show in schedules details along with the airport name, i know something like $schedules->name pulls our the airport name but how about $schedules->country would that work?
-
- 3 replies
- 3.4k views
Nabeel, i have a pilots list currently displayed in the va stats, listed i have all the countries displaying the flag and location in a table (for anyone else this is the code)Page in action <?php echo '<td align="center" width="250px" valign="top">'; echo '<table cellspacing="1" cellpadding="1" border="1">'; echo '<th width="150px"><div align="left">Country Location</div></th>'; echo '<th width="100px"><div align="center">Pilots</div></th>'; $country_info = DB::get_results('SELECT COUNT(pilotid) as total, location FROM '.TABLE_PREFIX.'pilots GROUP BY LOCATION'); foreach($country_info as $country) { echo …
Last reply by Nabeel, -
- 3 replies
- 2k views
I am trying to make my Schedule Details page look more realistic, as if it was a real airline website. For example, if you were to view flight details, you wouldn't be provided with a METAR, so I was thinking of changing this to a general weather thing. So, maybe have a picture of the sun and temperature if that's what the weather was at the destination. Another thing is to add the aircraft type to the details at the top, what would be the code for this?
Last reply by Jeff, -
- 3 replies
- 2.1k views
Hey all, I just tried this and it works a treat. It basically uses Great Circle Mapper instead of Google Maps to display the flight on the flight details page. I'm using it because I'm having problems regarding Google Maps. I'll be surprised if anyone uses it. <img src="http://www.gcmap.com/map?P=<?php echo $schedule->depicao ?>-<?php echo $schedule->arricao ?>&MS=wls&MR=15&MX=720x360&PM=*" /> Obviously, you can change the size by editing the '720x360' part. Hope this helped.
Last reply by mark1million, -
- 3 replies
- 3k views
I have tried 2 different banner rotators and neither have worked. I am sick and tired of looking and testing and ultimately failing. Anyone got a code? I know lots of you have banner rotators at the top of your pages...
Last reply by freshJet, -
- 3 replies
- 2k views
Is there any way at all to show pireps by certain hub only? I have been tossing around some code and got a few things to work but not this one. I have been at it for a few hours now. I keep getting it to pull pireps that have been filed, but it is giving it to me for all hubs, not just the one I would like it to show.
-
- 1 follower
- 3 replies
- 2.2k views
Is it possible? So that you can have the latest route from vRoute in the schedules for all flights?
Last reply by druptown, -
Hello guys, Is there a way to show a route that is generated from a website like this: http://www.vataware....om=LEMD&to=GCTS directly into a flightplan? So that it will show in this example the following route: "CCS UN975 BIRBA UN873 SOTEX UZ223 BEXAL UN866 KONBA ` Regards, Martijn
Last reply by tgycgijoes, -
- 3 replies
- 1.5k 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, -
- 3 replies
- 2.2k views
Hello, Could someone please provide me with a bit of code that echo's out the id of the current signed in pilot. I can already make it go VIRXXXX but I just need it to show the XXXX part, without the "VIR" infront? If that makes sense, Thanks for help in advanced, Regards, Daniel
Last reply by Sava, -
- 3 replies
- 1.9k 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, -
- 3 replies
- 1.4k 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,