Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How to fix "Security Token" Error for vBulletin 4.x.x Details »»
How to fix "Security Token" Error for vBulletin 4.x.x
Version: , by MikalMirkas MikalMirkas is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-24-2009 Last Update: Never Installs: 0
 
No support by the author.

Now PLEASE, stop making threads about it.
This is how to fix it:
Go to your forum's directory, and find the
Code:
index.php
file. Right after the
Code:
<?php
, add this:
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 
Credit to Stangger5, and MrZeroPage.

Edit (LOL, this thread got replies? >_>):
Quote:
Originally Posted by Moey View Post
Thanks

By the way.. you cant really blame a ton of people asking how to fix this..its not like its our responsibility..its the developers..not ours ..
README.txt is there for a reason. I have saw a LOT of these threads pushing out the actual issues on hand. kthx

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-14-2010, 08:58 PM
TriAxis TriAxis is offline
 
Join Date: Dec 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TriAxis View Post

I don't get the parsing error that c.c. is getting, I am getting the "Undefined index" errors only that CrosseyedGamer is getting.

Thanks for the suggestions.
Any one having this "Undefined index:" error?

Still getting the same error after replacing this code multiple times and even replacing the index.php again.

Anyone else?

also.... this error only appears when you load the site from the root. www.domain.com/ Once you get to the site and go to the forum or blog or anything you do not see the error.....until you finish an arcade game.... then it shows up on that page also.
Reply With Quote
  #23  
Old 04-18-2010, 11:12 PM
rollerman rollerman is offline
 
Join Date: Oct 2009
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK...what am I doing wrong?

Here's my index.php, which is in my root (httpdocs):

HTML Code:
<?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 
 
 
** File edited, removed default vBulletin code ***
This worked before I put in PL4 a couple of weeks ago. Is it possible that patch is causing this?
Reply With Quote
  #24  
Old 04-22-2010, 01:11 AM
Texas_Dawg Texas_Dawg is offline
 
Join Date: Sep 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by c.c. View Post
And I clearly said that if I change the index.php I get this error when it trys to save the highscore.

Parse error: syntax error, unexpected T_DEC, expecting T_STRING or T_VARIABLE or '$' in /home/highdefj/public_html/index.php on line 58
Did you figure this one out?

I have the same problem.
Reply With Quote
  #25  
Old 04-24-2010, 06:22 PM
TriAxis TriAxis is offline
 
Join Date: Dec 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good luck...

I posted the same basic issue 3 weeks ago and no one has had any suggestions or response.
Reply With Quote
  #26  
Old 04-28-2010, 10:50 AM
rollerman rollerman is offline
 
Join Date: Oct 2009
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ten days and no response.

I think it's time that this mod is declared unsupported.

A shame, because it's a good one, but clearly the developers (and everyone else) have abandoned it.
Reply With Quote
  #27  
Old 05-02-2010, 04:10 AM
TriAxis TriAxis is offline
 
Join Date: Dec 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok here is the latest breakthrough having to just guess at things and try things pieced from other posts.

The ONLY way I could get the text to stop appearing at the top of the front page of my site was to finally add all of the code for the index.php file to the END of the file and not the top. That made the text go away at the top of the page, but the security token error returned.

I then went to the lines just above where I added all the code and changed the CMS default script form content.php to forum.php. Now this is still unacceptable because I want the content.php to be the default and not the forums.php. But the system now works with no errors. It saves my games and no text at the front page or score submit page. So does that mean the problem is in one of the content.php files? Or in the index.php code and how it interacts with the content.php?

I have tried many different changes with no luck. I have tried putting the code in the context.php file in both the root and the vb folders. I have tried to comment out certain lines of code with no luck.

So for now if I want this to work with no errors I have to leave the default page to be the forums front page. I'd rather not. So it will stay broken for now.
Reply With Quote
  #28  
Old 05-02-2010, 08:05 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is not unsupported, while v2.7.1+ is to be finished I am trying hard to fix things that came up with vB4 and using its own index.php to direct to portal or forum.
There is no hook in index.php or any other place where right from the start I can implement the needed code, very bad.
I think I need to contact Jelsoft and request a hook there.

I am still irritated that this error does NOT appear on my testsite ...

Maybe anybody let me check this "on site" ? Please contact me via PM and refer to this thread, thanks
Reply With Quote
  #29  
Old 05-02-2010, 11:10 AM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put this in index.php
PHP Code:
if($_GET['act'] == 'Arcade')
{
    require(
'forum.php');

Thou a hook in index.php would be good in general.

As for your test site; have you tried setting the default page to be the cms not the forum?
Reply With Quote
  #30  
Old 05-02-2010, 01:17 PM
tlwwolfseye's Avatar
tlwwolfseye tlwwolfseye is offline
 
Join Date: Dec 2008
Location: Germany
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From what I can see Arcade is still very buggy with vB4 so its maybe better to wait installing this, right ?
Reply With Quote
  #31  
Old 05-03-2010, 02:57 AM
TriAxis TriAxis is offline
 
Join Date: Dec 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Carnage- View Post
I put this in index.php
PHP Code:
if($_GET['act'] == 'Arcade')
{
    require(
'forum.php');

Thou a hook in index.php would be good in general.

As for your test site; have you tried setting the default page to be the cms not the forum?
I tried this suggestion tonight and it did not fix my issues. Either text across the top of the site, or the token error.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04704 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete