vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   vB4 vBCMS and high score saving (https://vborg.vbsupport.ru/showthread.php?t=244726)

Amiga Harrison 06-16-2010 01:35 PM

vB4 vBCMS and high score saving
 
I'm running vB4 suite and have it configured so that the index.php file is moved to the root of the website. So the CMS is reached using forum.domain.com and the forums are reached using forum.domain.com/forum/

And I have the default script set in the index.php file to content.php

Where do I need to add the code to make saving high scores work? In index.php, content.php or forum.php?

I've tried adding it to each of these files in turn, but nothing works. In all cased when I test it I get the mesages "..could not save your high score".

I've noticed many other people asking exactly the same question and no one really giving a direct answer; instead saying the answers are in this forum, which they are obviously not clearly. I never had issues when running vBA and vB3.x and including the code in that CMS's index.php file, but it just won't work in vB4 with vBCMS.

Digital Jedi 06-19-2010 10:38 PM

They're not in the forum, they're in the ZIP file. The one that says INFO. So far I've not seen anyone say that it didn't work with vB4.

dodgechargerfan 06-22-2010 05:29 PM

I am seeing exactly the same thing and have been ever since trying to get the arcade going with vb4.
I've tried all three file edits, but I have just the index.php edited at the moment.

The exact message is"This score was not submitted from the game. Your score will not be saved."

I get the same from every game that I've been able to test. I even installed two new games just so I'd have games with no scores - to be sure my score would be my personal best as well as high score.

I've tried installing the plugin again as well. No change.

This is my index.php file:

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_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
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.0.4 - Licence Number

Any help at all will be greatly appreciated.

Digital Jedi 06-23-2010 03:40 AM

Quote:

Originally Posted by dodgechargerfan (Post 2057582)
I am seeing exactly the same thing and have been ever since trying to get the arcade going with vb4.
I've tried all three file edits, but I have just the index.php edited at the moment.

The exact message is"This score was not submitted from the game. Your score will not be saved."

I get the same from every game that I've been able to test. I even installed two new games just so I'd have games with no scores - to be sure my score would be my personal best as well as high score.

I've tried installing the plugin again as well. No change.

This is my index.php file:

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_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
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.0.4 - Licence Number

Any help at all will be greatly appreciated.

I'm not quite sure what the default index.php looks like for vB4, but I was pretty sure it included more information that that. Are you sure this is the index file for your website?

BF777 06-23-2010 07:06 PM

I've been having this same issue since upgrading to VB 4.03 a few months ago. My arcade is useless now and the support here is non-existent.

dodgechargerfan 06-23-2010 07:57 PM

Quote:

Originally Posted by Digital Jedi (Post 2057882)
I'm not quite sure what the default index.php looks like for vB4, but I was pretty sure it included more information that that. Are you sure this is the index file for your website?

I didn't include the entire file. I just wanted to show that I had the code shown in the INFO files right after the opening <?php

smelly 06-27-2010 11:13 AM

Quote:

Originally Posted by Digital Jedi (Post 2057882)
I'm not quite sure what the default index.php looks like for vB4, but I was pretty sure it included more information that that. Are you sure this is the index file for your website?

thats just the script upgrade for the arcade that has to be put into the index..it looks right..at a glance
I have the same problem and cant save high scores....and the zip folder doesnt show an info file.

--------------- Added [DATE]1277641745[/DATE] at [TIME]1277641745[/TIME] ---------------

well I went back through everything and redid all the script addons and it works now.

dodgechargerfan 07-07-2010 03:33 PM

Quote:

Originally Posted by smelly (Post 2060421)
well I went back through everything and redid all the script addons and it works now.

What did you do exactly?
Re-install?
Did you un-install first or just install over the existing installation?
If you did an uninstall, did you have to setup all of your games again as well or were they still there?

dodgechargerfan 08-29-2010 06:40 PM

Well, I've checked and tried everything - still no scores are saved.

arcade directory has correct permissions.

I have verified that the edit has been done to index.php - still no scores are saved.

I tried to add the code to content.php and forum.php (just in case) - still no scores are saved.

Backed out all edits and just did the index.php file again - still no scores are saved.

Uninstalled the product (and lost all games and settings) then re-installed and re-did edits - still no scores are saved.

Uninstalled product, deleted all the files and made sure the tables were removed from the database, then re-installed - still no scores are saved.

I'm not a complete noob to this stuff, but I'm not an expert either. I can dig into code if someone points my nose in the right direction.

There's something going on here beyond the edit to the index.php.

Hippy 08-29-2010 07:34 PM

if the index edit didn't work for you I posted in here what esle can be done..

https://vborg.vbsupport.ru/showthread.php?t=249120


All times are GMT. The time now is 04:59 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.01058 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete