flyalaska Posted April 21, 2014 Report Share Posted April 21, 2014 I have tried about everything to show the image of the airline on the live map. I am able to show the image on the Departures and arrivals, just not the live map. The currant code <img src="<?php echo fileurl('/images/airline/'.$code.'png'); ?>" alt="<?php echo $airline->name;?>" /> This is what it is putting out http://www.flyaka.com/images/airline/png I Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted April 21, 2014 Members Report Share Posted April 21, 2014 Can you provide us with the actual link of the image ? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 21, 2014 Author Report Share Posted April 21, 2014 Can you provide us with the actual link of the image ? http://www.flyaka.com/images/airline/AKA.png and http://www.flyaka.com/images/airline/AAC.png Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted April 22, 2014 Members Report Share Posted April 22, 2014 The first thing that comes in my mind is that the $code variable doesnt bring a value how do you get the result ? if you do an echo $code what will come up ? Quote Link to comment Share on other sites More sharing options...
Jon Posted April 22, 2014 Report Share Posted April 22, 2014 You seem to be missing a dot before the extension: <img src="<?php echo fileurl('/images/airline/'.$code.'.png'); ?>" alt="<?php echo $airline->name;?>" /> With regards to the value of $code, print it out and see what happens Jon Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 22, 2014 Author Report Share Posted April 22, 2014 You seem to be missing a dot before the extension: <img src="<?php echo fileurl('/images/airline/'.$code.'.png'); ?>" alt="<?php echo $airline->name;?>" /> With regards to the value of $code, print it out and see what happens Jon Still no go http://www.flyaka.com/images/airline/.png @Vangelis what exactly do you mean? I really have no clue what I am doing here. Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted April 22, 2014 Members Report Share Posted April 22, 2014 You can try and write for example echo "This is the $code"; and if something comes up on your website then the $code is returning a variable But my question is how do you get the $code like with an sql query is it a result of a function or something else i think you still have me on skype if not you are free to add me and contact me best regards Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 22, 2014 Report Share Posted April 22, 2014 The Problem is mentioned here http://forum.phpvms.net/topic/19785-livemap-and-inair/page__st__20#entry111854 code in Variable in livemap gives you for example VLI454 not the VLI alone so you have to work with substring but more in the linked post above Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 23, 2014 Author Report Share Posted April 23, 2014 The Problem is mentioned here http://forum.phpvms...._20#entry111854 code in Variable in livemap gives you for example VLI454 not the VLI alone so you have to work with substring but more in the linked post above That is inair image. I am not having that problem. I am trying to display the Airline logo in the table. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 23, 2014 Report Share Posted April 23, 2014 Will try if I can make it work on my site tomorow Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 23, 2014 Author Report Share Posted April 23, 2014 Will try if I can make it work on my site tomorow Ty Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 23, 2014 Report Share Posted April 23, 2014 Try to trim what you use in table for the flight number output to the first three characters It may work the same way I did for the INAIR Images?! Quote Link to comment Share on other sites More sharing options...
FSX30HD Posted April 23, 2014 Report Share Posted April 23, 2014 Eddie try this: <img src="<?php echo SITE_URL; ?>/images/airline/<%=flight.code%>.png"><br /> Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 26, 2014 Author Report Share Posted April 26, 2014 Eddie try this: <img src="<?php echo SITE_URL; ?>/images/airline/<%=flight.code%>.png"><br /> That worked, thank you! Quote Link to comment Share on other sites More sharing options...
FSX30HD Posted April 27, 2014 Report Share Posted April 27, 2014 That worked, thank you! I have seen Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted May 3, 2014 Report Share Posted May 3, 2014 I am using this <img src="<?php echo SITE_URL; ?>/images/airline/<%=flight.flightnum.substring(0,3)%>.png" > which shows the airline logo corresponding to the flight Quote Link to comment Share on other sites More sharing options...
Jakubovsky Posted May 11, 2014 Report Share Posted May 11, 2014 How can put airline logo on frontpage - Latest Arrival? Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted May 11, 2014 Members Report Share Posted May 11, 2014 I know it is already solved i just write the answer for the rest if they have the same question you should put <img src="<?php echo SITE_URL; ?>/images/airline/<?php echo $pirep->code; ?>.png"><br /> as <%=flight.code%> is a java script variable and we need a php variable to get the pilot's airline code 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted May 16, 2014 Author Report Share Posted May 16, 2014 How can put airline logo on frontpage - Latest Arrival? echo '<td align=center><img src="'.fileurl('/images/airline/'.$pirep->code.'.png').'" alt="'.$airline->name.'" /></td>'; Quote Link to comment Share on other sites More sharing options...
hurkulez Posted October 5, 2018 Report Share Posted October 5, 2018 Here is mine <img src="<?php echo SITE_URL; ?>/lib/images/airline_logos/<%=flight.flightcode%>.bmp"> Quote Link to comment Share on other sites More sharing options...
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.