1.0.1 is now available!
As suggested, there is now an additional option in the Admin CP for making newly added games post an event on the "News & Events" block. This is enabled by default.
Upgrade Instructions:
1.) Open up admincp/arcadeadmin.php and find:
Code:
if ($vbulletin->GPC['author'] == '' AND $vbulletin->GPC['instructions'] == '')
{
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_games (shortname, title, description, file, width, height, miniimage, stdimage, gamepermissions, categoryid, dateadded, minpoststotal, minpostsperday, minpoststhisday, minreglength, minrep, isreverse) VALUES
('" . addslashes($vbulletin->GPC['shortname']) . "', '" . addslashes($vbulletin->GPC['title']) . "', '" . addslashes($vbulletin->GPC['description']) . "', '" . addslashes($vbulletin->GPC['file']) . "', '" . $vbulletin->GPC['width'] . "', '" . $vbulletin->GPC['height'] . "', '" . addslashes($vbulletin->GPC['miniimage']) . "', '" . addslashes($vbulletin->GPC['stdimage']) . "', '" . $vbulletin->GPC['gamepermissions'] . "', '" . $vbulletin->GPC['categoryid'] . "', '" . TIMENOW . "', '" . $vbulletin->GPC['minpoststotal'] . "', '" . $vbulletin->GPC['minpostsperday'] . "', '" . $vbulletin->GPC['minpoststhisday'] . "', '" . $vbulletin->GPC['minreglength'] . "', '" . $vbulletin->GPC['minrep'] . "', '" . $vbulletin->GPC['isreverse'] . "')");
} else {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_games (shortname, title, author, description, instructions, file, width, height, miniimage, stdimage, gamepermissions, categoryid, dateadded, minpoststotal, minpostsperday, minpoststhisday, minreglength, minrep, isreverse) VALUES
('" . addslashes($vbulletin->GPC['shortname']) . "', '" . addslashes($vbulletin->GPC['title']) . "', '" . addslashes($vbulletin->GPC['author']) . "', '" . addslashes($vbulletin->GPC['description']) . "', '" . addslashes($vbulletin->GPC['instructions']) . "', '" . addslashes($vbulletin->GPC['file']) . "', '" . $vbulletin->GPC['width'] . "', '" . $vbulletin->GPC['height'] . "', '" . addslashes($vbulletin->GPC['miniimage']) . "', '" . addslashes($vbulletin->GPC['stdimage']) . "', '" . $vbulletin->GPC['gamepermissions'] . "', '" . $vbulletin->GPC['categoryid'] . "', '" . TIMENOW . "', '" . $vbulletin->GPC['minpoststotal'] . "', '" . $vbulletin->GPC['minpostsperday'] . "', '" . $vbulletin->GPC['minpoststhisday'] . "', '" . $vbulletin->GPC['minreglength'] . "', '" . $vbulletin->GPC['minrep'] . "', '" . $vbulletin->GPC['isreverse'] . "')");
}
Below it, add:
Code:
if ($vbulletin->options['neweventonmanaddgame'] == 1)
{
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_has_been_added'], $vbulletin->GPC['title'])) . "', 'auto', " . TIMENOW . ")");
}
2.) Import the updated product file, with the "Overwrite" checkbox enabled.
|