From cee0083e4861001af9d32180010c28cb5e5d6123 Mon Sep 17 00:00:00 2001 From: Squigs44 <96dwilliams@gmail.com> Date: Thu, 18 Apr 2019 20:08:45 -0600 Subject: [PATCH] Fixed the ranking on active --- halloffame.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/halloffame.php b/halloffame.php index b053ebb07..8d0143122 100755 --- a/halloffame.php +++ b/halloffame.php @@ -99,11 +99,13 @@ print'

'; $sixMonths = time() - 15552000; -if ( $User->type['User'] && $User->points > 100 ) +if ( $User->type['User'] && $User->points > 100 && $User->timeLastSessionEnded > $sixMonths) { - list($position) = $DB->sql_row("SELECT COUNT(id)+1 FROM wD_Users WHERE points > ".$User->points." AND timeLastSessionEnded >".$sixMonths); + list($position) = $DB->sql_row("SELECT COUNT(id)+1 FROM wD_Users WHERE points > ".$User->points." AND timeLastSessionEnded > ".$sixMonths); + + list($playersSixMonths) = $DB->sql_row("SELECT COUNT(1) FROM wD_Users WHERE points > 100 AND timeLastSessionEnded > ".$sixMonths); - print '

'.l_t('You are ranked %s out of all players with over 100%s who have been active in the last six months.','#'.$position.'',libHTML::points()). + print '

'.l_t('You are ranked %s out of %s players with over 100%s who have been active in the last six months','#'.$position.'',$playersSixMonths,libHTML::points()). l_t('. For more stats on your ranking visit your profile.').'

'; } @@ -135,6 +137,17 @@ print' '; $i++; } +if ( $User->type['User'] && $User->points > 100 && $User->timeLastSessionEnded > $sixMonths and $showMe == 1 ) +{ + print ' + ... + ... + '; + print ' + '.number_format($User->points).' '.libHTML::points().' - #'.$position.' + '.$User->username.' + '; +} print ''; print '
';