v3 Arcade Most Played and Most Popular Games
What does this do?
Creates two tabs in your v3 Arcade which is auto-populated with X Most Played Games and X Most Popular Games (by Votes), where X is equivalent to the number of games set to be shown on each page (set via AdminCP > v3 Arcade > v3 Arcade Settings > v3 Arcade Homepage Settings) Firstly, create two new games categories (v3 Arcade > Games Categories) and take note of each of the Category IDs Open arcade.php Find: Code:
// Favorites else if ($vbulletin->GPC['categoryid'] == 2) Code:
// Most Popular else if ($vbulletin->GPC['categoryid'] == X) { $games = $db->query_read(" SELECT arcade_games.*, user.username, arcade_categories.catname FROM " . TABLE_PREFIX . "v3arcade_games AS arcade_games LEFT JOIN " . TABLE_PREFIX . "user AS user ON (arcade_games.highscorerid=user.userid) LEFT JOIN " . TABLE_PREFIX . "v3arcade_categories AS arcade_categories ON (arcade_games.categoryid=arcade_categories.categoryid) " . iif($bitfieldcheck, "WHERE $bitfieldcheck") . " ORDER BY arcade_games.votepoints DESC LIMIT $start " . $vbulletin->options['gamesperpage'] ); $categorygamecnt = $db->num_rows($games); } // Most Played else if ($vbulletin->GPC['categoryid'] == XX) { $games = $db->query_read(" SELECT arcade_games.*, user.username, arcade_categories.catname FROM " . TABLE_PREFIX . "v3arcade_games AS arcade_games LEFT JOIN " . TABLE_PREFIX . "user AS user ON (arcade_games.highscorerid=user.userid) LEFT JOIN " . TABLE_PREFIX . "v3arcade_categories AS arcade_categories ON (arcade_games.categoryid=arcade_categories.categoryid) " . iif($bitfieldcheck, "WHERE $bitfieldcheck") . " ORDER BY arcade_games.sessioncount DESC LIMIT $start " . $vbulletin->options['gamesperpage'] ); $categorygamecnt = $db->num_rows($games); } Save and re-up your arcade.php If anyone wants to further develop any of my addons, you are free to do so. Download No files for download. Screenshots |