html username color for the side box ,,v3Arcade Champions..
v3Arcade Mod Version: 2.0.3A..
Demo: http://www.next-level-arcade.com/arcade.php
Need to edit includes/v3arcade_functions.php
Fine: // ##### Update Champion Cache #####
replace all of the Update Champion Cache code with this
PHP Code:
// ##### Update Champion Cache ################################################
function build_arcade_champ_cache()
{
global $vbulletin;
if (!$vbulletin->options['arcadechamps'])
{
return;
}
$cache = array();
$getchamps = $vbulletin->db->query_read("
SELECT games.highscorerid, user.username, user.userid, user.usergroupid
FROM " . TABLE_PREFIX . "v3arcade_games AS games
INNER JOIN " . TABLE_PREFIX . "user AS user ON (games.highscorerid = user.userid)
");
while ($champs = $vbulletin->db->fetch_array($getchamps))
{
$champss['username'] = fetch_musername($champs);
$cache[$champs['highscorerid']]['count']++;
$cache[$champs['highscorerid']]['username'] = $champss['username'];
$cache[$champs['highscorerid']]['userid'] = $champs['highscorerid'];
}
$vbulletin->db->free_result($getchamps);
uasort($cache, 'order_scores');
// $cache = array_slice($cache, 0, $vbulletin->options['arcadechamps']);
$ccount = 0;
$arcadechamps = '';
foreach (array_keys($cache) AS $suserid)
{
$ccount++;
if ($cache[$suserid]['count'] == $lastcount)
{
$rank = $lastrank;
}
else
{
$rank = $ccount;
$lastcount = $cache[$suserid]['count'];
$lastrank = $rank;
}
$cache[$suserid]['rank'] = $rank . ordinal($rank);
}
build_datastore('v3a_champs', serialize($cache), 1);
return $cache;
}
Important:
It will update the user color after someone gets a high score...