Moderators Parkho Posted January 13, 2012 Moderators Report Posted January 13, 2012 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: Download at Github: Github.com/parkho >>>>>>>>>>MODIFIED<<<<<<<<<<<<< Quote
tutmeister Posted January 13, 2012 Report Posted January 13, 2012 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> Quote
Moderators Parkho Posted January 13, 2012 Author Moderators Report Posted January 13, 2012 Very nice. What did you base your calculations off? FSPassengers data, and distance.And it's pretty accurate as I flew based on it Quote
tutmeister Posted January 14, 2012 Report Posted January 14, 2012 Great, thanks. I like that it is easily extendable with our own fleet. Quote
Moderators mark1million Posted January 22, 2012 Moderators Report Posted January 22, 2012 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? Quote
Moderators Parkho Posted January 22, 2012 Author Moderators Report Posted January 22, 2012 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. Quote
Moderators mark1million Posted January 22, 2012 Moderators Report Posted January 22, 2012 Where does it get the time division from? Let me take another look and see if i can get to the bottom of it. Quote
Moderators mark1million Posted January 22, 2012 Moderators Report Posted January 22, 2012 Ok i found the problem and removed some code, works well now Quote
Moderators Parkho Posted January 22, 2012 Author Moderators Report Posted January 22, 2012 Ok i found the problem and removed some code, works well now Great! I'm happy that it works for you. Quote
Moderators Parkho Posted January 22, 2012 Author Moderators Report Posted January 22, 2012 Very nice! Thx! You're welcome, Hope you enjoy it. Quote
Moderators Parkho Posted January 22, 2012 Author Moderators Report Posted January 22, 2012 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. Quote
Virtualei Posted January 22, 2012 Report Posted January 22, 2012 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 Quote
Moderators mark1million Posted January 22, 2012 Moderators Report Posted January 22, 2012 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. Quote
Virtualei Posted January 22, 2012 Report Posted January 22, 2012 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 Quote
Virtualei Posted January 22, 2012 Report Posted January 22, 2012 Hi Mark I found Util::FormatDuration on lines 224,228 and 239. I deleted them and it works fine now Thanks guys 1 Quote
Moderators mark1million Posted January 23, 2012 Moderators Report Posted January 23, 2012 Yeh sorry about that i stripped down those templates of all the other code and css Quote
Jacques Posted February 19, 2012 Report Posted February 19, 2012 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.. Quote
elferen1 Posted March 4, 2012 Report Posted March 4, 2012 can you post it to Github so we can download it again?! Quote
Moderators Parkho Posted March 4, 2012 Author Moderators Report Posted March 4, 2012 can you post it to Github so we can download it again?! FuelCalculator Here you can download it. Let me know if there's any problems. Quote
elferen1 Posted March 6, 2012 Report Posted March 6, 2012 I really like this module! Thanks Pakho! Quote
Moderators Parkho Posted March 6, 2012 Author Moderators Report Posted March 6, 2012 For people who're having problems downloading the module: Download here: Fuel Calculator Quote
Moderators Parkho Posted March 6, 2012 Author Moderators Report Posted March 6, 2012 I really like this module! Thanks Pakho! You're welcome. Quote
elferen1 Posted March 6, 2012 Report Posted March 6, 2012 I've linked the module now to my pilot brief, but now it doesn't show the aircraft anymore. While it still shows the aircraft when i navigate to 'index.php/FuelCalculator. Quote
RogerB Posted March 8, 2012 Report Posted March 8, 2012 I'd like to try this, can you reupload please? Quote
Moderators Parkho Posted March 8, 2012 Author Moderators Report Posted March 8, 2012 I'd like to try this, can you reupload please? Go back a few posts and download it from the post with red text color Quote
elferen1 Posted March 9, 2012 Report Posted March 9, 2012 Parkho do you now why the module doesn't load the aircrafts anymore when it has been placed in the pilot brief. Quote
Moderators Parkho Posted March 9, 2012 Author Moderators Report Posted March 9, 2012 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. Quote
elferen1 Posted March 9, 2012 Report Posted March 9, 2012 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 .. Quote
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.