Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 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 reply
- 1.9k 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, -
- 3 replies
- 1.8k views
Hi all, Is there a module about or a piece of code that would send an email automatically to a pilot if he/she has not completed a flight within the first 10 days of registering. Or within 30 days of a completed flight Thanks in advance Scott
Last reply by flyalaska, -
- 2 replies
- 1.6k views
Is there a way to sort the pages by name instead of their ID number?
Last reply by t_bergman, -
- 2 followers
- 28 replies
- 9.4k views
Hi all I have created this form to place in the pilot centre so that if a pilot would like a route added to the VA he/she can fill this in and send it to the schedules manager. I have built the front end but I am struggling with the back end (PHP) could someone help me out? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <form name="contactform" method="post" action="send_form_email.php"> <table width='100%' border='0'> <tr> &…
Last reply by Vangelis, -
- 1 follower
- 2 replies
- 2.4k views
Hello dears, i would like to redirect users after logout to specific website caue the pilot center is in subdomaine also the phpvms i would like to redirect members to specific pages for ex: phpvms.domain.com to domain.com thanks in advance
Last reply by FlyingMachine, -
- 1 follower
- 3 replies
- 5.1k views
Hello, i'm trying to use google flight search api but dont know how to "decode" the result. The search is ok, i'm using this code with (solutions => "1") i put 1 just for tests, but want more <?php $data = array ( "request" => array( "passengers" => array( adultCount => 1 ), "slice" => array( array( origin => "LIS", destination => "OPO", date => "2015-05-09"), ), solutions => "1" ), ); $data_string = json_encode($data);$ch = curl_init('https://www.googleap...ch?key=MyAPIKey'); curl_setopt($ch, CURLOPT…
Last reply by aliatwa, -
- 3 replies
- 1.9k 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, -
- 30 replies
- 11.1k views
Dear All, The Certificate Of Promotion V_1.1 is now released. Below please find out how it works: Thanks It is a simple module that generates an automatic certificate for its members according to their respective positions in your Virtual Company.. 1º Download the Certificate_Of_Promotion_V1.1 module 2º Extract the downloaded files 3º Login to your FTP account and send the files within the folder Certificate_Of_Promotion_V1.1 to your server 4º Open your profile_main.tpl page choose the location you want to insert the link below that will appear to its pilots. <li><script language="Javascript"> function abrir(URL) { var width = 800; var height =…
Last reply by VIELMA16, -
- 12 replies
- 4.2k views
Hi guys, I'm trying to populate the the route_detais in phpvms_acarsdata table. Now im using a custom KACARS by Jeff. But, at this moment, he can't get any new order. Thanks for any help,
Last reply by Ademar Andrade, -
- 27 replies
- 9.7k views
Hello all, For those of you who know, Google has released a new version of the reCaptcha that doesn't have a Captcha: noCaptcha reCaptcha. Some more information can be found at http://www.google.co...ntro/index.html. Now, I've figured out (kind of) on how to implement it (very easy change), so I'm hoping it's backwards compatible. If anyone is willing to give it a try, please try my code snippet. My development copy of phpVMS isn't working as I want it to due to the skin, and I'm too lazy to go into the admin panel to change the skin to crystal. recaptchalib.php is attached, to install, go to (phpVMS isntall directory)\core\lib\recaptcha. Make sure to backup your old o…
Last reply by OWA001, -
Hi to All !! How is possible have only the join date and not the hours ? If i put <?php echo $userinfo->joindate;?> The result is: 2008-03-25 01:00:00 I need only 2008-03-25 Thanks
Last reply by Tom, -
- 2 replies
- 1.9k 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, -
- 1 follower
- 3 replies
- 2.1k views
Im mot sure if this is in the right forum so delete if needed. Is there a way to show who is logged into our TeamSpeak3 server on our website? I've seen a few VA's that have this and was wondering if it is some kind of code or program.
Last reply by Arctiq, -
- 2 replies
- 1.8k 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, -
- 0 replies
- 1.5k 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, -
- 10 replies
- 4.7k views
Decided to post this here as it's now lying around doing nothing. It's a jQuery slideshow plugin I created a few months ago, with the intention of publishing it elsewhere commercially. Instead, I'm posting it here for free. jQuery image sliders/slideshows are popular on VA websites. A lot of the times the ones available are quite complex. I remember when I first started making them I felt they were too complex for my needs. It's being released under the MIT licence, so you can use it as you wish, even commercially, provided you keep the copyright header in the code. Enjoy! simpleSlideshow.zip
Last reply by freshJet, -
- 5 replies
- 2.2k views
I'm stuck and need some help from the gurus on this board. I am trying to insert phpvms content within another cms without relying on an iframe. I want to be able to use modules within phpvms but use the cms framework to build pages etc with another system. Right now my folder structure is \root\ where the cms is and \root\phpvms\ where phpvms is installed. I've got this code so far but I don't know if I am missing elements? Thanks,
Last reply by Tom, -
- 2 replies
- 1.6k 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, -
- 5 replies
- 2.2k views
Hello, I was wondering, if there was a code that could be made public for a pop up login, so that when the login button is clicked, it slides open for the user to input there details. Regards, Myles
Last reply by StartVM, -
- 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, -
- 2 replies
- 1.8k 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
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, -
- 0 replies
- 1.6k views
Place the following on your site to randomly display a quote on page load. I recommend putting it in something like a bootstrap alert as done here http://redwoodva.net. Cheers! http://pastebin.com/KZasTXy6 Note: Everything between the quote that is written in blue, is the text that should be modified. Feel free to add as many quotes to the array as you wish.
Last reply by StartVM, -
- 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, -
- 2 replies
- 2.6k views
Add under routes section on schedule_briefing.tpl Will display top route flown from vataware I admit not the most graceful code....but what the hay...it works <?php $url = 'http://vataware.com/citypair/'.$schedule->depicao.'-'.$schedule->arricao.''; $page = file_get_contents($url); $start_char = '/flight/'; $end_char = '</a></td>'; $start_pos = strpos($page, $start_char); $end_pos = strpos($page, $end_char); $start_pos += strlen($start_char); $end_pos += strlen($end_char); $string = substr($page, $start_pos, ($end_pos - $start_pos)); $start_char = '>'; $start_pos = strpos($string, $start_char) + 1; $string = substr($string, $start_pos); echo …
Last reply by airhaul, -
- 1 follower
- 3 replies
- 2.5k views
Hi Guys, On our site, when in the registration process, the pilot has to enter their VATSIM CiD. Once registered, that data gets passed to the back-end for the pilot to get accepted/rejected, and the CiD they entered is displayed, my question is, is there a piece of code or API out there that will display the pilots name from VATSIM on the back-end VMS so we can check the name they entered in our system corresponds with that of the VATSIM account. Thanks, Joe
Last reply by joeholden, -
- 1 reply
- 1.7k views
Many people have commented that their pilot list items get out of alignment as items go on. Add the following line in each <th> tag as so Example: <th align= "center" width="200px">Crew ID</th> It will make a once misaligned table: http://i.gyazo.com/6df264d06a0e144c5da2548ce0e920e5.png Look Aligned: http://gyazo.com/935e4c5e7015075368ff381217c59b2e Cheers!
Last reply by in2tech, -
- 1 follower
- 5 replies
- 3.6k views
Hi to all, i have a little question. From my site i call this: http://www.virtualir...eflights?cs=VAR and i see the page with my map Now i need start the function with MainController::Run but don't work I use this code <?php MainController::Run('liveflightsivao', 'index', '?cs=VAR'); ?></center> Any suggestion for the correct string ? Thanks
Last reply by Tato123,