Hi Nabeel,
Just wondering if it is possible to show the live status map, and data available to code into the frontpage_main?
Would be nice for our pilots to be able to see themselves on the front page of the site.
All the best.
Hi Nabeel,
Just wondering if it is possible to show the live status map, and data available to code into the frontpage_main?
Would be nice for our pilots to be able to see themselves on the front page of the site.
All the best.
Bump ;D
All you should have to do is put this code on the main header.tpl file…somewhere on it at least.
<script type="text/javascript">
var map_center_lat = "<?php echo Config::Get('MAP_CENTER_LAT'); ?>";
var map_center_lng = "<?php echo Config::Get('MAP_CENTER_LNG'); ?>";
var map_type = <?php echo Config::Get('MAP_TYPE'); ?>;
</script>
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/js/acarsmap.js"></script>
<div class="mapcenter" align="center">
<div id="acarsmap" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div>
<p style="width:<?php echo Config::Get('MAP_WIDTH');?>;font-size: 10px; text-align: center;">The map and table automatically update. <span style="color:red;">Red</span> indicates pilot is on the ground. <span style="color:green;">Green</span> indicates in air. Click pilot name to view.</p>
</div>
<table border = "0" width="100%">
<thead>
<tr>
<td><b>Pilot</b></td><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Status</b></td><td><b>Altitude</b></td><td><b>Speed</b></td><td><b>Distance/Time Remain</b></td>
</tr>
</thead>
<tbody id="pilotlist" ></tbody>
</table>
Try that and see if it works, you could prolly adjust somethings by doing some copy and paste to redefine the code and such. It would be worth a shot.
Or you can just call:
<?php
Template::Show('acarsmap.tpl');
?>
Inside the template you want it to show up in
Many thanks, chaps.
Exactly what i was after.