Jump to content

Recommended Posts

  • Moderators
Posted

This id a little module you could use to calculate fuel for your trip base on distance you're flying. Try it out and let me know if there is any problems.

Install:

1- Download the zip file

2- Unzip and place the files in the order. (You need to make the folders in the specified roots exactly the same name or it won't work)

3- Create link to the module like this <!--?php echo url('FuelCalculator) ;?-->

4- Enjoy

Pix:

fuel00.PNG

fuel01.PNG

fuel02.PNG

Download at Github: Github.com/parkho

>>>>>>>>>>MODIFIED<<<<<<<<<<<<<

Posted

Very nice. What did you base your calculations off?

<div><br></div><div>By the way, you have your images linking to your site. Do you really want everyone hotlinking? I'd suggest repacking it with the images available for individuals to self-host!</div>

  • Moderators
Posted

Very nice. What did you base your calculations off?

FSPassengers data, and distance.And it's pretty accurate as I flew based on it

  • 2 weeks later...
  • Moderators
Posted

Great add on, im getting a problem with the time function, if i comment the time calculations out then i get a good output but uncommented i get an error where the page stops, nothing in the logs either.

Any ideas?

  • Moderators
Posted

Great add on, im getting a problem with the time function, if i comment the time calculations out then i get a good output but uncommented i get an error where the page stops, nothing in the logs either.

Any ideas?

Well! to be honest it's working just fine on my side. Look into result.tpl, the problem comes from there. Also, the timing is not a function it's just a simple division and the result goes into the util::formatduration() cammand.

  • Moderators
Posted

To all the people who are using this add-on

I added a print option to the bottom of the result.tpl. Now you can print the data if you want.

Posted

Where does it get the time division from?

Let me take another look and see if i can get to the bottom of it.

Hi Mark I have the same problem would you mind sharing which part you removed

Thanks.

Great add on Parko

Posted

Sorry should have put.

In the results.tpl get rid of the

Util::FormatDuration

Remove them from lines 60, 65, 70 and 75.

That works now for me.

Sorry Mark I dont have

Util::FormatDuration

on those lines. Is it definately the result.tpl

  • 4 weeks later...
Posted

Hello,

also works fine for me verry nice app!

but i dont see any aircraft typs in the pull down menu.. any id?

thanks

edit: never mind found the problem in FuelCalculatorData.class.php, the link was not correct for my sql database..

  • 2 weeks later...
  • Moderators
Posted

Parkho do you now why the module doesn't load the aircrafts anymore when it has been placed in the pilot brief.

It must be the foreach() tag. When you move it to somewhere else, it can't connect to read from DB. Open the fuelcalculator.tpl and go to line 23. Place the following in line 22 before the "<?php" tag:

$aircrafts = FuelCalculatorData::findaircraft();

Let me know if it's fixed. ;)

Posted

I changed it to this:

<option value="">-Select Aircraft-</option>
 $aircrafts = FuelCalculatorData::findaircraft();<?php
	foreach ($aircrafts as $aircraft)
	 {
	  echo '<option value="'.$aircraft->name.'">'.$aircraft->name.'</option>';
	 }
?>

It didn't change anything :(..

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