Jump to content

FuelCalculation Module


Parkho

Recommended Posts

  • Moderators

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

Link to comment
Share on other sites

  • 2 weeks later...
  • Moderators

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.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • Moderators

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

Link to comment
Share on other sites

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