Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Tetris v2.1 Addon - The Tetris King! Details »»
vB Tetris v2.1 Addon - The Tetris King!
Version: 1.00, by John John is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-14-2002 Last Update: Never Installs: 18
 
No support by the author.

This hack
What's this? Another tetris related hack?!

I'm afraid so! This hack will place a picture of a crown next to the username of the member with the highest score (in every one of their posts). When you pass the cursor over the crown, it says "King of Tetris!"


Compatibility issues
If you have my vB Tetris 2.1 hack installed, this hack will work for you.


Testing and installation version
This hack has been tested on a fresh install of vB 2.2.6 both locally and remotely. Should work on 2.x.x versions.


And finally...
Thanks to...
? DestyNova - for coming up with the idea!
? Chen - for pointing me in the right direction

Show Your Support

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

Comments
  #22  
Old 08-15-2002, 04:43 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You heard the man - do it!
Reply With Quote
  #23  
Old 08-15-2002, 04:47 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"); 
Reply With Quote
  #24  
Old 08-15-2002, 04:47 PM
kypdurron's Avatar
kypdurron kypdurron is offline
 
Join Date: Dec 2001
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #25  
Old 08-15-2002, 04:56 PM
michealo michealo is offline
 
Join Date: Jun 2002
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #26  
Old 08-15-2002, 05:03 PM
kypdurron's Avatar
kypdurron kypdurron is offline
 
Join Date: Dec 2001
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #27  
Old 08-15-2002, 05:07 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!!
Reply With Quote
  #28  
Old 08-15-2002, 05:38 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 '';

Reply With Quote
  #29  
Old 08-15-2002, 05:55 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #30  
Old 08-15-2002, 05:57 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I edit the showthread and error is same (function error)
Reply With Quote
  #31  
Old 08-15-2002, 05:59 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for post three times but I try JohnW and it works ??
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 02:16 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.04431 seconds
  • Memory Usage 2,317KB
  • Queries Executed 27 (?)
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
  • (4)bbcode_php
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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