Jump to content
flyalaska

Help with Airline Image On Map(SOLVED)

Recommended Posts

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

Share this post


Link to post
Share on other sites

Can you provide us with the actual link of the image ?

http://www.flyaka.com/images/airline/AKA.png

AKA.png

and

http://www.flyaka.com/images/airline/AAC.png

AAC.png

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

acars_table.png

Share this post


Link to post
Share on other sites

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?!

Share this post


Link to post
Share on other sites

Eddie try this:

<img src="<?php echo SITE_URL; ?>/images/airline/<%=flight.code%>.png"><br />

That worked, thank you!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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>'; 

Share this post


Link to post
Share on other sites

Here is mine

<img src="<?php echo SITE_URL; ?>/lib/images/airline_logos/<%=flight.flightcode%>.bmp">

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×