Ye, in the plugin I gave you create a new file called rankings_compile_stats.php with the following content further below.
It will display on category view: Rank # overall
And on overall view will display: Rank # in category
Place {$rank_overall} and {$rank_category} in the following files where you want the text to appear
table_row.html, table_top_row.html, table_row_premium.html, table_top_row_premium.html
PHP:
// This tag is empty on overall ranking
$TMPL['rank_overall'] = '';
// This tag is empty on category ranking
$TMPL['rank_category'] = '';
if ($TMPL['cat_exist'])
{
// This code runs on category page
$rank_overall = 1;
$rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 ORDER BY {$order_by}", __FILE__, __LINE__);
while (list($username) = $DB->fetch_array($rank_result))
{
if($username == $TMPL['username'])
{
break;
}
$rank_overall++;
}
$TMPL['rank_overall'] = "Rank {$rank_overall} overall";
}
else
{
// This code runs on the overall page
// Escape users category
$category_rank_sql = $DB->escape($category_raw, 1);
$rank_category = 1;
$rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 AND category = '{$category_rank_sql}' ORDER BY {$order_by}", __FILE__, __LINE__);
while (list($username) = $DB->fetch_array($rank_result))
{
if($username == $TMPL['username'])
{
break;
}
$rank_category++;
}
$TMPL['rank_category'] = "Rank {$rank_overall} in {$TMPL['category']}";
}