So, ever wanted to show more than the top 3 players on your game section stats? heres how:
Have a look for this code in the inc/functions_games.php
PHP Code:
//Best players
if($games_core->settings['stats_bestplayers'] == 1)
{
$query = $db->query("SELECT u.uid, u.username, u.avatar, COUNT(c.gid) AS champs
FROM ".TABLE_PREFIX."games_champions c
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=c.uid)
LEFT JOIN ".TABLE_PREFIX."games g ON (c.gid=g.gid)
WHERE g.active='1'".$where_cat."
GROUP BY u.uid
ORDER BY champs DESC, c.dateline ASC
LIMIT 0,3");
and change it to
PHP Code:
//Best players
if($games_core->settings['stats_bestplayers'] == 1)
{
$query = $db->query("SELECT u.uid, u.username, u.avatar, COUNT(c.gid) AS champs
FROM ".TABLE_PREFIX."games_champions c
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=c.uid)
LEFT JOIN ".TABLE_PREFIX."games g ON (c.gid=g.gid)
WHERE g.active='1'".$where_cat."
GROUP BY u.uid
ORDER BY champs DESC, c.dateline ASC
LIMIT 0,5");
You need to change the limit number to however many you want to show.
To use this you will have to modify the games_stats_bestplayers_bit template . The width is set to 33% as there are usually 3 "best players" - so 4 = 25%, 5=20% and so on.
Of course, you will also have to edit the language files.....
find in inc/languages/english/games.lang.php
PHP Code:
$l['bestplayers_place_1'] = "First place";
$l['bestplayers_place_2'] = "Second place";
$l['bestplayers_place_3'] = "Third place";
and replace it with
PHP Code:
$l['bestplayers_place_1'] = "First place";
$l['bestplayers_place_2'] = "Second place";
$l['bestplayers_place_3'] = "Third place";
$l['bestplayers_place_4'] = "Fourth place";
$l['bestplayers_place_5'] = "Fifth place";
$l['bestplayers_place_6'] = "Sixth place";
You get the idea....