I wanted this in the NAVBAR so it would attract more attention so here is what I did:
Code:
If you DO NOT have my Number of v3 Arcade Games in vBadvanced Stats Block hack installed:
In global.php find:
$vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $bbuserinfo['pmtotal']);
Below it add:
// Latest Arcade Game
$result_newgame = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games ORDER BY gameid DESC LIMIT 1");
$result_newgametitle = $DB_site->fetch_array($result_newgame);
$newgame = $result_newgametitle['title'];
$newgameid = $result_newgametitle['gameid'];
OTHERWISE:
If you DO have my Number of v3 Arcade Games in vBadvanced Stats Block hack installed:
In global.php find:
$result_allgames = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "games $searchclause ORDER BY gameid DESC
");
$gamecount = $DB_site->num_rows($result_allgames);
Replace it with:
$result_games = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games $searchclause ORDER BY gameid DESC");
$result_newgametitle = $DB_site->fetch_array($result_games, 1);
$gamecount = $DB_site->num_rows($result_games);
$newgame = $result_newgametitle['title'];
$newgameid = $result_newgametitle['gameid'];
AND, for BOTH cases:
Template Edit:
In NAVBAR find:
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br />
Replace with:
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase> <br />
Newest Arcade Game: <a href="arcade.php?$session[sessionurl]do=play&gameid=$newgameid">$newgame</a>
<if condition="$show['pmstats']"><br />
If you use vBa CMPS add the following to AdminCP->vBa CMPS->Default Settings->Portal Output Global Variables:
newgame
newgameid
Done.
Hopefully this will get more people to notice that you have an arcade. I know that the arcade has attracted and kept users for me.
Dennis