
06-06-2006, 12:52 PM
|
|
|
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by rjordan
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.
|
nah all you have to do is find this -
Code:
require_once('./global.php');
right below that add this -
Code:
($hook = vBulletinHook::fetch_hook('forumhome_start')) ? eval($hook) : false;
Note that this should only be done if your vbAdvanced portal has been renamed to index.php.
|