Jump to content

Image inside ACARS bubble


HighFlyerPL185

Recommended Posts

I'd like to place an image above the data in the ACARS bubble, however I'd like it to detect and choose an image for the airline the flight is operated for. However, I'd only like to keep one airline in the system.

I imagined it like, if the flight number is FE3XXX, the ACARS bubble would display one image, but if it's any other, for e.g. FEXXXX, it would display image of another airline.

Link to comment
Share on other sites

  • Administrators

Just as an example, if you name the images the same as the first three digits of the schedule you can then reduce the flight number to those three digits and call the image using that.

Maybe if you had a flight number of ABC1234 and had an image named ABC.jpg to use for all ABC flights something like this should work;

<img src="your path to your image<?php substr($fligthnumberstring, 0, 3); ?>.jpg" alt="My Airline Image" />

Link to comment
Share on other sites

Surely it needs some kind of an if/else statement though to display the image if this particular flight is that flight number, but how can I pick it up from the ACARS Map?

Would something like this with the variable provided work or is it completely useless?

if ( <%=flight.flightnum%> => FE0000 )
{
   Image.
}
elseif ( <%=flight.flightnum%> => FE3000 )
{
   Image
}
elseif ( <%=flight.flightnum%> => FE4000 )
{
  Image
}

if { <%=flight.flightnum%>

Link to comment
Share on other sites

  • Administrators

You will not need an if selector unless you are going to have an image for all flights and only a few odd numbered flights have something different. The example I set was to use the icao code basically to id what image you want displayed with the flight as that was what I thought you wanted. If you have an individual image for every flight this will also work as you will just have to name every image the same as the flight number, ie - you would have an image ABC1111.png for flight ABC1111 and an image named ABC2222.png for flight ABC2222, and so on.

If you only have a couple of flights you want an alternate iimage for then yes, you can build an if selector.

if($fligthnumberstring == 'ABC1111') {
$image = 'ABC1111'; }
elseif($fligthnumberstring == 'ABC2222') {
$image = 'ABC2222'; }[/color]
else {
$image = 'mydefaultimge'; }

Then

<img src="your path to your image<?php echo $image; ?>.jpg" alt="My Airline Image" />
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...