mookie5913 Posted February 19, 2012 Report Posted February 19, 2012 Hey All, Very New to PHP VMS, I know HTML and CSS but not PHP so this is a new learning experience for me! Questions 1. I would like to embed the VATSIM Prefile page http://www.vatsim.net/fp/ directly into a page, that way I can file flightplans without leaving my site. Is this possible, and how would you do it? 2. Any tips for skinning, Ive read tons of stuff and downloaded a few custom skins but cant really figure out the basic just of it? Thanks Evan Quote
Sava Posted February 19, 2012 Report Posted February 19, 2012 You can use irames to embed the VATSIM FP Prefile. What I did for my VA is that I created a php code that automatically fills the FP with data from the booked flight and all you have to do is input your ID and password. 2. If you know HTML/CSS as you wrote, you should have no problem with skinning. Quote
freshJet Posted February 19, 2012 Report Posted February 19, 2012 Yeah I do the same as above. It's really simple - you pass the data through the URL with PHP. VATSIM clearly states NOT to use an iframe or embed it in any way so this is the best way to do so Quote
mookie5913 Posted February 19, 2012 Author Report Posted February 19, 2012 Yeah I do the same as above. It's really simple - you pass the data through the URL with PHP. VATSIM clearly states NOT to use an iframe or embed it in any way so this is the best way to do so Like I stated I don't know PHP so If you could show me an example I would really appreciate it! Quote
Sava Posted February 19, 2012 Report Posted February 19, 2012 . VATSIM clearly states NOT to use an iframe or embed it in any way so this is the best way to do so Where did you read that? Ontopic: i will post the entire code for you tomorrow but you will have to modify it for your VA fleet. It is just a separate php file you call in the schedule_brief.tpl file. You could of course just put the code in there but I like to keep my code clean and include() works fine Quote
freshJet Posted February 20, 2012 Report Posted February 20, 2012 Where did you read that? Can't seem to find it now but it's definitely not allowed. Quote
Sava Posted February 20, 2012 Report Posted February 20, 2012 It is allowed to iFrame it as far as I know. You know how they say, no link, didn't happen lol. I will check the forums and see. I will post with info. Quote
AlexCohrs Posted February 22, 2012 Report Posted February 22, 2012 Yeah I do the same as above. It's really simple - you pass the data through the URL with PHP. Wow, sounds great, I would love to include that to our system. Can you help me with an example? Thank you and kind regards Alex Quote
freshJet Posted February 22, 2012 Report Posted February 22, 2012 Of course The data is sent as follows: http://www.vatsim.net/fp/?2=BAW444 Results in this because the 2 in the URL refers to field 2. http://www.vatsim.net/fp/?2=BAW123&3=A320 Results in this because the 2 in the URL refers to field 2 and the 3 refers to field 3. So, in your schedule briefing, you can make it: http://www.vatsim.net/fp/?2=<?php echo $schedule->code.''.$schedule->flightnum;?>&3=<?php echo $schedule->aircraft;?> Remember to try and fill in as many fields as possible for the pilots, so that they have less filling out to do. Then, make this a link for your pilots: <a href="http://www.vatsim.net/fp/?2=<?php echo $schedule->code.''.$schedule->flightnum;?>&3=<?php echo $schedule->aircraft;?>">VATSIM Prefile</a> Then click the link in your schedule briefing and it will bring up the relevant data Mine currently does 10 of the 16 fields. You can add even more if you have the VATSIM ID custom field, as you can then get their ID too. Quote
AlexCohrs Posted February 22, 2012 Report Posted February 22, 2012 Of course The data is sent as follows: Awesome! I think I understand that now. Thank you so much - that certainly will be a great feature for our pilots. Alex Quote
Felipe Posted August 23, 2012 Report Posted August 23, 2012 Here is like I'm using in my VA. But remember this code has some costumization. <a href="http://www.vatsim.net/fp/?1=I&2=<?php echo $schedule->code.$schedule->flightnum; ?>&3=<?php echo $acft_fsinn; ?>&4=0450&5=<?php echo $schedule->depicao;?>&6=<?php echo str_replace(":", "", $schedule->deptime); ?>&7=<?php echo $schedule->flightlevel; ?>&8=<?php echo strtoupper($schedule->route); ?>&9=<?php echo $schedule->arricao;?>&10a=<?php printf('%02d', $hr); ?>&10b=<?php printf('%02d', $min); ?>&11=<?php echo "{$schedule->notes}"; ?>&11a=V&12a=<?php printf('%02d', $fob_hr); ?>&12b=<?php printf('%02d', $fob_min); ?>&13=<?php echo $altn_ap ?>&14=<?php echo $_SESSION['piloto']; ?>+ICAO" target="_blank">Registrar</a> Quote
Felipe Posted October 26, 2012 Report Posted October 26, 2012 Just a correction on my code above... Where you see... &11a=V&12a= ... change to.. &voice=/V/&12a= Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.