Jump to content

Recommended Posts

Posted

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 :)

  • Moderators
Posted

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');?>

Posted

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 :P

Thanks,

James

  • 1 month later...
  • 3 weeks later...

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