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

dodgechargerfan 08-30-2010 02:26 PM

Thanks.
I just tried it and no change.

I even disabled all other products and plugins and tried again.
Then I ripped the arcade out and re-installed again - with all other plug ins disabled.

Still no saving of scores.

and just to be sure it wasn't my PC, I tried it from my work PC - a brand new one.
But then again, all of my users are seeing the problem. so, I knew it couldn't be my PC - but I checked anyway, just to be sure.

Hippy 08-30-2010 08:01 PM

do you use MSN ?
if so I can help you through it pm me info
I tested the fix I posted and applied it to so may peoples boards I can't count

you use a suite forum..
so I don't think the OLD index fix posted in the zip will work..
in the suite the index.php is calling the content.php
with the forum its calling the forum.php
I am sure it's confusing the arcade ..
you have to make a few changes the way things are called and it will work.

dodgechargerfan 11-02-2010 06:11 PM

I have officially given up.
Thanks for the offer of assistance via MSN, but I understand the steps. They just don't seem to want to work on my forum.

I followed your instructions about renaming files and changing calls, etc. from this post: ibProArcade Fixes

I then changed it all back, wiped arcade out completely- uninstalled product, deleted files, checked that the tables were gone everything..
Then re-installed and tried all of the edits again.

No go.

Thanks for all the work you've done, Hippy.
It just doesn't seem to want to work on my board - even with all other plugins disabled.

All the best.

Hippy 11-02-2010 11:37 PM

sorry to hear that you killed it.
the day you feel like having the arcade back , I am 99% sure I can get it to work for you ..
contact me any time. I can wak you through it..

8thos 11-03-2010 04:24 AM

It doesn't work for me anymore either dude. That php script used to work but not anymore.

Hippy 11-03-2010 08:07 PM

Quote:

Originally Posted by Octavius. (Post 2117365)
It doesn't work for me anymore either dude. That php script used to work but not anymore.

you need to edit and change a couple fies around.. I posted in the fixes thread how to do it .

rename your index.php to forum.php
then rename your forum.php to index.php
open up forum.php now and change include forum.php to index.php
now go into your admin cp and under options change Script Name for Forum Home Page from forum to index..

will work with out the index edit..

there is something else when you put your url /http://the8thlegion.com it automatically adds the forum.php..
you'll need to change that to index.php

I am not sure if your doing that via domain name or your hosts control panel

let me know if you need further assistance

8thos 11-04-2010 06:02 PM

Thanks Hippy I will try that when I get home!


All times are GMT. The time now is 06:07 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.01127 seconds
  • Memory Usage 1,794KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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