vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Tetris v2.1 Addon - The Tetris King! (https://vborg.vbsupport.ru/showthread.php?t=42317)

John 08-15-2002 04:43 PM

You heard the man - do it!

Lesane 08-15-2002 04:47 PM

Or use a normal query:

PHP Code:

$leaderboard mysql_query("SELECT userid FROM arcade WHERE game = 'tetris' ORDER BY score DESC") or die("Unable to complete query"); 


kypdurron 08-15-2002 04:47 PM

well...if I do that (like I mentioned a bunch of posts ago), I get
a blank page...

I do an include("global.php");
is that what you meant?
:confused:

michealo 08-15-2002 04:56 PM

Quote:

Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: $award = mysql_query("SELECT userid FROM arcade WHERE game = 'tetris' ORDER BY score DESC") or die("Unable to complete query");
mysql error: You have an error in your SQL syntax near '$award = mysql_query("SELECT userid FROM arcade WHERE game = 'tetris' ORDER BY s' at line 1

mysql error number: 1064

Date: Thursday 15th of August 2002 11:07:01 AM
Script: http://www.psx2central.com/forums/fo...dmin/query.php
Referer: http://www.psx2central.com/forums/ad...p?action=enter
i get this error when running that thry mySQl query
:(

kypdurron 08-15-2002 05:03 PM

I did what you suggested, and I get:

unable to complete query.

can you just post the first few lines of your showthreads.php.

Was this file changed between vb2.2.5 and vb2.2.6?

Just wondering..

Kars10 08-15-2002 05:07 PM

Quote:

Originally posted by JohnWarwick
michealo and Minifreunde -

Change
#########################

$leaderboard = $DB_site->query_first

#########################

to
#########################
$leaderboard = $DB_site->query
#########################

And tell me if it works

Hello John, i test it....but the same Error!! :(

Lesane 08-15-2002 05:38 PM

John, why do you place that query in showthread.php? U could also put it by the rest. If you put it by the rest then $DB_site is already globalised.

admin/functions.php:

find:

PHP Code:

$datecut time() - $cookietimeout

Put after it:

PHP Code:

// King of Tetris Hack, by John Warwick
    
$leaderboard $DB_site->query_first('SELECT userid FROM arcade WHERE game = "tetris" ORDER BY score DESC');
$kingid $leaderboard['userid'];
    if (
$post[userid] == $kingid) {
    
$crown '<img src="https://vborg.vbsupport.ru/images/crown.gif" alt="King of Tetris!" />';
} else {
    
$crown '';



DestyNova 08-15-2002 05:55 PM

Lesane, I didnt try JohnW's instruction yet but I try your suggestion and I got this error:

PHP Code:

Fatal errorCall to a member function on a non-object in C:\Network\Apache2\htdocs\test\admin\functions.php on line 72 

I didnt edit showthread. php yet

DestyNova 08-15-2002 05:57 PM

I edit the showthread and error is same (function error)

DestyNova 08-15-2002 05:59 PM

Sorry for post three times but I try JohnW and it works ??


All times are GMT. The time now is 04:13 AM.

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.01547 seconds
  • Memory Usage 1,743KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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