Log in

View Full Version : cant submit scores


just77me
01-20-2011, 02:46 PM
Hi there we have the problem that there is a problem with the security token - no games cant be saved - do you know now we can fix the problem?

thank you

Hippy
01-21-2011, 12:37 AM
If you are using vbAdvanced Portal and your /index.php is not the original one from vBulletin,
you have to edit your alternate index.php:

open index.php

At the very beginning of the File, right after:
----------------------------------------------------------
<?php
----------------------------------------------------------

you have to insert:
----------------------------------------------------------
// 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
----------------------------------------------------------


Otherwise your scores won't be recorded :)

found in your zip arcade you downloaded ...

just77me
01-21-2011, 01:41 PM
Where do i have to post this code?

we run the new vbulletin CMS

root

root/forum

root/forum/content.php = startpate

open the site redirected to root/forum/content

at which .index.php do i have to put in this code pleasE?

--------------- Added 1295624676 at 1295624676 ---------------

if i play now it logs me out automaticly, whats wrong there?

--------------- Added 1295625771 at 1295625771 ---------------

okay installed it in the forum root but get error the most time and disconeced

Das Ergebnis wurde offenbar nicht vom zugeh?rigen Spiel ?bermittelt. Es wird kein Ergebnis gespeichert.

The Highscore was obviosly not from the right game submitted. No Result will be saved!

then disconeced from the forum!!!

any help please? urgent!

Hippy
01-21-2011, 10:41 PM
root/forum/index.php


Read these two posts:

https://vborg.vbsupport.ru/showpost.php?p=2135271&postcount=2

https://vborg.vbsupport.ru/showpost.php?p=2137337&postcount=8

These will solve the problem.