vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   Issue with recording scores (https://vborg.vbsupport.ru/showthread.php?t=151102)

rowlandc 07-01-2007 12:11 PM

Issue with recording scores
 
My forum isn't recording the scores of people games. I saw that because its not the /index.php file you had to change the /forums.php (where the form is located).

I edited the forums.php file as shown below:

I then uploaded that onto my website and the forum page was blank. The vbadvanced was work as my portal but when I went onto the forum it was a blank page.

I took the code away and it work then.

Am I adding the code in the wrong section?

PHP Code:

<?php
// ibProArcade
if($_POST[module] == "pnFlashGames")
{
    require_once(
"./global.php");

    switch(
$_POST[func])
    {
        case 
"storeScore":
        
$_GET[act] = "Arcade";
        
$_GET[module] = "arcade";
        
$_GET[do] = "pnFStoreScore";
        break;

        case 
"saveGame":
        
$_GET[do] = "pnFSaveGame";
        break;

        case 
"loadGame":
        
$_GET[do] = "pnFLoadGame";
        break;

        case 
"loadGameScores":
        
$gid $vbulletin->input->clean_gpc("p""gid"TYPE_NOHTML);
        
$uid$vbulletin->userinfo[userid];
        
$game $db->query_first("SELECT * FROM " TABLE_PREFIX "games_scores WHERE mid=$uid AND gid = $gid ORDER BY score DESC LIMIT 0,1");
        
$scores $game[score];

        if(
$scores != false)
        {
            
//Return true
            
print "&opSuccess=true&gameScores=$scores&endvar=1"//send endvar to keep opSuccess separate from all other output from PostNuke
        
}
        else
        {
            print 
"&opSuccess=false&error=Error&endvar=1";
        }
        break;
    }
}

$act $_GET[act];
$autocom $_GET[autocom];
$showuser$_GET[showuser];
if(
$act == "Arcade" || $autocom=="arcade") {
include 
"arcade.php";
exit();
}
if(!empty(
$showuser) && $showuser >= 1) {
$u $showuser;
$_GET[u] = $showuser;
include 
"member.php";
exit();
}
// end of ibProArcade
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.6.7 PL1 - Licence Number VBFEECEC05
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2007 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''index');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('holiday');

// get special data templates from the datastore
$specialtemplates = array(
    
'userstats',
    
'birthdaycache',
    
'maxloggedin',
    
'iconcache',
    
'eventcache',
    
'mailqueue'

I worked it out on my own ;)

Sorry for the waste of time

Thawcko 07-20-2007 01:43 AM

What did you do to fix this, i am having the same issue... Thanks..


All times are GMT. The time now is 04:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01049 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete