vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   Game score not saving after upgrade to beta 5 (https://vborg.vbsupport.ru/showthread.php?t=229554)

milsirhc 12-05-2009 09:07 AM

Game score not saving after upgrade to beta 5
 
Hi All,

It was all working good on beta 4 and after I upgrade to beta 5, the score does not save anymore.

Clicking on send score brings me to the forum index page. Anyone got the same problem?

bart6767 12-05-2009 06:35 PM

Quote:

Originally Posted by milsirhc (Post 1925643)
Hi All,

It was all working good on beta 4 and after I upgrade to beta 5, the score does not save anymore.

Clicking on send score brings me to the forum index page. Anyone got the same problem?

If you are using vbAdvanced Portal and your /index.php is not the original one from vBulletin,
you have to edit your alternate index.php:

open index.php

At the very beginning of the File, right after:
----------------------------------------------------------
<?php
----------------------------------------------------------

you have to insert:
----------------------------------------------------------
Code:

// 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_INT);
                $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

----------------------------------------------------------


Otherwise your scores won't be recorded :)

milsirhc 12-05-2009 09:06 PM

thanks for your input Bart!

I'm using vbulletin publisher out of the box. No vbadvanced portal installed.

It was working on beta 4, but I've upgraded it ytd to 5 and now the score won't be recorded.

Hmm... am i the only one having this problem?

MrZeropage 12-05-2009 09:22 PM

I am customer of vbulletin-germany and there's still vB4 beta4 actual version, no beta5 ... so I can not verify/test this yet

bart6767 12-05-2009 09:54 PM

Quote:

Originally Posted by MrZeropage (Post 1925973)
I am customer of vbulletin-germany and there's still vB4 beta4 actual version, no beta5 ... so I can not verify/test this yet

I am on beta 5 and it works fine .:up:

milsirhc 12-06-2009 06:04 AM

Thanks Bart and MrZeroPage.

I've solve this. The problem is that when I upgrade to beta 5, I did not comment out the CMS

PHP Code:

// Use the CMS as the default script
//require('content.php');

// Use the forum as the default script
require('forum.php'); 

therefore it's not saving. Now it's all good.


All times are GMT. The time now is 01:05 AM.

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.01919 seconds
  • Memory Usage 1,730KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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