PDA

View Full Version : Your forum's mainpage is not index.php


aacircle
22 Aug 2007, 16:27
Hello,

As per the title of this thread, my forum's main page is not index.php. It is forum.php. Do I go an edit this file with the following:

// 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_NOHTML);
$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

I have tried this, but get the following error when viewing my forum.php file:

Parse error: parse error, unexpected T_DO, expecting ']' in /home/mydomain/public_html/forum.php on line 12

I've looked at the above code, and all brackets are indeed closed.

Is the above a mandatory step? All my scores are recorded correctly.

Thank you.

EmpireZ
23 Aug 2007, 08:47
You would add it to the index page, not your forum page.
If cmps is your index, you would add it to the beginning of that page.

aacircle
23 Aug 2007, 11:21
Hmm... I tried using the text in the INFO - vbadvanced or another Portal file rather than the popup link in the admin cp and all worked fine.

Thanks to those who tried to help. Much appreciated.

SemperFideles
11 Sep 2007, 21:37
Hmm... I tried using the text in the INFO - vbadvanced or another Portal file rather than the popup link in the admin cp and all worked fine.

Thanks to those who tried to help. Much appreciated.
This solved the problem. The popup text has an incorrect character somewhere and doesn't work but the text file included in the zip file works fine.

da prez
14 Sep 2007, 18:35
yes the info in the pop-up box in arcade portion of admincp is incorrect somewhere.

MrZeropage
16 Sep 2007, 12:34
yes, sorry, although this should be fixed in current v2.6.3+ admincp

you have to edit index.php and not forum.php

tahanan
30 Sep 2007, 17:23
Hello,

I have the same setup but in adminCP/arcade/information it keeps telling me:

+++++++++
Notice:
Your forum's mainpage is not index.php - please make sure to adapt your /forum.php otherwise scores won't be recorded!You will find detailed instructions in the ibProArcade-archive: INFO - vbadvanced or other Portal.txt or in this popup-window
+++++++++

I already added the folowing:

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 :)


The other issue is that AFTER the game, the "scores cannot be retrieved"!

Any suggestiong here?

Merrillizer
04 Oct 2007, 18:08
Doesnt work. Typical.

bendengecti
24 Oct 2007, 00:50
it works for me,thanks.

SLY LS1
06 Nov 2007, 02:37
Here is a copy of the correct code, you need to place it in your index.php file as per instructions



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

popowich
12 Nov 2007, 00:57
please make sure to adapt your /nychat.php otherwise scores won't be recorded!

FYI

The current version of the arcade definately points you to the wrong file to edit.

(The correct answer, as stated above, is to edit your index.php)

-Raymond