Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 0 replies
- 1.6k 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.9k 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, -
- 4 replies
- 3k views
Hello and Happy New Year to all, At my virtual airline, each pilot is required to submit two (2) PIREPs each month. I'm curious to know how I can modify either my app.config.php or local.config.php file to verify this for each pilot before declaring them inactive. I'm also looking to obtain a script that will send a pilot three (3) emails: 1) One email that alerts them that I've reached inactive status and need to complete two (2) flights to remain active. 2) Another email that gets sent out two (2) weeks after the previous one which will warn them that they are nearing termination. And 3) the third one will alert them that they are terminated following two (2) weeks of…
Last reply by AGuyFawkesMask, -
- 5 replies
- 4k views
Can somebody please explain to me how to get the vatsim ID on the pilot roster. If it is already here, i just cant find it... sorry, Thanks!
Last reply by rpalmer800, -
- 16 replies
- 5.5k views
Does anyone know the code for this? I have seen one before, however it was for the public profile. I've got it working too, but I want it now on the Pilot Centre, so when the pilot views the pilot centre, it says how long it's been since their last flight, for example: Your last flight was 3 days ago. That way, they know whether they are in danger of being marked inactive or not. I remember Virtual Norwegian had it when I flew for them...
Last reply by tutmeister, -
- 0 replies
- 1.9k 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, -
- 2 replies
- 2.1k views
Is there any way to get like a roster of the pilots in a hub on to a hub page?
Last reply by rpalmer800, -
- 0 replies
- 1.8k 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.5k 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
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, -
- 8 replies
- 3.6k views
I know this should be pretty simple but I can't get it to work! I've got this on my layout.tpl (it's part of the auth login code): $pilotname = PilotData::GetPilotData(Auth::$userinfo->$firstname); But it just shows blank - no errors or anything. Any ideas?
Last reply by freshJet, -
need help with free Pirep code
by Guest- 8 replies
- 2.7k views
this is HTML code for Free Pirep and i want use this code in my site can any one help me to change this code and how can i use it in my site <!doctype html public "-//w3c//dtd html 4.01 transitional//en"><HTML> <!-- saved from url=(0031)http://xxxxx/pirep.asp --> <!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Language" content="en-us"> <!-- Validated at 10/27/2011 10:10:38 PM --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><!-- InstanceBegin templat…
-
- 6 replies
- 4k views
Hello Apologies if this is elsewhere, I have been searching the forums and I couldn't find the information. I want to add to my pilot badge a line with "last flight" info, in the following format: Last Flight: KLAX-KBOS A320-232 CS-TYB Which is basically route, aicraft name/type and registration. Could someone please help me with this, in terms of code and which file to edit? Many thanks Cheers
Last reply by mark1million, -
- 2 replies
- 1.9k views
Hi how do I align my pilot roster so all the ranks and everything are all aligned under each other?
Last reply by bunoire14, -
- 3 replies
- 2.1k 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.
-
Mass Email Validation Form
by Guest lorathon- 1 reply
- 1.6k 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, -
- 1 reply
- 2.1k views
If any are interested in adding an image for each member on your site on the pilots list page, here you go. Add the table header that will hold the image headline: <th>Image</th> Next add the table data that will call for the image: <td align= "center"><img src="<?php echo fileurl('/images/members/'.$pilot->pilotid.'.jpg'); ?>" width="50px" height="75px" alt="<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?>" /> You will need to change this: ('/images/members/' if your images are located in another directory. You will also need to change this: pilotid.'.jpg' if you are using another type …
Last reply by mark1million, -
- 1 reply
- 2.3k views
Hi, Just thought this would be really useful to a lot of people wanting to integrate phpVMS with other software. This is a code snippet that will allow you to logout of phpvms regardless of where the script is or where it's called from. Just make sure the directory to you codon file is correct and everything should work fine . Here is the code below (basically the logout function of the auth class but written out instead of referenced to avoid execute problems): <?php require("../../phpvms/core/codon.config.php"); #self::remove_sessions(SessionManager::GetValue('userinfo', 'pilotid')); # Mark them as guest Auth::update_session(Auth::$session_id, 0); # "Ghost" e…
Last reply by Jeff, -
- 0 replies
- 2.9k 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, -
Browser Icon
by Jeff- 2 replies
- 2k views
Here's another code for you who are having trouble adding an icon to your web browser. First, create your .ico using whichever program or online generator you wish, and upload it to: public_html Next add this code to your layout.tpl just after <head> <link rel="icon" type="image/png" href="http://www.yoursite.com/site.png"> <link rel="icon" href="http://www.yoursite.com/favicon.ico" type="image/x-icon"> Rename the favicon.ico to the name of your .ico image and change both address to your website (do not include /index.php). Leave the site.png and type="image/x-icon" as they are, and it should show. This method is tested, and works on both IE9 and…
Last reply by mark1million, -
All pilots
by angle- 5 replies
- 3k views
Were can i get the all pilots module from so you can see all pilots and there last pireps and if they have filed there first flight?? any help would be great
Last reply by TennShadow, -
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, -
- 3 replies
- 3.1k 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, -
- 4 replies
- 2.5k views
I know this has come up before but my search is coming up blank. I may be a bit tired today. I am wondering if there is a code snippet or a release out there that will auto prune users who have registered and have not filed a flight within X amount of days. I know we can auto retire pilots, but this is different. If someone has time to register, why not the time to fly a flight within a week? If they don't have time for at least one flight in a week, they should get pruned. Easy task manually for small dead airlines, but what about busy airlines? Anyone got anything like this?
Last reply by TAV1702, -
- 0 replies
- 2.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, -
- 1 reply
- 3.9k views
Hello This is my first release.Everyone specially who is using the IP Board forum must be looking on how to display recent forum posts on your PHPVMS Home Page. Well here is how to do that. YOU NEED TO HAVE IP CONTENT INORDER TO USE THIS. STEP 1: Login to your admin cp. STEP 2: Create a block through the IP Content. STEP 3: Follow what to do in these screenshots which i am attaching. STEP 4: After creating the block near the block where all the blocks are displayed there must be a small sign and wgeb u will put your mouse on it it will say "Get code for widget" copy that code and paste it where ever u want to display RECENT FORUM POSTS. Enjoy! IP BOARD SCREENSHOT…
Last reply by fsxsimulation, -
- 1 follower
- 30 replies
- 9.6k views
---This might be better as a module--- I have been working all night on a code that will do the following: - Display the pilot's name and ID - Ask the pilot for a start date - Ask the pilot for an end date - Ask for a reason - Send an email with the details to my address upon clicking submit Also, I was wondering id fit could be added in the Admin panel to display who is on leave and how long it is until they return, as well as displaying the same info on the pilot's profile. May be a bit complex I know... So:
Last reply by James142, -
- 5 replies
- 3.3k views
I want to display the pilots Hub in the pilot center but I can't figure it out. I don't even have a clue as to what code to be using. If anyone has done this would you mind to post the code? Thanks in advance. Keith
Last reply by JustinRomaine, -
- 18 replies
- 4.2k views
I am trying to create another aircraft list but with registrations and type only, for the maintenance module. I've got this: <?php foreach $aircraft as $aircraft( ?> <html> <table border="1"> <tr> <td width="200"><?php echo $aircraft->registration ?></td> <td width="200">Last Check</td> <td width="200">Next Due</td> </tr> </table> </html> <?php ) ?> But get: Warning: Invalid argument supplied for foreach() in /home/freshje1/public_html/testskin/core/templates/fleet_maintenance.tpl on line 1
Last reply by stuartpb, -
- 4 replies
- 4.1k views
Hi, does anyone have a code for a load sheet in the pilot briefing or does anyone know where I can get the auto-generated pax and load for a flight? The system generates automatically Paxnumber and load when clicking on Send Pirep but I'd like to have it before starting a flight in the briefing in order to load the aircraft correctly. Thanks, Chris.
Last reply by stuartpb,