Jump to content

Can we Add Image/gif in live maps


mynameiskhan

Recommended Posts

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

39961845.jpg

Like this

ggggsk.jpg

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

Irfan

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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

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