vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   v3 Arcade - Games Arcade & Challenge System [vB 3.0.3] (https://vborg.vbsupport.ru/showthread.php?t=60377)

Wachtmeister 04-23-2005 08:14 PM

Quote:

Originally Posted by rjordan
Yes, you will have to reinstall just as you would most other hacks.

and my currently installed games?

rjordan 04-23-2005 08:16 PM

They will remain as will all scores, play counters, etc.

Only do the file edits, though.

Brandon Sheley 04-24-2005 06:44 AM

i ran into the blank page problem, but i had made a test site, and just added each arcade_ template,, acording to the isntall it did instlal them, but in the styles& templates, they didn't show up ?? any ideas why that happen ? i've isntalled this ona few skins and a few test sites and never ran into this problem,, and looking though this thread i seen other ppl withthat problem, anyways, to fix it i just added each templates manually, and all works great,, maybe you can include a file that a user who runsinto this can look at to transfer the templete files over,,hope soem of this makes sinse, its getting alittle late for me, and i've had a few drinks :-"..lol anyways thx for the mods, its awsome and the add-ons are sweet :)

illusions 04-24-2005 04:10 PM

How do i install new games? .. where would i place the game php file?

YLP1 04-24-2005 06:31 PM

Quote:

Originally Posted by rjordan
v3arcade deleted user avatar fix(?)

After you delete a user, I have found that if you (or more importantly, a search spider) tries to access the stats link for that deleted user, you likely will get something like this:

Code:

Database error in vBulletin 3.0.7:
 
Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =
mysql error: 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 '' at line 5
 
mysql error number: 1064

There does not seem to be a check built-in to see if a user is actually a valid user. I have hopefully found a fix for this with the following:

Find:
PHP Code:

 $activitycount $DB_site->query("
         SELECT gamesessions.*, games.title FROM " 
TABLE_PREFIX "gamesessions AS gamesessions
         LEFT JOIN " 
TABLE_PREFIX "games AS games ON gamesessions.gamename = games.shortname
         WHERE userid=
$userid AND valid=1 AND $sessionclause GROUP BY sessionid ORDER BY finish DESC"); 

and above this add:
PHP Code:

 if ($user['username']=="") {
$idname $vbphrase['user'];
eval(
print_standard_error('error_invalidid'));


I suspect that the scores for the deleted user might still be there after the user is deleted. If this is correct and vBulletin allows someone else to get this user ID, they might by default get all of the high scores for the games by the previous ID owner. Looking into that.

EDIT: It looks like vB does not recycle user IDs. This SHOULD work to eliminate the error.

I applied the fix for this error but this is the error my arcade.php returns:

Code:

PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
myISP\LPSForum\arcade.php on line 1664

I need this fix because this is the error that my members are getting:


This one:

Code:

Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM vb3_user AS user
LEFT JOIN vb3_avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN vb3_customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =


and This one:

Code:

Invalid SQL:
SELECT gamesessions.*,user.username FROM vb3_gamesessions AS gamesessions
LEFT JOIN vb3_user AS user ON gamesessions.userid = user.userid
WHERE vb3_gamesessions.valid=1 AND gamesessions.sessiontype IN (1,2) ORDER BY gamesessions.finish DESC LIMIT 0,1

mysql error: Unknown table 'vb3_gamesessions' in where clause

mysql error number: 1109

I am fairly new to PHP and VB and am quite lost on how to fix these two errors.

Any help is greatly appreicated.
Robin

rjordan 04-24-2005 06:36 PM

Can you post the lines from just before the fix as applied to a few lines after?

YLP1 04-24-2005 06:42 PM

Quote:

Originally Posted by rjordan
Can you post the lines from just before the fix as applied to a few lines after?

Is this what you want to see? The fix code is bolded:

if
Code:

($userid==0) {
                print_no_permission();
        }
        $user = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid");
                        if ($user['username']=="") {
                        $idname = $vbphrase['user'];
                        eval(print_standard_error('error_invalidid'));
        }

        $activitycount = $DB_site->query("
                                                                                SELECT gamesessions.*, games.title FROM " . TABLE_PREFIX . "gamesessions AS gamesessions
                                                                                LEFT JOIN " . TABLE_PREFIX . "games AS games ON gamesessions.gamename = games.shortname
                                                                                WHERE userid=$userid AND valid=1 AND $sessionclause GROUP BY sessionid ORDER BY finish DESC");
        $played = $DB_site->num_rows($activitycount);
        $i = 1;

And thank you so much for helping me with this.

rjordan 04-24-2005 06:59 PM

Quote:

($userid==0) {
print_no_permission();
}
Should be:
Quote:

if ($userid==0) {
print_no_permission();
}
Otherwise, it looks right.

As for your second MySQL error, is your 'vb3_gamesessions' table in your database? Is that the right table name?

YLP1 04-24-2005 07:05 PM

Quote:

Originally Posted by rjordan
Should be:

Otherwise, it looks right.

As for your second MySQL error, is your 'vb3_gamesessions' table in your database? Is that the right table name?

yep I had this. It just cut off when I copied it.

Code:

if ($userid==0) {
                print_no_permission();
        }
        $user = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid");
                        if ($user['username']=="")

I confirmed that I do have a table named vb3_gamesessions

rjordan 04-24-2005 07:12 PM

I just went to your arcade. I clicked on a few names, scores, etc., but cannot get an error. What are the users doing or clicking on when they get the error? Did you get the PHP error after putting in the fix I posted? Have you tried taking it out if that is the case?

It may be at the point of needing to see your arcade.php to do much more.


All times are GMT. The time now is 04:29 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.06500 seconds
  • Memory Usage 1,771KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete