Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB4 vBCMS and high score saving Details »»
vB4 vBCMS and high score saving
Version: , by Amiga Harrison Amiga Harrison is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-16-2010 Last Update: Never Installs: 0
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-19-2010, 10:38 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 06-22-2010, 05:29 PM
dodgechargerfan dodgechargerfan is offline
 
Join Date: Aug 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 06-23-2010, 03:40 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dodgechargerfan View Post
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?
Reply With Quote
  #5  
Old 06-23-2010, 07:06 PM
BF777 BF777 is offline
 
Join Date: Jan 2007
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-23-2010, 07:57 PM
dodgechargerfan dodgechargerfan is offline
 
Join Date: Aug 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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
Reply With Quote
  #7  
Old 06-27-2010, 11:13 AM
smelly smelly is offline
 
Join Date: Jun 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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.
Reply With Quote
  #8  
Old 07-07-2010, 03:33 PM
dodgechargerfan dodgechargerfan is offline
 
Join Date: Aug 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smelly View Post
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?
Reply With Quote
  #9  
Old 08-29-2010, 06:40 PM
dodgechargerfan dodgechargerfan is offline
 
Join Date: Aug 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 08-29-2010, 07:34 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:03 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.07453 seconds
  • Memory Usage 2,314KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete