RogerB Posted July 16, 2012 Report Share Posted July 16, 2012 have any of you messed around with or customized the personal stats page? It's very boring, was hoping to get some ideas thrown around so it can be made more interesting .... Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 16, 2012 Moderators Report Share Posted July 16, 2012 I have done that for my last VA. I added average landing rate, their top landings, their top flight #'s flown in month, all of that kind of detailed stats. Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 17, 2012 Author Report Share Posted July 17, 2012 Would you mind sharing a little of the code Kyle, just to get me kick started? Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 17, 2012 Moderators Report Share Posted July 17, 2012 I would be happy to share with you! Let me dig up my code and I'll post them in. Cheers! 1 Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 19, 2012 Author Report Share Posted July 19, 2012 Just checking in Kyle, thought maybe you forgot. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 19, 2012 Moderators Report Share Posted July 19, 2012 (smacks head self) - I'll get onto it tonight. I'm working on the same one for Patriot Virtual, I might add new stuff in there and share here. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 20, 2012 Moderators Report Share Posted July 20, 2012 I'm going to put the codes in the tpl file. It'll be too big to paste the code. There's some good stuff...Oh Good Stats Stuff! Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 20, 2012 Moderators Report Share Posted July 20, 2012 Okay, here's what's in the attached file... (All stats are per pilot!) Average Landing Rate Average Hours Average Miles Total Hours Total Flights Total Miles Total Passengers Table with Greased Landings Table with Top Flight Hours Table with Top Flight Time with Year I'll add more in the file later, maybe release a new module. Enjoy the good stuff! custom_stats.zip Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 20, 2012 Author Report Share Posted July 20, 2012 Thank you kind sir!! Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 20, 2012 Author Report Share Posted July 20, 2012 Strange thing, when I use this on my regular site it blows up the page all our of whack, when I use it on the Dev site it's fine... Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 20, 2012 Moderators Report Share Posted July 20, 2012 Roger, if I'm not correct, I know you said you were creating custom pages for your site. Did you put the file in the custom .php files? It should coded in any tpl files in the skins folder. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted July 20, 2012 Report Share Posted July 20, 2012 i tried it in the profile_stats.tpl and it works great except for it doesn`t limit the results to 15 but gives 100 on the greased landings and top hours. I have copied the code exactly as it is in your .tpl file. Any ideas why it gives 100 instead of just 15? Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 20, 2012 Moderators Report Share Posted July 20, 2012 i tried it in the profile_stats.tpl and it works great except for it doesn`t limit the results to 15 but gives 100 on the greased landings and top hours. I have copied the code exactly as it is in your .tpl file. Any ideas why it gives 100 instead of just 15? Manuel, In the file I gave, are you sure that you have this code in there with the table as an example I made? $landingrate = getGreasedLanding(Auth::$userinfo->pilotid, 15); Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 20, 2012 Author Report Share Posted July 20, 2012 In the gettopfliightsmonth section, the coloring of the code in dreamweaver looks like there is a coding mistake...trying to find it if there is.. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted July 20, 2012 Report Share Posted July 20, 2012 Hey kyle, Jap it is exactly the same as you posted but it still gives me 100. Thats funny hehe Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 20, 2012 Moderators Report Share Posted July 20, 2012 Hey kyle, Jap it is exactly the same as you posted but it still gives me 100. Thats funny hehe Sorry, I made a mistake here. Change this $landingrate = getGreasedLanding(Auth::$userinfo->pilotid, 15); To this.. $landingrate = getGreasedLanding(15); And that will fix the problem, will update the file right away. In the gettopfliightsmonth section, the coloring of the code in dreamweaver looks like there is a coding mistake...trying to find it if there is.. There should be no errors in my original file. If you want, you can send me your file via PM and I'll have a look at it for you. Cheers! Quote Link to comment Share on other sites More sharing options...
mseiwald Posted July 20, 2012 Report Share Posted July 20, 2012 Great thanks Kyle! Quote Link to comment Share on other sites More sharing options...
Felipe Posted December 12, 2012 Report Share Posted December 12, 2012 Hello, guys! The code works only for the logged pilots. But I would like to set it on the pilot_public_profile.tpl. So, basically, I need the "$pilot->pilotid" to pull the data from the DB. I've changed all the queries, but it is not working out. Would you please give me some tips? As an example, I did this in all queries of all the functions... $sql = '... p.accepted = 1 AND p.pilotid = '.$pilot->pilotid.' ORDER...''; return DB::get_results($sql); } ... instead of... $sql = '... p.accepted = 1 AND p.pilotid = '.Auth::$userinfo->pilotid.' ORDER B......''; return DB::get_results($sql); } Quote Link to comment Share on other sites More sharing options...
Taran Posted December 15, 2013 Report Share Posted December 15, 2013 Okay, here's what's in the attached file... (All stats are per pilot!) Average Landing Rate Average Hours Average Miles Total Hours Total Flights Total Miles Total Passengers Table with Greased Landings Table with Top Flight Hours Table with Top Flight Time with Year I'll add more in the file later, maybe release a new module. Enjoy the good stuff! I can't seem to get this to work. Could you past the EXACT code that i should put into this to get it to list the data in the red part? (The red is what i got from your code). I put that the file in: core/templates/custom_stats.tpl <td valign="top" width="20%" align="left"><strong>Pax Carried:</strong></td> <td valign="top" width="30%" align="left"><?php echo getTotalPassengersPilot();?></td> <td valign="top" width="20%" align="left"><strong>Pax Carried:</strong></td> <td valign="top" width="30%" align="left"><?php echo getTotalPassengersPilot();?></td> 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.