Quote:
Originally Posted by Reece^B
Anyone know what the file name is that redirects you to the score page?
Because im having a on going problem that no one can post scores without it redirecting you to the home page.
Thanks,
|
Reece, I feel stupid. I should have gone to your site. The reason it fails is it redirects to your portal, right? The hook to take care of the scores is not set to go work through vbAdvanced and vbAdvanced does not have any hooks in it as of v2.1.0. Try this and let us know if it works.
Note that this should only be done if your vbAdvanced portal has been renamed to index.php.
MAKE A BACKUP OF INDEX.PHP.
Open your index.php for editing.
Find this:
PHP Code:
print_portal_output($home);
Add the following above:
PHP Code:
//
// BEGIN: v3arcade addon for ibProArcade scoring compatability
//
if ($_REQUEST['do'] == 'newscore' && $_REQUEST['act'] == 'Arcade')
{
require_once(DIR . '/includes/functions_arcade.php');
// That's right kids, datatype checking is usually a grand idea.
$vbulletin->input->clean_array_gpc('p', array(
'gscore' => TYPE_UINT,
'gname' => TYPE_STR
));
if (!$game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "arcade_games AS arcade_games WHERE shortname='" . addslashes($vbulletin->GPC['gname']) . "'"))
{
exit;
}
// Create a session record.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_sessions (gameid,gamename,userid,start,sessiontype,challengeid,score,finish) VALUES ('" . $game['gameid'] . "', '" . addslashes($vbulletin->GPC['gname']) . "','" . $vbulletin->userinfo['userid'] . "', '" . TIMENOW . "', 1, 0, '" . $vbulletin->GPC['gscore'] . "', '" . TIMENOW . "')");
// Fetch the ID number of the session we just inserted.
$lastid = $db->insert_id();
header('Location: arcade.php?sessdo=burn&id=' . $lastid . 'µone=' . getmicrotime());
exit;
}
//
// END: v3arcade addon for ibProArcade scoring compatability
//
Save and upload index.php.