mynameiskhan Posted May 22, 2010 Report Share Posted May 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 22, 2010 Administrators Report Share Posted May 22, 2010 Sure, you have to modify the acarsmap.tpl template Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 22, 2010 Author Report Share Posted May 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 22, 2010 Administrators Report Share Posted May 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
CPC900 Posted May 22, 2010 Report Share Posted May 22, 2010 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. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 22, 2010 Administrators Report Share Posted May 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
CPC900 Posted May 22, 2010 Report Share Posted May 22, 2010 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. Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 23, 2010 Author Report Share Posted May 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 23, 2010 Author Report Share Posted May 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 23, 2010 Administrators Report Share Posted May 23, 2010 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> Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 23, 2010 Administrators Report Share Posted May 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 23, 2010 Author Report Share Posted May 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 23, 2010 Author Report Share Posted May 23, 2010 i Hope Nabeel or some one else come up with solution? irfan Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 24, 2010 Author Report Share Posted May 24, 2010 can any one please please please please please please please please HELP ?????????????? i need the code please explain with the code. thanks in advance Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 25, 2010 Author Report Share Posted May 25, 2010 Nabeel waiting for your reply yet? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 25, 2010 Administrators Report Share Posted May 25, 2010 I'm not sure, you just have to mess with the code to get it to work. Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 26, 2010 Author Report Share Posted May 26, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 26, 2010 Administrators Report Share Posted May 26, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 26, 2010 Administrators Report Share Posted May 26, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 26, 2010 Administrators Report Share Posted May 26, 2010 That's a good idea! Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 26, 2010 Author Report Share Posted May 26, 2010 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. Quote Link to comment Share on other sites More sharing options...
mynameiskhan Posted May 26, 2010 Author Report Share Posted May 26, 2010 code worked for me guys many many thanks from my side. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.