Guest CableGuy Posted September 25, 2009 Report Share Posted September 25, 2009 Just wanted to let everyone know, IF your va has NO Flight hours logged or no routes or anything and its basically a clean install, You will get mysql_fetch errors, Once you add airports and do a flight and all, They will all be gone and display the data grabbed from the database. Quote Link to comment Share on other sites More sharing options...
Guest CableGuy Posted September 25, 2009 Report Share Posted September 25, 2009 mmmm, it does not work for me... :- i get <?php StatsData::AircraftUsage(5); ?> and it does not work... did i made anything wrong? Add an aircraft from your admin panel and it shall work Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 25, 2009 Administrators Report Share Posted September 25, 2009 Rolled a preliminary copy into today's beta commit. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 17, 2009 Report Share Posted October 17, 2009 Ok, I know I am getting ready to open myself up to ridicule here, but can some one please tell me how to get this to appear on the website? Or can you point me in the direction of a tutorial or doc that explains how to add this type of stuff to the website? I added some stuff and it threw some numbers at me on the site when I viewed it but it looked nothing like what was given as an example in the first post for this thread. So far I have uploaded the file and ran the sql and edited a tpl file. I reverted back to the original tpl file when this went wrong for me. I am REALLY new to this system and still trying to figure it all out. I know once I get it right for the first time, I will never have to ask a stupid question like this ever again. So far I am loving this system to death but am frustrated all at the same time. ;D Thanks for any help I can get. I would really appreciate it. Ray Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 17, 2009 Administrators Report Share Posted October 17, 2009 Hey Ray, No problem. I just realized I don't have a doc on how to, so watch this space: http://docs.phpvms.net/development/using_the_api#using_the_api There's a video tutorial too on using the API (see link on top), watching that will help as well. Gimme about an hour or so, and I'll have the above link filled out though Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 18, 2009 Report Share Posted October 18, 2009 Thanks Nabeel I really appreciate it a bunch. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 18, 2009 Administrators Report Share Posted October 18, 2009 Sorry I did not get to this tonight, few bugs came up. I will have it up for ya tomorrow, but hopefully you checked out the video tutorials Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 18, 2009 Report Share Posted October 18, 2009 It's all good man. No worries. Sh*t happens from time to time. ;-) Yeah I couldn't wathc them last night. Got 2 teeth pulled and pain pills kicked in. I am going to go and watch them now. I'll keep looking back from time to time on the docs as well. Thanks again. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 18, 2009 Administrators Report Share Posted October 18, 2009 Ouch man, good luck with that Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 22, 2009 Report Share Posted October 22, 2009 I for the life of me can not get my head around this module thing. I can get stuff to show up on site, that part I have figured out. If some one would let me nix their stats module that would be great. Then I can figure out how it all works. If not that's ok too. I will keep trying. Thanks, Ray Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 27, 2009 Administrators Report Share Posted October 27, 2009 Ray, most, if not all, of these functions are in the latest beta Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 27, 2009 Report Share Posted October 27, 2009 Yeah, I was guessing they were. I wasn't sure if we still had to create a module for this to work or what. The whole module thing has me running in circles I'm afraid. After loads of cussing and face turning red, I am finally getting results to show up on the page. Not pretty, but it's a start Quote Link to comment Share on other sites More sharing options...
James200410 Posted October 27, 2009 Report Share Posted October 27, 2009 Hi guys, Do I need to create a module or something for this to work ? Sorry, I'm still learning, I have watched the tutorial video's but I am still confused as to what to do exactly. If anyone could shed some light I would be most appreciated. Thanking you in advance Adam Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 27, 2009 Report Share Posted October 27, 2009 I got mine to work without creating a module. All the functions are now in phpVMS that are shown in the pic on the front page. Mine is basic basic now but works. What I did was placed the frontpage_main.tpl from core templates into my skin so it would not be written over in updates. I have added something liek this to make it work. <h3>VA Statistics</h3> <p>Total Pilots: <?php echo StatsData::PilotCount(); ?></p> <p>Total Flights: <?php echo StatsData::TotalFlights(); ?></p> <p>Total Flights Today: <?php VastatsData::totalflightstoday(); ?></p> <p>Total Flight Hours: <?php echo StatsData::TotalHours(); ?></p> <p>Total PAX Carried: <?php VastatsData::totalpaxcarried(); ?></p> <p>Total Fuel Burned: <?php VastatsData::totalfuelburned(); ?></p> <p>Total Miles Flown: <?php VastatsData::totalmilesflown(); ?></p> <p>Total Aircraft: <?php VastatsData::totalaircraftinfleet(); ?></p> <p>Total Schedules: <?php VastatsData::totalschedules(); ?></p> <p>Total News Items: <?php VastatsData::totalnewsitems(); ?></p> I know all the P's are not necessary. I just hacked it together lastnight in a few minutes. But something like that will get you on your way. I just looked way to far into it and tried and tried to create a module and never actually had to. :-[ Try doing something like I did in the frontpage_main.tpl if using crystal or a copied crystal and it should work. And obviously you will need to skin it and recode to suit your needs. Quote Link to comment Share on other sites More sharing options...
James200410 Posted October 28, 2009 Report Share Posted October 28, 2009 Hello Sir and thanks for your reply. Like you I also have tried making a Module but to no avail, Will try what you have done. Thanks again Adam Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 28, 2009 Administrators Report Share Posted October 28, 2009 Modules have been revamped in the next version, so it will be easier. But for this, you just can modify the templates to call the functions. I think the video tutorials might make it clearer. But I will be revising the existing tutorials when the time comes to reflect the updated internals. I'll try to go in-depth for it, to cover alot of stuff. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 29, 2009 Report Share Posted October 29, 2009 Hello Sir and thanks for your reply. Like you I also have tried making a Module but to no avail, Will try what you have done. Thanks again Adam No probs Adam. Like I said, that is VERY rough code that was tossed together in a couple minutes. :-[ Try it and skin it to your liking and I'm sure you will be happy. ;D Quote Link to comment Share on other sites More sharing options...
shiljo Posted January 29, 2010 Report Share Posted January 29, 2010 PLs can someone code me some table for Croatia Cargo Company, i would really be preciated, cause you guys eat codes for brekfast, i will do that for year hehe...really... So...i would involve...total pilots, total A/C, total routes, total miles flown, total cargo carried, total fuel burnedtotal hours flown. Thank you very much guys 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.