OK - to add images to the menu:
Open includes/functions.php, find the query you are using (remember there are multiple versions of this query):
Original:
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() {
global $DB_site,$vboptions,$stylevar;
$theseGames = $DB_site->query("SELECT gameid,title,gamesettings,miniimage 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\"><img src=\"$vboptions[bburl]/$stylevar[imgdir_arcade]/".$thisGame[miniimage]."\" alt=\"\" style=\"border:0;padding-right:3px\" align=\"absmiddle\" /><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
Most often played:
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
Replace with:
PHP Code:
function genArcadeMenu($limit) {
global $DB_site,$vboptions,$stylevar;
$theseGames = $DB_site->query("
SELECT games.gameid AS gameid, games.title AS title, games.gamesettings as gamesettings, games.miniimage AS miniimage, COUNT(gamesessions.gamename) AS popularity
FROM " . TABLE_PREFIX . "games as games
INNER JOIN " . TABLE_PREFIX . "gamesessions AS gamesessions
ON games.shortname = 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\"><img src=\"$vboptions[bburl]/$stylevar[imgdir_arcade]/".$thisGame[miniimage]."\" alt=\"\" style=\"border:0;padding-right:3px\" align=\"absmiddle\" /><a href=\"$vboptions[bburl]/arcade.php?$session[sessionurl]do=play&gameid=".$thisGame[gameid]."\">".$thisGame[title]."</a></td></tr>\n";
}
return $arcmenu;
}
Open global.php, find:
PHP Code:
// Addon to Erwin's vB3 Flash hack - created by Natch
$nav_arcade = genArcadeMenu("9");
MOVE THESE LINES DOWN TO BELOW:
PHP Code:
// #############################################################################
// get style variables
$stylevar = fetch_stylevars($style, $bbuserinfo);
Hope this is useful to y'all