Jump to content

Showing Airline Logos on Live Map [SOLVED]


Imanol

Recommended Posts

Hello everyone,

I want to show the operator logo on my VA live map but I have this problem: I used the code

<img src="<?php echo SITE_URL; ?>/lib/skins/vairline/img/logos/small/<%=flight.code%>.png">

but it takes the pilot code, not the airline code, so it shows a wrong image. Is there anyway to fix it?

Link to comment
Share on other sites

  • Administrators

Best way to do it is probably to add it to the initial call for data. In /core/modules/ACARS/ACARS.php find

$this->acarsflights[] = $c;

and add

$c['flightcode'] = substr($c['flightnum'], 0, 3);

on the line above it.

Now in your acars map template you should have the js variable

<%=flight.flightcode%>

available that holds only the ABC of the flight number.

NOTE: this is a core file hack so in an update it will be overwritten. Best thing would be to create a new module that holds this code to protect it in an update.

  • Like 1
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...