James142 Posted April 3, 2011 Author Report Share Posted April 3, 2011 Ok let me have a play for 5 minutes and ill post the code, Where is it your putting or wanting to show the total distance, is it the acars.tpl Yup in the acars.tpl file. I do appreciate this Quote Link to comment Share on other sites More sharing options...
James142 Posted April 6, 2011 Author Report Share Posted April 6, 2011 Ok let me have a play for 5 minutes and ill post the code, Where is it your putting or wanting to show the total distance, is it the acars.tpl Any luck? Quote Link to comment Share on other sites More sharing options...
James142 Posted April 8, 2011 Author Report Share Posted April 8, 2011 Anyone? Quote Link to comment Share on other sites More sharing options...
James142 Posted April 16, 2011 Author Report Share Posted April 16, 2011 Nothing? Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 16, 2011 Moderators Report Share Posted April 16, 2011 sorry forgot all about this, you should be able to use this function Not tested though. using the existing api this should give you the total miles <?php echo $route->distance . Config::Get('UNITS');?> Quote Link to comment Share on other sites More sharing options...
James142 Posted April 16, 2011 Author Report Share Posted April 16, 2011 sorry forgot all about this, you should be able to use this function Not tested though. using the existing api this should give you the total miles <?php echo $route->distance . Config::Get('UNITS');?> When I add the code nothing shows up... Im guessing I need to add something into the ACARSDate.class.php file? Maybe something like: public static function getSchedulesByDistance($distance, $type, $onlyenabled=true, $start='', $limit='') { if($type == '') $type = '>'; $params = array('s.distance' => trim($type).' '.$distance); if($onlyenabled) $params['s.enabled'] = '1'; return self::findSchedules($params, $limit, $start); } But when I add that it gives me an error on the site and kACARS gives me about 10 error messages saying it lost connection to the site.. ..so im not gonna mess around with it myself unless no one is flying Thanks, James Quote Link to comment Share on other sites More sharing options...
James142 Posted May 22, 2011 Author Report Share Posted May 22, 2011 ... Quote Link to comment Share on other sites More sharing options...
James142 Posted June 13, 2011 Author Report Share Posted June 13, 2011 Bump 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.