But while no errors shows up now, the username colors below Arcade Champions are still the same color. Nothing has changed, nor are they using the usergroup color.
Also. Is there anyway I can apply this to the entire arcade, including the leaderboard at the top of the arcade? (plugin).
// If the user has no avatar, use the default placeholder. if (!$score['useravatar']) { $score['useravatar'] = $vbulletin->options['arcadeimages'] . '/noavatar.gif'; } }
// ##### Fetch Member Awardbits ############################################### function fetch_member_award_bits($userid, $displaytype = '1') { // Displaytype // 1 = BAU (for example, the user profile page) // 2 = Leaderboard Champion
// Tournaments - Most wins $mosttourwins = 0; $getmosttours = $db->query_read(" SELECT COUNT(tournaments.winner) as numwins, tournaments.winner, user.username FROM " . TABLE_PREFIX . "v3arcade_tournaments AS tournaments LEFT JOIN " . TABLE_PREFIX . "user AS user ON (tournaments.winner = user.userid) WHERE tournaments.status = 2 GROUP BY tournaments.winner ORDER BY numwins DESC LIMIT 3 "); while ($tour = $db->fetch_array($getmosttours)) { if ($mosttourwins AND $tour['numwins'] != $mosttourwins) { continue; }
$challenges = $vbulletin->db->query_read(" SELECT challenges.*, touser.username AS tousername, fromuser.username AS fromusername, games.miniimage, games.title FROM " . TABLE_PREFIX . "v3arcade_challenges AS challenges LEFT JOIN " . TABLE_PREFIX . "user AS touser ON (touser.userid = challenges.touserid) LEFT JOIN " . TABLE_PREFIX . "user AS fromuser ON (fromuser.userid = challenges.fromuserid) LEFT JOIN " . TABLE_PREFIX . "v3arcade_games AS games ON (games.gameid = challenges.gameid) WHERE status = 3 ORDER BY datestamp DESC LIMIT " . $vbulletin->options['frontminichallenges'] ); while ($challenge = $vbulletin->db->fetch_array($challenges)) { $cache['challenges'][$challenge['challengeid']] = $challenge; }
// Show the latest scores, excluding tournament events $latest = $vbulletin->db->query_read(" SELECT sessions.*, games.title, user.username FROM " . TABLE_PREFIX . "v3arcade_sessions AS sessions LEFT JOIN " . TABLE_PREFIX . "v3arcade_games AS games ON (sessions.gameid = games.gameid) LEFT JOIN " . TABLE_PREFIX . "user AS user ON (sessions.userid = user.userid) WHERE valid = 1 AND tourid = 0 ORDER BY finish DESC LIMIT " . $vbulletin->options['arcadelatescores'] ); while ($late = $vbulletin->db->fetch_array($latest)) { $late['score'] = v3_score_format($late['score']); $cache['scores'][] = $late; }
if ($categoryid AND $pagenumber) { return "categoryid=$categoryid&pagenumber=$pagenumber"; }
return ''; }
// ##### Build Ratings ######################################################## function build_ratings($gameid) { global $db, $vbulletin;
if ($ratingcount = $db->query_first(" SELECT SUM(rating) AS votepoints, COUNT(*) AS votecount FROM " . TABLE_PREFIX . "v3arcade_ratings WHERE gameid = $gameid ")) { $db->query_write(" UPDATE " . TABLE_PREFIX . "v3arcade_games SET votepoints = " . $ratingcount['votepoints'] . ", votecount = " . $ratingcount['votecount'] . " WHERE gameid = $gameid "); } }
// ##### Check Game Perms ##################################################### function check_canplay($game) { global $vbulletin, $vbphrase, $arcadeadmin;
if ($arcadeadmin) { return true; }
if (!$vbulletin->userinfo['userid']) { $vbulletin->userinfo['posts'] = 0; $vbulletin->userinfo['reputation'] = 0; }
// How long has the player been a member? $game['membershiplength'] = (TIMENOW - $vbulletin->userinfo['joindate']) / 86400;
// Minimum post check. $minpostneeded = max($game['minpoststotal'], $vbulletin->userinfo['permissions']['minpoststoplay']); if ($vbulletin->userinfo['posts'] < $minpostneeded) { eval(standard_error(fetch_error( 'v3_not_enough_posts', vb_number_format($minpostneeded), vb_number_format($vbulletin->userinfo['posts']), $game['title'] ))); }