Go to core/common/TouchdownStatsData.class.php
Add this to the file:
public function get_planemd11_stats($howmany) {
$query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps`
WHERE landingrate < '0'
AND Aircraft = '2'
ORDER BY landingrate DESC
LIMIT $howmany";
return DB::get_results($query);
}
planemd11 can be edited to the plane that you would like to show.
AND Aircraft = '2' the 2 can be changed to the aircraft that you would like to show. (See the phpvms_aircraft table)
So in my case the MD11 has ID '2' in the 'phpvms_aircraft' table.
Next, you need to add the following rules to the core/modules/Touchdownstats/TouchdownStats.php
public function planemd11_landings($howmany) {
$this->set('stats', TouchdownStatsData::get_planemd11_stats($howmany));
$this->show('touchdownstats/touchdownstats_index.tpl');
}
Again, please make sure that the planemd11 in both rules are the changed to the same name as used in the core/common/TouchdownStatsData.class.php file.
When this is done, you can use this link to view the results:
yoursite/index.php/TouchdownStats/planemd11_landings/20 (and again, planemd11 needs to be the same as in the two files we have edited.
DEMO:
http://serious-airlines.com/index.php/pages/aircraftstatistics
It's my first little project...
Regards
Lucas