Thread: Add-On Releases - v3 Arcade - Games Arcade System for 3.6.0
View Single Post
  #1745  
Old 06-06-2006, 01:59 AM
rjordan's Avatar
rjordan rjordan is offline
 
Join Date: Sep 2004
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 '&microone=' getmicrotime());
 exit;
}
 
//
// END: v3arcade addon for ibProArcade scoring compatability
// 
Save and upload index.php.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01080 seconds
  • Memory Usage 1,795KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete