Last Game Section version: 1.2



Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
settings error
07-12-2008, 21:30
Post: #1
settings error
Whenever a user edits the game section settings. and then hits save. they then cant get into the game seciton..

as they are presented with this following error

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0,20' at line 10
Query:
SELECT DISTINCT g.gid, g.title, g.name, g.description, g.played, g.lastplayed, g.lastplayedby, g.rating, g.dateline, c.username, c.score, f.fid, r.rid, s.score AS pscore, u.username AS lastplayedusername FROM mybb_games g LEFT JOIN mybb_games_champions c ON (g.gid=c.gid) LEFT JOIN mybb_games_favourites f ON (g.gid=f.gid AND f.uid='1') LEFT JOIN mybb_games_rating r ON (g.gid=r.gid AND r.uid='1') LEFT JOIN mybb_games_scores s ON (g.gid=s.gid AND s.uid='1') LEFT JOIN mybb_users u ON (g.lastplayedby=u.uid) WHERE g.active='yes' ORDER BY g. LIMIT 0,20
Find all posts by this user
Firefox Winows Vista
08-12-2008, 15:15
Post: #2
RE: settings error
Hi,

the same error too!
You must edit manualy your database (mybb_user) 2 settings from nothing to zero. don
Visit this user's website Find all posts by this user
Firefox Winows Vista
09-12-2008, 20:45
Post: #3
RE: settings error
ok Smile cheers
Find all posts by this user
Firefox Winows Vista
10-12-2008, 22:54
Post: #4
RE: settings error
Right how do i disable that setting? the setting-menu how do i get that not showed?
Find all posts by this user
Internet Explorer 7 Winows Vista
11-12-2008, 00:42
Post: #5
RE: settings error
only i have deleted the link from the template.
Look in the templates from the gamesection, than you find this.
Visit this user's website Find all posts by this user
Firefox Winows Vista
19-12-2008, 19:16
Post: #6
RE: settings error
The default settings of the users has to be zero, that's right.

Online - Urbanus
Visit this user's website Find all posts by this user
Firefox Linux Ubuntu
23-12-2008, 23:08
Post: #7
RE: settings error
Can somebody please explain clearly how to sort this SQL error out, and how to disable the settings menu?

Cheers.
Find all posts by this user
Firefox Windows XP/2003
24-12-2008, 00:25
Post: #8
RE: settings error
Maybe it's better to warn your users about this bug in the software.

Otherwise open games.php and find:
PHP Code:
        //Test user
        
if($mybb->user['uid'] == 0)
        {
            
error_no_permission();
        }
        elseif(
$mybb->usergroup['canusercp'] == "no")
        {
            
error_no_permission();
        } 

Before add:
PHP Code:
        //Stop the program and explain why
        
die("This section is temporally closed because of a bug which makes the Game Section unusable."); 

Online - Urbanus
Visit this user's website Find all posts by this user
Firefox Linux Ubuntu
24-12-2008, 01:10
Post: #9
RE: settings error
I've fixed this bug, so you don't have to close this anymore Wink

Open games/global.php and find:
PHP Code:
    if($mybb->user['games_sortby'] == "0")
    {
        
$sortby $games_core->settings['sortby'];
    }
    else
    {
        
$sortby $mybb->user['games_sortby'];
    }
    
    if(
$mybb->user['games_order'] == "0")
    {
        
$order $games_core->settings['order'];
    }
    else
    {
        
$order $mybb->user['games_order'];
    } 

Replace with:
PHP Code:
    if($mybb->user['games_sortby'] == 0)
    {
        
$sortby $games_core->settings['sortby'];
    }
    else
    {
        
$sortby $mybb->user['games_sortby'];
    }
    
    if(
$mybb->user['games_order'] == 0)
    {
        
$order $games_core->settings['order'];
    }
    else
    {
        
$order $mybb->user['games_order'];
    } 

Online - Urbanus
Visit this user's website Find all posts by this user
Firefox Linux Ubuntu
Thread Closed 


Forum Jump: