vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   The index page thing (https://vborg.vbsupport.ru/showthread.php?t=170430)

FUSE322 02-13-2008 09:44 PM

The index page thing
 
Ok so i have changed the name of my index.php to forum.php and when i go into information i get this
https://vborg.vbsupport.ru/external/2008/02/23.jpg

so i add the text to the top of my forum.php(im guessing i add it there because it says add it to index.php and forum.php is my index.php)

and when i play a game it trys to take me to index.php

i think this might be a different problem then the games scoring.

MrZeropage 02-14-2008 08:37 AM

if is says "index.php" it does mean "index.php" - as you r can read before, the script detects that you have changed your index.php to forum.php...

so adapt your index.php and everything will be fine

FUSE322 02-14-2008 10:49 AM

so what. i have to put my forum.php file back to index.php for this to work?

MrZeropage 02-14-2008 12:48 PM

No, you just have to follow the instructions as told in AdminCP -> Arcade -> Information

Edit index.php (yes, the actual, current index.php, no matter where this file comes from, what you renamed in the past ect.) and everything will work fine :)


It is because games are hardcoded to send their results to index.php so whatever the content of this file on your site is, just edit it

FUSE322 02-14-2008 01:21 PM

ok so i added
PHP Code:

// 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 

into my forum.php now all i need to do is get it to go to forum.php not index.php after you finish a game

Mark.B 02-14-2008 06:12 PM

Quote:

Originally Posted by FUSE322 (Post 1442899)
ok so i added

into my forum.php now all i need to do is get it to go to forum.php not index.php after you finish a game

No, don't add it to forum.php, add it to index.php...whatever index.php is on your site, add that code to the top of it.

The games are hard coded with index.php in them and it cannot be changed, so you have to do this workaround. You cannot make them submit to forum.php.

FUSE322 02-14-2008 07:43 PM

well forum.php is my index.php so i guess i have to change it back

MrZeropage 02-14-2008 08:31 PM

Man, you drive me crazy !! :mad:

JUST DO WHAT I TOLD BEFORE - open the file that currently is your index.php and don'T care about anything else. Add the code there, and everything will be fine.


No matter whatever you do - this code has to be inside index.php - no matter what its content is ...


forum.php is the former, original vB-file "index.php" <-- fine, don't touch!
index.php is any other file from a portal or something <-- edit THIS ONE as its name is "index.php" now



The instructions in AdminCP -> Arcade -> Information told you this, I told you in this thread - why not simply do it ? Don't think too much, just follow the instructions...


:)

FUSE322 02-15-2008 10:41 AM

i dont have a index.php at all to do this we would have to put the forum in a forum folder so we have decided to get rid of the arcade what we have is

index.html(for a home page)
home.php (for the portal page)
forum.php(for the actual forum)

MrZeropage 02-15-2008 03:45 PM

the arcade needs one index.php to send the score to. If you don't have one, you must create one.

But I don't see any logical point why you renamed index.php to forum.php in your configuration, this makes no sense.


All times are GMT. The time now is 12:45 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.01056 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete