Jump to content

Make Flight Board from Acars map


in2tech

Recommended Posts

I am trying to make a flight board from my customized acars map to put on my front page. I just want to remove the map and retain the rest of the info, but I can not get it to work. Which code of the map do I remove to keep the info still working without the map on the basically default acars_map.tpl code? I want it to still refresh automatically and have the pilot link working. basically all the text info right below the map is what I want, and to continue to work.

Version 1

http://screencast.com/t/qamVgAG5L

But I can't get the time/distance to work, the pilot link, the auto refresh, and my progress bar that all works on the Acars map, but when I try and copy it over and just remove the map, I fail!

Thanks

Link to comment
Share on other sites

  • Moderators

Upload the attached file and call it like this:

//Javascript
<script type="text/javascript">
function liveflight(){
$("#lf").load(location.href + " #lf>*", "");
}
setInterval(function(){liveflight()}, 10000);
</script>
//HTML
<div id="lf"><?php Template::show('flight.php');?></div>

The Javascript will refresh the board every 10 seconds. To change the interval simply change 10000 to your desired number. Remember the number is in milliseconds so 20000 would be 20 seconds.

flight.zip

flight.png

Link to comment
Share on other sites

Upload the attached file and call it like this:

//Javascript
<script type="text/javascript">
function liveflight(){
$("#lf").load(location.href + " #lf>*", "");
}
setInterval(function(){liveflight()}, 10000);
</script>
//HTML
<div id="lf"><?php Template::show('flight.php');?></div>

The Javascript will refresh the board every 10 seconds. To change the interval simply change 10000 to your desired number. Remember the number is in milliseconds so 20000 would be 20 seconds.

flight.zip

flight.png

Where do I add the code to call it to be able to refresh the flight board? And also how can I add the different airline code images to work depending on what schedule they are flying for different airlines?

Basically get this code to work where you have this:

Your code:

<td><img src="<?php echo fileurl('/lib/images/rov1.gif') ;?>"></td>

And I want this:

<td><img src="/lib/skins/uae/img/<%=flight.flightcode%>.png" alt="alt" /></td>

So the images will change depending on the airline/schedule code. It's work on my acars live flight map!

It's also not working with SmartCARS. Is there anyway I can send you my acars map file as it works just the way I want it too, just want it without the map?

Thanks,

Thanks Parko,

Link to comment
Share on other sites

  • Moderators

I have tried it before and I can do that for you but since it has restrictions on showing some data, I decided to write my own code for the live flight and that's what I'm providing you. If you want airline logo for each flight I can implement it into my code.

Also, the attached file needs to go to your skin folder. The Javascript and the <div> can be called almost anywhere in your website as long as they're in the same page.

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...