TouchdownStats 1.0

TouchdownStats 1.0

Module to extract and display landing rates from your PIREPS table


A visible link to http://www.simpilotgroup.com must be provided on any webpage utilizing this script for the license to be valid.


Developed by:

simpilot - David Clark

www.david-clark.net

Developed on:

phpVMS 2.1.935

php 5.2.11

mysql 5.0.51

apache 2.2.11

Install:

-Download the attached package.

-unzip the package and place the files as structured in your root phpVMS install.

To show all the landing stats currently in the datbase create a link to

www.yoursite.com/index.php/TouchdownStats

To show a limited number of stats from your database create a link to

www.yoursite.com/index.php/TouchdownStats/top_landings/10

The “10” can be changed to however many you would like to see

The most useful method of the data class would be to use

TouchdownStatsData::get_all_stats()

and

TouchdownStatsData::get_stats('10')

You can use these inside of one of your templates to bring back the data you want and display it as you wish.

An example to fill a variable with data for use in your template you can use

$this->set->('stats', TouchdownStatsData::get_stats('10'));

in your module to pass the data to the template within the $stats variable. Then in your template use the $stats variable to do what you wish with the display.

TouchDownStats Released under the following license:

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

Code hosted on Github - Link In Signature.

Aamaaaaziing!!

Thaks for post that!!

Aamaaaaziing!!

Thaks for post that!!

agreed thanks alot for this… cant wait to put it in action

cheers dude!

Yes, awesome! Is it difficult to get the pilots average landings score as well, as a top ten?

Yes, awesome! Is it difficult to get the pilots average landings score as well, as a top ten?

Hey, how can i dispaly the landing stats table like on a different page?

i want to dispaly the top 10.

Hey, how can i dispaly the landing stats table like on a different page?

i want to dispaly the top 10.

Yeah, i have the top 20 selected on my site. I really want the average pilot landing rate as well. is this easy to create?

Thanks all!

Lucas

Hi All,

I love this add-on, great work!

Its been a while since I have worked with phpvms and php in general. I cant seem to get this module to show on my front page

I would like to show the best 5 landing rates on the left sidebar of my site I call it using:

<?php echo TouchdownStatsData::get_stats('5'); ?>

But the result just shows the word Array

Would you mind pointing me in the right direction

The function does not return anything to echo, it returns a variable filled with the info you requested. An example to use it would be to set the variable, preferably in your module:

$this->set('myvariable', TouchdownStatsData::get_stats('5'));

Then in your template use a foreach command to show what data you want to display:

foreach($myvariable as $variable)
   {
       Do Stuff
   }

To see what is available to echo do a:

print_r($myvariable);

in your template.

If you want to call the data within the template just do:

$myvariable = TouchdownStatsData::get_stats('5');

in your template before you need the info.

Wow, Ok actually easy enough I suppose, It worked like a charm

If you want to call the data within the template just do:

$myvariable = TouchdownStatsData::get_stats(‘5’);

in your template before you need the info.

Is what I somehow missed… I think.

Thanks so much.

so how do you pull the “Average Touchdown Rate” for the month or to date?

Yeah i would like to know that as well.. i can’t find it anywhere… :frowning:

Average? Anyone?

What are you looking for? The VA’s average or a pilot’s average? Monthly, alltime?

The average for both the pilot and also the monthly average if you could.

Yeah, that would be great!

Could you make a selection between all time, year and month? (month is the least important for me though) :slight_smile:

Thanks in advance!

Lucas

I was looking for the top 10 pilots average for all time, but the more stats the better. Almost like the TopPilot module, but associated as landing stats. Maybe combine them both?! A second table listed below the top pilot data for best monthly touchdown rate, and then a best average as well.

SO, below the top pilot data, it could be:

Best Landing Rate (for month) | Best Landing Rate Average (for month) | Smoothest Pilot (for month)

I don’t know, maybe the smoothest pilot could be based on combination of best landing rate + average somehow, possibly with a minimum of 5 flights or something?!

Yeah that’s a good idea… and yeah, the more stats the better of course :-p

Regards

Lucas

Hello,

it works very fine but there is an error also at my page:

Warning: Invalid argument supplied for foreach() in /mnt/weba/40/03/52426403/htdocs/core/templates/touchdownstats/touchdownstats_index.tpl on line 21

Im using:

Version 2.1.934

Martin

Hello,

it works very fine but there is an error also at my page:

Warning: Invalid argument supplied for foreach() in /mnt/weba/40/03/52426403/htdocs/core/templates/touchdownstats/touchdownstats_index.tpl on line 21

Im using:

Version 2.1.934

Martin

Looks like there is no data coming back from the database. Do you have any PIREPs filed with landing rates?

Hello,

right, my mistake, I had deleted the database because of the problems with the Flight Bids …

Martin