Can we Add Image/gif in live maps

Dear All just have little question if any body can solve it or can do it for me is there any option that we can add small status images Like Boarding,Crusing,Taxing, in Live Map or any other solution for it will be appreciative i have seen many but dont know how to add gif or flash animation images or like green.red light like on airports showing flight status.

example

Like this

i hope some one can help me out of this please please reply.

Irfan

Sure, you have to modify the acarsmap.tpl template

Nabeel Thats What I am asking that How i can do it how it is possible to modify acars.tp file where do i have to make changes to bring images on Live Map table please tell me where do i have to make changes here is the acar.tpl file code

It’d be this line:

<td><%=flight.phasedetail%></td>

You have to do:

<td><% if(flight.phasedetail == 'Boarding') { %> <img src="boarding.gif" /> <% } %>

For all the phasedetail values add those in

So it would be something like this???(I really have no idea):

<td><% if(flight.phasedetail == ‘Boarding’) { %> <img src=“Boarding.gif” /> <% } %>

elseif(flight.phasedetail == ‘Climbing’) { %> <img src=“Climbing.gif” /> <% } %>

elseif(flight.phasedetail == ‘Descending’) { %> <img src=“Descending.gif” /> <% } %>

</td>

the “<% } %>” confuses me. Also, when you just list the “Boarding.gif” reference…is the general/default pics referred to in “lib/images/” or “skins/MYSKIN/images” as a general setting? Thanks for tolerating me.

No elseif, just if’s (it’s how that parser works, odd I know).

The <% } %> is to close the opening bracket ({} that you see on that line there.

And the full URL to that image, wherever you’ve placed it. Boarding.gif was just an example

Ok, are you saying it should be something like this??

<td><% if(flight.phasedetail == ‘Boarding’) { %> <img src=“/lib/skins/cpc/images/Boarding.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Climbing’) { %> <img src=“/lib/skins/cpc/images/Taxiing.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Climbing’) { %> <img src=“/lib/skins/cpc/images/Climbing.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Cruise’) { %> <img src=“/lib/skins/cpc/images/Cruise.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Enroute’) { %> <img src=“/lib/skins/cpc/images/Enroute.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Descending’) { %> <img src=“/lib/skins/cpc/images/Descending.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Landing Shortly’) { %> <img src=“/lib/skins/cpc/images/Landing_shortly.gif” /> <% } %>

<td><% if(flight.phasedetail == ‘Arrived’) { %> <img src=“/lib/skins/cpc/images/Arrived.gif” /> <% } %>

</td>

I am obviously NOT understanding this correctly. I have the appropriate pics in the correct directory, but I think I am missing the code comprehension.

Nabeel if you dont mind please explain in detail in which file i have to do settings and where i have to add this code in which line of the file thanks in advance

nabeel i tried also but failed its nothing showing our there

after this code <td><%=flight.phasedetail%></td>

we have to add in next line this code or in the same line <td><% if(flight.phasedetail== ‘Boarding’){%><img src=“/lib/skins/ObsessBlue/image/boarding.gif” /><%}%></td>

if you can edit your self full code in acars.tpl file and paste it here it will be much appreciative.

Thanks Irfan

nabeel i tried also but failed its nothing showing our there

after this code <td><%=flight.phasedetail%></td>

we have to add in next line this code or in the same line <td><% if(flight.phasedetail== ‘Boarding’){%><img src=“/lib/skins/ObsessBlue/image/boarding.gif” /><%}%></td>

if you can edit your self full code in acars.tpl file and paste it here it will be much appreciative.

Thanks Irfan

I have had issues with this in the past depending on the server. try this

<td><% if(flight.phasedetail== 'Boarding'){%><img src="<?php echo SITE_URL; ?>/lib/skins/ObsessBlue/image/boarding.gif" /><%}%></td>

Yeah, try the full URL like simpilot said, it should be something like that. If that doesn’t work, I’ll try to check it if I have a chance today

Thanks SimPilot for the reply

well guys i tried to put the code which simpilot suggested it was showing my gif file there but the problem is it was only showing when i am putting Takeoff in first line other values it is not showing any thing here is my full acars.tpl code which i modified have look so you guys check where i was wrong and also please tell me the exact phase values of FSACARS like Borading,Taxing,Takeoff,Climbing,Crusing,Decending,Landed is these are the values i have to put or it should be exact values which is given in default file of FSACARS please also tell me the exact values which i have to put if any one of you can paste full code here as exactly as we have to put so it will be more appreciative here is my modified code.

Waiting to hear from you Guys with full resolution.

Irfan

i Hope Nabeel or some one else come up with solution?

irfan

can any one please please please please please please please please HELP ???

i need the code please explain with the code.

thanks in advance

Nabeel waiting for your reply yet?

I’m not sure, you just have to mess with the code to get it to work.

ok Nabell i will try to solve it but only last thing please tell me i have to put all the phase details in one line or one by one in next lines examples

<td><% if(flight.phasedetail== 'Boarding'){%><img src="<?php echo SITE_URL; ?>/lib/skins/ObsessBlue/image/boarding.gif" /><%}%></td><td><% if(flight.phasedetail == 'Takeoff') { %> <img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/boarding.gif" /> <% } %></td><td><% if(flight.phasedetail == 'Climbing') { %> <img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/boarding.gif" /> <% } %></td>

OR

<script type="text/html" id="acars_map_row">
<tr class="<%=flight.class%>">
<td><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotid%> - <%=flight.pilotname%></a></td>
<td><%=flight.flightnum%></td>
<td><%=flight.depicao%></td>
<td><%=flight.arricao%></td>
<td><% if(flight.phasedetail == 'Takeoff') { %> <img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/boarding.gif" /> <% } %></td>
<td><% if(flight.phasedetail == 'Climbing') { %> <img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/boarding.gif" /> <% } %></td>
<td><% if(flight.phasedetail == 'Crusing') { %> <img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/boarding.gif" /> <% } %></td>
<td><%=flight.alt%></td>
<td><%=flight.gs%></td>
<td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%></td>
</tr>
</script>

thanks

They will be in the same <td></td> block, you don’t need to make a separate one for each. Look at CPC900’s post above

Why not get rid of all that and just do

<td><img src="<?php echo SITE_URL; ?>/lib/skins/ObsessBlue/image/<%=flight.phasedetail%>.gif" /></td>

for that data block, then name your images to match the flight phases

i.e.

Climbing.gif

Cruise.gif

Arrived.gif

etc…

1 Like

That’s a good idea!