Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 3 replies
- 2.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, -
- 2 replies
- 2.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, -
- 1 reply
- 2.2k views
Hi Guys, What im trying to do is when a manual PIREP is submitted on my website I need the arricao to go into a custom field in my aircraft table called location. I have tried changing this section in PIREPData.class.php but it don't work: $sql = "INSERT INTO ".TABLE_PREFIX."pireps( `pilotid`, `code`, `flightnum`, `depicao`, `arricao`, `location`, `route`, `route_details`, `distance`, `aircraft`, `flighttime`, `flighttime_stamp`, `landingrate`, `submitdate`, `accepted`, `log`, `load`, `fuelused`, `expenselist`, `source`, `pob`, `exported`, `rawdata`) VALUES ( {$pirepdata['pilotid']}, '{$pirepdata['code']}', '{$pirepdata['flightnum']}', '{$pi…
Last reply by simpilot, -
- 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, -
- 2 replies
- 2.2k views
I have domicile managers that serve three hubs. I would like them to be able to view there three hubs when they are in the admin center. Right now they can only view the hub they are assigned to. Does anyone know how i can get this to work? Thanks Jorge O'Connor
Last reply by jeep865, -
- 3 replies
- 2.2k views
Hi, I'm not the best at coding but I would like to know if anyone knows a function that will count all live flight from the acars db and put it in a number. For example if the acars map shows 6 flight I would like the function to show 6 Thanks
Last reply by tim260, -
- 3 replies
- 2.2k views
Hi Guys, I have a Question about the Standart News System of phpVMS. Is there a way to change the News Layout from TITLE BODY POSTED BY to TITLE | TITLE BODY | BODY POSTED BY | POSTED BY so that in one row are two news items Great Thanks xhubix
Last reply by xhubix, -
- 1 reply
- 2.2k views
Hey, This is my first release for PHPVMS (and I forgot to spell and grammer check the instructions) so this is BETA 0.9 as it is almost complete. If you would like to add a tell a friend link to your site, this code should do exactly what you want :-) available as a popup, link, or embed. You can even create Skinned PHPVMS Pages to use with this Module/Code. The fields can be changed easily having on basic knowledge of HTML. If you experience any problems Use the forums because everyone may benefit form your question. Instructions are included. Enjoy tellafriend.zip
Last reply by VIP AIR Virtual, -
Pilot Hub Roster
by Guest- 2 replies
- 2.2k views
Is there any way to get like a roster of the pilots in a hub on to a hub page?
-
- 3 replies
- 2.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 reply
- 2.2k 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, -
- 0 replies
- 2.2k views
This topic has been moved to Releases. [iurl]http://forum.phpvms.net/index.php?topic=2091.0[/iurl]
Last reply by Nabeel, -
- 4 replies
- 2.2k 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, -
- 4 replies
- 2.2k 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, -
- 2 replies
- 2.2k views
Hi guys, Sorry for my persistance, But i'd like to request some codes... I want to change money to points system... Exemple every flight do by pilot, he make 1 point per 10 minutes. Is possible? And implement a pilot efficiency system... Exemple 90% average pilot efficiency... And Restrict some routes to pilots without required rank and award to fly for exemple LPMA. And is possible restrict some pages in profile_main.tpl and only show exam center for pilots with 'Student' rank? And how I do to when the pilot chooses the HUB in registration proccess, exemple if he choose LPPT for his HUB, his location is automatically LPPT (HUB chosen) and automatically just ha…
Last reply by Parkho, -
- 2 replies
- 2.2k views
This is half and half a code snippet post and also skinning however putting it here. Im using SimPilot's screen shot module, and was just wondering if there was a way of using the screen shot as a random image on the main page? I have an image that is 819 X 311 on the main page, and while I have the random image call working, I cant seem to make the image any larger. <?php Screenshots::show_random_screenshot(); ?> The actual code im using is : <center><?php $allpics = new Screenshots (); $allpics->show_random_screenshot();?></center> Adding any height= or width= seems to throw an error. Of course, in the past, ive made…
Last reply by topher2880, -
- 1 follower
- 3 replies
- 2.2k 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, -
- 3 replies
- 2.2k 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, -
- 0 replies
- 2.1k views
Hey guys! We don't use ACARS for my VA but I was wondering if there is a way of taking waypoints from the route assigned to that particular flight and then displaying them on the route map on the PIREP page rather than on the ACARS map as I've already seen. Please reply if you can help! Thanks, Theo.
Last reply by TB1, -
- 1 reply
- 2.1k views
Hey all, Does anyone have a snippet that will display a pilot his past flights on a google map? I am planning on putting it under the pilot center. Thanks!
Last reply by atulumello, -
- 2 replies
- 2.1k views
Can anyone share there pilots page that separates by Airline?
Last reply by Strider, -
- 0 replies
- 2.1k 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, -
- 0 replies
- 2.1k 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, -
- 2 replies
- 2.1k views
I have noticed quite a few virtual airlines that struggle to secure their website during development and beta testing. As you all know, without the correct protections, it is easy to view the website by appending /index.php to the URL. In order to combat this and restrict access to your entire phpVMS website by IP address, simply replace your index.php file in your root phpVMS directory with this attachment. The original code has been unaltered, I added about 16 lines of code to the top of it for the ip handling. The code is commented and quite self explanatory on how to work it. Cheers! index.php
Last reply by StartVM, -
- 4 replies
- 2.1k 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, -
- 1 reply
- 2.1k views
I was wondering if there was a way we could check if pireps are accepted or unaccepted. I was think of something like we can check if the user is an admin or not if he is then the system would check if there are unaccepted pireps. If there are the user would be redirected to the admin page or could be given a notification?
Last reply by Heritage1, -
- 1 reply
- 2.1k views
I have been playing around with some simple little scrolling News Boxes, and came up with this for everyone. You can have a peek at ; PhPvMs Site= http://heritage-va.net/hva or http://heritage-va.net (Main Site) Look to the right on theses sites, on the home pages. Below are some code snippets for above, and I have added some page scrolling scripts that Work great with PHPVMS also. Hope ya all can use these. Jimbo "Jungle" Heritage VA , CEO <!--Heritage VA 2016 , Demo; http://heritage-va.net/hva--> <!-- Scrolling News or what ever you'd like to scroll in your site The below script must be after the head tag, or the body tag.--> <!-- NOTE: this …
Last reply by shakamonkey88, -
- 2 replies
- 2.1k views
Hello, I'd like to know some of the codes for outputting the current financial state of the VA. In particular, I'd like to see how to output the sum total of all profit ever! i.e. the current 'cash' held by the company. In viewing finance_balancesheet.tpl I can only see monthly totals. Any other function calls or documentation are also welcome I am considering creating a little module for a bit of financial role-play immersion.
Last reply by GavinZac, -
Browser Icon
by Jeff- 2 replies
- 2.1k 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, -
- 4 replies
- 2.1k 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,