ibProArcade and VB CMPS - Not Recording Score

RedHatcc

New Member
Hi, im having a problem but i think i have it narrowed down to what is wrong. I use vbCMPS and ibProArcade and on the home page it looks like abcdefg.com and when you go to my forums it looks like abcdefg.com/findex.php (i had to change the index to findex).

You can see that here Call of Duty 5 World at War Glitches Tips Forum and Infomation

What is happening is you can play in the arcade fine but when it saves the score it redirects you back to the home page (an option i use in vbseo, any dead links it will redirect you to the home page)

any suggestions on getting the ibProArcade to look at findex.php instead of index.php

i think that is the problem? thanks.
 

RedHatcc

New Member
Found answer.



If you use a different index.php as your forums default one, edit the index.php and right at the top right after the ?php thing paste this.


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


Cheers!
 
Top