Quote:
Originally Posted by Natch
Another option (if it is just the size of the list that is too big) is to edit the CSS statements for the navbar popup links - drop them down a fint size and it should help a lot ...
Sometimes I forget that not everyone has 1280x1024 ...
I'll look into this ok guys ?
|
OK - I've created the new function to populate the menu with only the N most played games - atm the value of N will be hardcoded by you the hacker into your global.php (where the function is called), but for the next release (which will have this variant as an option) I will add it to the Arcade ACP Options page (once I learn how to do ACP options LOL) - I will
not be updating the original instructions until the next release ...
IF YOU WANT TO HAVE ONLY N MOST POPULAR OPTIONS
Find in
includes/functions.php
PHP Code:
// Addon to John's vB3 ArcadeV3 hack - created by Natch
function genArcadeMenu() {
global $DB_site,$vboptions;
$theseGames = $DB_site->query("SELECT gameid,title,gamesettings FROM " . TABLE_PREFIX . "games ORDER BY title");
while ($thisGame = $DB_site->fetch_array($theseGames)) {
$arcmenu.= (is_int($thisGame[gamesettings]/2)) ? "" : "\t\t<tr><td class=\"vbmenu_option\"><a href=\"$vboptions[bburl]/arcade.php?$session[sessionurl]do=play&gameid=".$thisGame[gameid]."\">".$thisGame[title]."</a></td></tr>\n";
}
return $arcmenu;
}
// Addon to John's vB3 ArcadeV3 hack - created by Natch
Replace with:
PHP Code:
// Addon to John's vB3 ArcadeV3 hack - created by Natch
function genArcadeMenu($limit) {
global $DB_site,$vboptions;
$theseGames = $DB_site->query("
SELECT " . TABLE_PREFIX . "games.gameid AS gameid, " . TABLE_PREFIX . "games.title AS title, " . TABLE_PREFIX . "games.gamesettings as gamesettings, COUNT(" . TABLE_PREFIX . "gamesessions.gamename) AS popularity
FROM " . TABLE_PREFIX . "games
INNER JOIN " . TABLE_PREFIX . "gamesessions
ON " . TABLE_PREFIX . "games.shortname = " . TABLE_PREFIX . "gamesessions.gamename
GROUP BY title
ORDER BY popularity DESC
LIMIT $limit
");
while ($thisGame = $DB_site->fetch_array($theseGames)) {
$arcmenu.= (is_int($thisGame[gamesettings]/2)) ? "" : "\t\t<tr><td class=\"vbmenu_option\"><a href=\"$vboptions[bburl]/arcade.php?$session[sessionurl]do=play&gameid=".$thisGame[gameid]."\">".$thisGame[title]."</a></td></tr>\n";
}
return $arcmenu;
}
// Addon to John's vB3 ArcadeV3 hack - created by Natch
Find in
global.php
PHP Code:
// Addon to John's vB3 ArcadeV3 hack - created by Natch
$nav_arcade = genArcadeMenu();
// Addon to John's vB3 ArcadeV3 hack - created by Natch
Replace with:
PHP Code:
// Addon to John's vB3 ArcadeV3 hack - created by Natch
$nav_arcade = genArcadeMenu("6");
// Addon to John's vB3 ArcadeV3 hack - created by Natch
This should do it ... change the value in the global function call (above) to match your required number of menu options ...