Jump to content

Recommended Posts

Posted

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

Posted

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

  • Administrators
Posted

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

Posted

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:

  • Administrators
Posted

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

Posted

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

Posted

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

  • Administrators
Posted

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>

  • Administrators
Posted

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

Posted

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

Posted

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

  • Administrators
Posted

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
Posted

thank you so much guys i will try it and come back with the result.

just wanted to be sure can you tell me nabeel what are the exact phases of FSACARS or can you tell me from which file can i get phasedetails.

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