jantorre Posted October 27, 2009 Report Posted October 27, 2009 I know most of you would get this working yourself, but for you who dont here is a sample of the code I use to display custom chart snapshots and links in the pilot briefing page. Also included are the links we use for weather: First of all I gathered all the links for the airports we fly to, based the charts on the lokal vacc at vatsim because many AIP sites require you to log in: I placed snaphost of the ground layout with format ICAO.gif in folder named images/charts . Image size 387*594. It is a bit of work, but I think the result is good. Have only received possitve feedback so far ;D Links placed in the airporttable under 'chartlink' and added a row for link to local VACC aswell('vacc'): From schedule_briefing.tpl starting somewhere close to line 115(Procedures and Information): <h3>Procedures and Information</h3> <table width="98%" align="center"> <tr style="background-color: #333; color: #FFF;"> <td>Charts for <?php echo $schedule->depicao?></td> <td>Charts for <?php echo $schedule->arricao?></td> </tr> <tr align="center"> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.yoursite.com/images/charts/<?php echo $schedule->depicao?>.gif" width="387px" height="594px" alt="No chart available" /></a><br> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->vacc; ?>" target="_blank">Local VACC</a> </td> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.yoursite.com/images/charts/<?php echo $schedule->arricao?>.gif" width="387px" height="594px" alt="No chart available" /></a><br> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->vacc; ?>" target="_blank">Local VACC</a> </td> </tr> </table> and here our weather stuff: <h3>Weather</h3> <div align="center"> <B>Weather chart: 24hr Surface Prognosis</B> <p><img src="http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_PROG-BRIEFING_24.gif" /></p> <B>Forecast significant WX for time 12Z:</B> <a href="http://www.flyingineurope.be/aviation_weather_maps.htm" target="_blank">For other times</a> <p><img src="https://www.aro.lfv.se/fpc/Tor/SWC_1200.gif" width="826px" height="583px" alt="No chart available" /></p> <B>Europe FL100 Wind, Temp and Icing Forecast</B> <a href="http://www.jetplan.com/jeppesen/weatherServlet?&action=show&graphicType=wxMapWT&img=euwt100m" target="_blank">For other times</a> <p><img src="http://www.jetplan.com/weather/data/maps/euwt10024.gif" /></p> <B>Winds @ FL340 12hrZ: </B> <p><img src="http://ows.public.sembach.af.mil/gifImages/21OWS_EUROPE_MODEL-DATA_UKMO-GLOBAL_WIND-TEMP_FL340_12_00Z.png" /></p> <B>Winds @ FL390 12hrZ: </B> <p><img src="http://ows.public.sembach.af.mil/gifImages/21OWS_EUROPE_MODEL-DATA_UKMO-GLOBAL_WIND-TEMP_FL390_12_00Z.png" /></p> <B>Precipitation predicts for today:(rain/snow etc)</B> <p><img src="http://www.usatoday.com/weather/TWC_Images/eur_precip_440_dmy_y.jpg" /></p> <B>12HR Icing:</B> <p><img src="http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_ICING-STANDARD_12.gif" /></p> <a href="http://www.flyingineurope.be" target="_blank">View additional weather graphs</a> or use <a href="http://www.ippc.no" target="_blank">Avinor Internet Pilot Planning Center</a> </div> <div align="right" style="font-size: small;">Data Courtesy of <a href="http://www.flyingineurope.be" target="_new">flyingineurope</a></div> <br /> The weather links are for 12 zulu, but there is link to the other times aswell. Results: Regards, JT 1 Quote
hjhjhgjgjh Posted October 27, 2009 Report Posted October 27, 2009 hahaha i had same idea today and also did it. just another way Quote
jantorre Posted October 27, 2009 Author Report Posted October 27, 2009 Feel free to share your approach, I'm shure there is easier ways to do this than I have. Quote
Administrators Nabeel Posted October 28, 2009 Administrators Report Posted October 28, 2009 I added a column in the latest beta to include a chartlink in the admin panel. I forget the exact field name, but you can check the install/update.sql for the field. I think it's "chartlink" Quote
G-NEWC Posted October 28, 2009 Report Posted October 28, 2009 Would it be possible to have a field for displaying the ILS frequency(s) for each arrival airport, on the view schedule page? Something that is linked to the admin panel. Quote
hjhjhgjgjh Posted October 28, 2009 Report Posted October 28, 2009 it would be possible i think but that needs some adjustments to the database. otherwise you could also write it into the "notes" field. jantorre: well the problem is, that there is a picture of the ground charts. i just removed that. that makes it easier because i have more than 300 airports in my virtual airline and it would take a looong loong time until i make screens for every airport. so for me, there is only something like a "Download" button to the pdf charts on my server. i print those with a pdf printer from jeppview. thats all Quote
hjhjhgjgjh Posted October 28, 2009 Report Posted October 28, 2009 ah and btw, with this tutorial, you can make the screens then automated. http://www.redvodkajelly.com/blog/2007/10/15/how-to-create-pdf-preview-images-in-php/ hope it helps Quote
Alex Posted April 7, 2010 Report Posted April 7, 2010 In relation to this post, i have used tebinu's method to add the weather charts, The present flightaware airport diagrams only cover the US so it seems,can anyone make a quick code snippet, so that if the charts are not available then it looks in a skin/lib/images/charts folder for one i have already downloaded? Quote
Administrators Nabeel Posted April 8, 2010 Administrators Report Posted April 8, 2010 In relation to this post, i have used tebinu's method to add the weather charts, The present flightaware airport diagrams only cover the US so it seems,can anyone make a quick code snippet, so that if the charts are not available then it looks in a skin/lib/images/charts folder for one i have already downloaded? Well you can change the path and put them all into one folder, without having to check one folder, then check another. Moving this to Code Snippets Quote
Alex Posted May 15, 2010 Report Posted May 15, 2010 after some gremlins in my system i'm trying to get the arrival and departure airport plans to display on the schedules briefing template. I'm using this code, (as from this topic, but all i can get displayed is the link to the chart,(which works fine). I actually want the image to display rather than the link. I know the chart link in the admin side of things is filled correctly, but does this need to be left blank? <table width="98%" align="center"> <tr style="background-color: #333; color: #FFF;"> <td>Charts for <?php echo $schedule->depicao?></td> <td>Charts for <?php echo $schedule->arricao?></td> </tr> <tr align="center"> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.atlasvirtualairlines.com/images/charts/<?php echo $schedule->depicao?>.png" width="387px" height="594px" alt="View Charts" /></a> </td> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.atlasvirtualairlines.com/images/charts/<?php echo $schedule->arricao?>.png" width="387px" height="594px" alt="View Charts" /></a> Quote
Guest lorathon Posted May 15, 2010 Report Posted May 15, 2010 If you look at your folder holding the charts http://www.atlasvirtualairlines.com/images/charts/ I think you need to change the file names. You are attempting to display the image as..... <?php echo $schedule->depicao?>.png Which would translate to ICAO.png. It looks like only KJFK should show. All the other charts are lower case. I would try to make all uppercase. Quote
shaun105 Posted December 5, 2010 Report Posted December 5, 2010 Hi I have placed the coding in for showing the charts. All Irish charts such as EIDW-EINN-EICK work fine. However I have tried EGLL once you click on the placement image it transfers back to the pilot briefing. Could someone give me a few pointers regarding this please code below. As you can see I am using Gif format <h3>Procedures and Information</h3> <table width="98%" align="center"> <tr style="background-color: #333; color: #FFF;"> <td>Charts for <?php echo $schedule->depicao?></td> <td>Charts for <?php echo $schedule->arricao?></td> </tr> <tr align="center"> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.aerlingus-virtual.net/images/charts/<?php echo $schedule->depicao?>.gif" width="387px" height="594px" alt="No chart available" /></a><br> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->vacc; ?>" target="_blank">Local VACC</a> </td> <td width="50%" valign="top"> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank"> <img border="0" src="http://www.aerlingus-virtual.net/images/charts/<?php echo $schedule->arricao?>.gif" width="387px" height="594px" alt="No chart available" /></a><br> <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->vacc; ?>" target="_blank">Local VACC</a> </td> </tr> </table> Quote
Thomas Rozanov Posted March 2, 2011 Report Posted March 2, 2011 I want to be able to have my airport diagram image in 2 formats. So KJFK.gif and EDDF.png would work? How do I do that? In other words how do you make it possible for 2 file extensions (.gif and .png) Thanks! Quote
Thomas Rozanov Posted March 3, 2011 Report Posted March 3, 2011 I want to be able to have my airport diagram image in 2 formats. So KJFK.gif and EDDF.png would work? How do I do that? In other words how do you make it possible for 2 file extensions (.gif and .png) Thanks! Please help. I admit I am a noob and this is probably as easy as 123. But i JUST don't know how... Quote
Alex Posted March 4, 2011 Report Posted March 4, 2011 why not just convert your images to one type? Quote
Guest lorathon Posted March 4, 2011 Report Posted March 4, 2011 I agree. But I suppose you could do it. You would have to write a check for one file and if absent open the other file type. Something like the following would check both (UN-TESTED) public function displayChart($icao) { $chart = SITE_ROOT.'/images/charts/'.$icao.'.png'; if(!file_exists($chart)) { // PNG image Does NOT exist so look for GIF image $chart = SITE_ROOT.'/images/charts/'.$icao.'.gif'; if(!file_exists($chart)) { // GIF image does not exist either return false; } } // Return image path return $chart; } Quote
Thomas Rozanov Posted March 11, 2011 Report Posted March 11, 2011 (edited) I agree. But I suppose you could do it. You would have to write a check for one file and if absent open the other file type. Something like the following would check both (UN-TESTED) public function displayChart($icao) { $chart = SITE_ROOT.'/images/charts/'.$icao.'.png'; if(!file_exists($chart)) { // PNG image Does NOT exist so look for GIF image $chart = SITE_ROOT.'/images/charts/'.$icao.'.gif'; if(!file_exists($chart)) { // GIF image does not exist either return false; } } // Return image path return $chart; } Thank You So Much! Where do I put the code though? Thanks! I mean i know its in schedule_brief.tpl but where exactly do i put it. In img url??? Edited March 12, 2011 by Thomas Rozanov Quote
shaun105 Posted September 6, 2011 Report Posted September 6, 2011 Hi All, Im still having problems with this snippet. All charts for the Irish airports show up at Vatsim. Any others such as LOWI don't. Is there something I need to do to dirct to an alternative chart sourse. Thanks in advance. Quote
jonesrobin Posted September 6, 2018 Report Posted September 6, 2018 (edited) hp assistant Edited September 6, 2018 by jonesrobin Quote
jonesrobin Posted September 6, 2018 Report Posted September 6, 2018 It is such a common fact that most of the Printer users get trouble in such database issues. The printer can't able to recognize the custom chart properly. They can get the actual solution from hp printer assistant that will be helpful to solve their issues. 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.