simonecatalano Posted January 29, 2014 Report Posted January 29, 2014 Hello guys it's possible in the status of page PILOT'S IN FLIGHT insert IMAGE on the status example: When pilot is in crusing show image for cruising (at my choice).... Very Thanks Best Regards :rolleyes: Quote
Strider Posted January 30, 2014 Report Posted January 30, 2014 yes, you just need to create the image name it cruising or whatever, and use the code: <img src="<?php echo SITE_URL?>/lib/images/<%=flight.phasedetail%>.png" alt="<%=flight.phasedetail%>"/> You can change it from a png to a gif or jpg if you so wish. Place that code in your acarsmap.tpl file and save it in your skin folder. 1 Quote
simonecatalano Posted January 30, 2014 Author Report Posted January 30, 2014 I have insert here (acarsmap.tpl) but don't work <script type="text/html" id="acars_map_row"> <tr class="<%=flight.class%>"> <td bgcolor="#FFFFFF"><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotid%> - <%=flight.pilotname%></a></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.flightnum%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.aircraftname%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.depicao%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.arricao%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.alt%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.gs%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%></font></td> <td bgcolor="#FFFFFF"><font color="#000000"><%=flight.phasedetail%></font></td> <td img src="<?php echo SITE_URL?>/lib/images/<%=flight.phasedetail%>.png" alt="<%=flight.phasedetail%>"</td> </tr> </script> Quote
Strider Posted January 31, 2014 Report Posted January 31, 2014 did you create the images? If the images are not created with the same name as the phasedetails then it wont work. Quote
simonecatalano Posted January 31, 2014 Author Report Posted January 31, 2014 (edited) I have insert this <td align="center" bgcolor="#FFFFFF"><img src="<?php echo SITE_URL?>/lib/images/<%=flight.phasedetail%>.gif" alt="<%=flight.phasedetail%>"/> </td> but when I go to the live map i view this http://prntscr.com/2o76rl Edited January 31, 2014 by simonecatalano Quote
Strider Posted January 31, 2014 Report Posted January 31, 2014 that still does not answer my question, have you created the images? They have to be named exactly the same as the phasedetail, if not it wont work, regardless of the image type. Quote
simonecatalano Posted January 31, 2014 Author Report Posted January 31, 2014 I have insert this <td align="center" bgcolor="#FFFFFF"><img src="<?php echo SITE_URL?>/lib/images/<%=flight.phasedetail%>.gif" alt="<%=flight.phasedetail%>"/> </td> but when I go to the live map i view this http://prntscr.com/2o76rl Quote
Strider Posted January 31, 2014 Report Posted January 31, 2014 If you do not create the images, that code will not work. Quote
alblua Posted February 1, 2014 Report Posted February 1, 2014 I have insert this <td align="center" bgcolor="#FFFFFF"><img src="<?php echo SITE_URL?>/lib/images/<%=flight.phasedetail%>.gif" alt="<%=flight.phasedetail%>"/> </td> but when I go to the live map i view this http://prntscr.com/2o76rl Possibly your link is wrong? Maybe when entering the image link, type the actual whole URL. Also ensure it actually IS there Quote
Strider Posted February 2, 2014 Report Posted February 2, 2014 The link will work. Even if you right the full url, and dont create the image, or an image with the same name as what comes out as the phasedetail, it wont work. What is so hard about that? It is very simple. Quote
Strider Posted February 2, 2014 Report Posted February 2, 2014 I still have not been answered, have you created the images? Quote
simonecatalano Posted February 2, 2014 Author Report Posted February 2, 2014 I Have [RESOLVED] COPY AND PASTE THIS CODE IN YOUR ACARSMAP.TPL <table> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $flight) { if($flight->client == 'FSACARS') {$plane = OperationsData::getAircraftInfo($flight->aircraft);} else {$plane = OperationsData::getAircraftByReg($flight->aircraft);} ?> <tr> <td align="center"> <?php if($flight->phasedetail == "Boarding") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Taxiing to Runway") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taking Off") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Climbing") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Cruise") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } elseif($flight->phasedetail == "Descending") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Level Flight") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taxiing to Gate") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/images/Boarding1.gif'>"; } else { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } ?> </td> <td align="center"><?php echo $flight->flightnum;?></td> <td align="center"><?php echo $flight->depname;?></td> <td align="center"><?php echo $flight->arrname;?></td> <td align="center"><?php echo $flight->pilotname;?></td> <td align="center"><?php echo $plane->fullname;?></td> <td align="center"><?php echo $flight->phasedetail; ?></td> </tr> <?php } } else { ?> <tr><td width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ff961e;">No Flights in Progress!</td></tr> <?php } ?> </table> Quote
Moderators joeri Posted February 2, 2014 Moderators Report Posted February 2, 2014 so you are going to just steal the images form a different server? Quote
Strider Posted February 2, 2014 Report Posted February 2, 2014 If you actually created the images they would have worked, you also cant steal other images from other sites. Just makes you look bad. Quote
Strider Posted February 2, 2014 Report Posted February 2, 2014 http://malaysiava.org/index.php/acars I used my code to show the images. So don't tell me it does not work, when you clearly did not even attempt to create the images. 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.