DjTaz
06-10-2006, 10:00 PM
Someone on my forums asked me for this because when someone beat their score they wanted to be able to click into the game without having to search for it in the games listings , so i did it and may as well share the edits with everyone because its so simple.
--------------------------------------------------
step 1:
Open Arcade.php
find :
// Add a new news item, since there's a new champion for this game.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'])) . "', 'auto', " . TIMENOW . ")"); }
and change to :
// Add a new news item, since there's a new champion for this game.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'],$game[gameid])) . "', 'auto', " . TIMENOW . ")");
}
(this just adds in a $game[gameid] to the database query)
UPLOAD arcade.php
---------------------------------------------------
step 2:
go to language and phrases in the adminCP
find $vbphrase[x_is_the_new_champion]
and change it from :
{1} is the new {2} champion!
to
{1} is the new <a href="arcade.php?do=play&gameid={3}">{2}</a> champion!
--------------------------------------------------------
and you should now have a linkable game name in the news and events section of the arcade when the NEXT PERSON wins a game.
Hope that some others use this - it makes life easier
--------------------------------------------------
step 1:
Open Arcade.php
find :
// Add a new news item, since there's a new champion for this game.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'])) . "', 'auto', " . TIMENOW . ")"); }
and change to :
// Add a new news item, since there's a new champion for this game.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'],$game[gameid])) . "', 'auto', " . TIMENOW . ")");
}
(this just adds in a $game[gameid] to the database query)
UPLOAD arcade.php
---------------------------------------------------
step 2:
go to language and phrases in the adminCP
find $vbphrase[x_is_the_new_champion]
and change it from :
{1} is the new {2} champion!
to
{1} is the new <a href="arcade.php?do=play&gameid={3}">{2}</a> champion!
--------------------------------------------------------
and you should now have a linkable game name in the news and events section of the arcade when the NEXT PERSON wins a game.
Hope that some others use this - it makes life easier