mclaren99uk Posted August 29, 2011 Report Share Posted August 29, 2011 Hi This there a variable to show the aircraft ICAO code and not the full aircraft name? Many Thanks Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 29, 2011 Report Share Posted August 29, 2011 You can try <%=flight.icao%> If that does not work you will need to change the ACARSData::GetACARSData() function. I have changed mine already so not sure what is in the standard query. Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted August 29, 2011 Author Report Share Posted August 29, 2011 Hi, where do i find that and how do i do it? i am not fimilar with this Quote Link to comment Share on other sites More sharing options...
Jeff Posted August 29, 2011 Report Share Posted August 29, 2011 The code goes in the acarsmap.tpl file public_html/core/templates/acarsmap.tpl It should look like this: <td><%=flight.icao%></td> Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted August 30, 2011 Author Report Share Posted August 30, 2011 ive added that in, and nothing has appeared. Ive created the coloum with the heading but the data field is blank. This is with the standard install with no modifications Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 Then you would need to change the function that I showed you above. If you post the function here I can modify it for you. Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted August 30, 2011 Author Report Share Posted August 30, 2011 Thanks, where do i find it? what file? Quote Link to comment Share on other sites More sharing options...
Jeff Posted August 30, 2011 Report Share Posted August 30, 2011 You could also try this: <td><%=flight.aircrafticao%></td> Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 core/common/ACARSData.class.php Find and replace with this. Be advised that if you upgrade to a new version of phpVMS this will be overwritten. The following shuld allow you to use the <%flight.icao%> (NOT TESTED) public static function GetACARSData($cutofftime = '') { //cutoff time in days if (empty($cutofftime)) { // Go from minutes to hours $cutofftime = Config::Get('ACARS_LIVE_TIME'); //$cutofftime = $cutofftime / 60; } $sql = 'SELECT a.*, c.name as aircraftname, c.*, p.code, p.pilotid as pilotid, p.firstname, p.lastname, dep.name as depname, dep.lat AS deplat, dep.lng AS deplng, arr.name as arrname, arr.lat AS arrlat, arr.lng AS arrlng FROM ' . TABLE_PREFIX . 'acarsdata a LEFT JOIN ' . TABLE_PREFIX . 'aircraft c ON a.`aircraft`= c.`registration` LEFT JOIN ' . TABLE_PREFIX . 'pilots p ON a.`pilotid`= p.`pilotid` LEFT JOIN ' . TABLE_PREFIX . 'airports AS dep ON dep.icao = a.depicao LEFT JOIN ' . TABLE_PREFIX . 'airports AS arr ON arr.icao = a.arricao '; if ($cutofftime !== 0) { $sql .= 'WHERE DATE_SUB(NOW(), INTERVAL ' . $cutofftime . ' MINUTE) <= a.`lastupdate`'; } return DB::get_results($sql); DB::debug(); } Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted August 30, 2011 Author Report Share Posted August 30, 2011 Hi Sorry for the delay, as was late here and needed some sleep. Below is the section you have asked for public static function GetACARSData($cutofftime = '') { //cutoff time in days if(empty($cutofftime)) { // Go from minutes to hours $cutofftime = Config::Get('ACARS_LIVE_TIME'); //$cutofftime = $cutofftime / 60; } $sql = 'SELECT a.*, c.name as aircraftname, p.code, p.pilotid as pilotid, p.firstname, p.lastname, dep.name as depname, dep.lat AS deplat, dep.lng AS deplng, arr.name as arrname, arr.lat AS arrlat, arr.lng AS arrlng FROM ' . TABLE_PREFIX .'acarsdata a LEFT JOIN '.TABLE_PREFIX.'aircraft c ON a.`aircraft`= c.`registration` LEFT JOIN '.TABLE_PREFIX.'pilots p ON a.`pilotid`= p.`pilotid` LEFT JOIN '.TABLE_PREFIX.'airports AS dep ON dep.icao = a.depicao LEFT JOIN '.TABLE_PREFIX.'airports AS arr ON arr.icao = a.arricao '; if($cutofftime !== 0) { $sql .= 'WHERE DATE_SUB(NOW(), INTERVAL '.$cutofftime.' MINUTE) <= a.`lastupdate`'; } return DB::get_results($sql); DB::debug(); } Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 I already posted the replacement code Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted August 30, 2011 Author Report Share Posted August 30, 2011 Hi but there is no code change, or am i missing something. They are the same? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 30, 2011 Report Share Posted August 30, 2011 There is a change. The original only pulls the name from the aircraft table c.name as aircraftname, The modified pulls the name and then everything else c.name as aircraftname, c.*, Quote Link to comment Share on other sites More sharing options...
mclaren99uk Posted September 5, 2011 Author Report Share Posted September 5, 2011 Thanks for the help all running ok now Sorry for delay, have been away 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.