I ran into some issues with the code that was to be used in the vb index.php. I'm not sure why I diddnt recieve errors before about the comparison of undeclared variables before but i did on my new php install (5.2). I added a few checks into the code to fix this.. Also a few other small errors i fixed nothing huge...
Code:
Put this in the index.php right after the <?php tag.
-------------------------
<?php
// ibProArcade
if(isset($_POST['module']) && $_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;
}
}
if (isset($_GET['act']))
{
$act = $_GET['act'];
}
else
{
$act = '';
}
if(isset($_GET['autocom']))
{
$autocom = $_GET['autocom'];
}
else
{
$autocom = '';
}
if(isset($_GET['showuser']))
{
$showuser = $_GET['showuser'];
}
else
{
$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