View Full Version : vB Tetris v2.1 Addon - The Tetris King!
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 :D
michealo
08-15-2002, 11:24 AM
great idea
gonna install it later, thanks
xxskullxx
08-15-2002, 11:31 AM
Works great on my test board! :) Good work!
* xxskullxx still waiting patiently ;)
Floris
08-15-2002, 11:34 AM
If this is all tetris related .. why not post in the tetris main thread? ..
You're right, although this is a hack, I suppose it should be with the tetris thread.
In the future I'll post it all under one thread :( :banana:
NexDog
08-15-2002, 11:52 AM
This isn't working on my board. :(
Originally posted by NexDog
This isn't working on my board. :(
That's because for some reason your highest scorer doesn't have a user id - delete that record, and it should work.
kypdurron
08-15-2002, 12:06 PM
I think this does belong on a different thread as its a different hack..
anyway, I get the following error:
Fatal error: Call to a member function on a non-object in ../forums/showthread.php on line 7
I'm using version 2.2.5...
any ideas?
I added a "require(./global.php);" before, but that just
leaves the page blank..
Originally posted by kypdurron
I think this does belong on a different thread as its a different hack..
anyway, I get the following error:
Fatal error: Call to a member function on a non-object in ../forums/showthread.php on line 7
I'm using version 2.2.5...
any ideas?
I added a "require(./global.php);" before, but that just
leaves the page blank..
What is your line 7?
NexDog
08-15-2002, 12:11 PM
Yep, did that and it works. Clicks install for the 4th time today. :)
DestyNova
08-15-2002, 03:27 PM
LOL! thanks JohnW :thumbup: I m going definetly use it! :banana:
michealo
08-15-2002, 03:55 PM
JW, with this step
In showthread.php
2. FIND:
###########################
// words to highlight from the search engine
###########################
AND ABOVE IT ADD:
###########################
$leaderboard = $DB_site->query_first('SELECT userid FROM arcade WHERE game = "tetris" ORDER BY score DESC');
$kingid = $leaderboard['userid'];
###########################
i get this error
Fatal error: Call to a member function on a non-object in /home/sites/home/web/forums/showthread.php on line 6
ONLY when clicking on links that contain the "king tetris" member. everything else seems to be fine
Kars10
08-15-2002, 04:04 PM
@ Michealo, the same error i get!!
John is watching my showthread.php...hope it works!! :confused:
xxxsaint
08-15-2002, 04:17 PM
i think that saying this hack needs to go under the tetris thread would be like saying every store related add on for lesane's store needs to go in that thread.
Thanks for the great hack , and this , the great ADD ON !! :thumbsup:
michealo and Minifreunde -
Change
#########################
$leaderboard = $DB_site->query_first
#########################
to
#########################
$leaderboard = $DB_site->query
#########################
And tell me if it works
michealo
08-15-2002, 04:35 PM
no good im afraid
Fatal error: Call to a member function on a non-object in /home/sites/home/web/forums/showthread.php on line 7"
but now no links work, every thread i click gives that error
kypdurron
08-15-2002, 04:37 PM
I did that and still didn't work. I think the problem is that it doesn't know what $DB_Site is, not the query itself.
I am using 2.2.5. Is there an "include" command somewhere on your showthread.php before this query?
here is my first few lines of my showthread.php:
<?php
error_reporting(7);
if ( isset($goto) and ($goto=='lastpost' or $goto=='newpost')) {
$noheader=1;
}
//$leaderboard = $DB_site->query("SELECT userid FROM arcade WHERE game = 'tetris
' ORDER BY score DESC");
//$kingid = $leaderboard['userid'];
// words to highlight from the search engine
I commented out your code cause it causes the error right now.
Lesane
08-15-2002, 04:42 PM
You need to global the function: "$DB_site".
You heard the man - do it!
Lesane
08-15-2002, 04:47 PM
Or use a normal query:
$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
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/forums/admin/query.php
Referer: http://www.psx2central.com/forums/admin/query.php?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
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:
$datecut = time() - $cookietimeout;
Put after it:
// 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:
Fatal error: Call 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 ??
michealo
08-15-2002, 06:14 PM
i tried both methods (JW and lesane's above code) and get the same error
Originally posted by Lesane
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.
[/php]
Chen said to!
Kars10
08-15-2002, 07:07 PM
I test both versions. The Code frome Lesane built the same error in showthread!! :confused:
To be honest with you, I'm losing the plot of this thread. I don't know who this works for and who it doesn't work for.
So far, most people with problems are on vB 2.2.5 - if you are having problems with this hack, you can find me on MSN under the username of "John@eovie.com"
Wll dont lose plot m8 it works fine on 2.2.6 and im a novice by all standards and i pulled it off eventually.
All in all top thanks to all involved.
Kars10
08-15-2002, 08:49 PM
I meet you in Msn! :)
DestyNova
08-15-2002, 08:53 PM
Um John.evoie, are you JohnW?
Lesane
08-15-2002, 09:05 PM
Originally posted by Lesane
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:
$datecut = time() - $cookietimeout;
Put after it:
// 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 = '';
}
I just tested the code above for the 2nd time on a clean vbulletin and it works like a charm! :banana:
Schorsch
08-16-2002, 01:19 AM
hi,
installed after john's installation guide, seems to work fine :banana: thanks john !!
@you guys with the error message, when exactly does this error appear ?
Ryangel
08-16-2002, 02:26 AM
hmm crown does not show. *starts looking at code again ..*
nice job, my leader has 99,845 points, damn, i cant touch it, lol
Kars10
08-16-2002, 05:40 AM
@ Lesane, but the fact is i don?t use a clean version...
All other stuff works great for me. The same to Michealo. I PM with him yesterday. The same Errors instead.
@ Schorsch, wenn ich das Forum aufmache kein Fehler. Aber sobald ich in einen Thread reingehe(also in die Showthread.php)-parse Error in line 7. Bei Michealo Line 6. Also muss doch irgendwas nicht stimmen....:confused:
kypdurron
08-16-2002, 10:42 AM
Mine does not work either.
I have installed a series of hacks, here are the ones I can remember:
custom title, picture on post, link to photo album on post, I'm not
sure if avatar on post is standard or not anymore :) .
For the ones that are not working, are you using any of those hacks?
Kars10
08-16-2002, 11:28 AM
@ Kypdurron, no i?m using not one of those hacks.... :confused:
I think it?s a other Problem. If you got a couple of hacks installed and all work fine, whats the point that specially this one solves a error in the showthread.
Question: can anybody have a look at my showthread.php please?? Maybe its a tiny little mistake in the code..i don?t know.
But the Crown-Thingi whould be pretty cool! ;)
NexDog
08-16-2002, 12:33 PM
Worked here first time. Of course I forgot to re-upload showthread.php first. ;)
Originally posted by NexDog
Worked here first time. Of course I forgot to re-upload showthread.php first. ;)
And you're on vB 2.2.6 right?
You know, Chen should install something so we can all specify the version of vB we're running!
Lionel
08-16-2002, 08:16 PM
I am using 2.21. I am able to play tetris, but after a game, I am unable to display the comment. I get this error on top of the page
Warning: MySQL: A link to the server could not be established in /var/www/forums/tetris.php on line 41...telling me that the score is too low, and it still records it.
it seems that this hack only really works well with 2.2.6, for some unknown reason...
Kars10
08-16-2002, 08:37 PM
@ John, can you please have a look at my showthred i send to you. You the right guy for this. I?m not so good with php-errorreading...have you read my question in the Main-Tetris Thread?? how can i put the Topscore in the Index.php? Like Tetris-Topscore: XXXX (by XXX). Thanks man. :)
I have no idea why your showthread.php is doing what it is. It
just doesn't seem to like any versions of vB below 2.26!
I've already produced a hack that puts a mini leaderboard on
the front page, but I'm not sure whether I should release it
or not...
= = = Original message = = =
Hello john.eovie,
Minifreunde has just replied to a thread you have subscribed
to entitled - vB Tetris v2.1 Addon - The Tetris King! - in the
Full Releases forum of vBulletin.org Forum.
~~~~~ NEW ~~~~~
New at vBulletin.org!
You can now reply to the thread by replying to this message.
All you need to do is to make sure this code appears in the e-mail
subject:
You should also remove this text to ensure your reply is readable
by other forum users.
~~~~~ NEW ~~~~~
Here are the contents of the post:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ John, can you please have a look at my showthred i send to
you. You the right guy for this. I~m not so good with php-errorreading...have
you read my question in the Main-Tetris Thread?? how can i put
the Topscore in the Index.php? Like Tetris-Topscore: XXXX (by
XXX). Thanks man. :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This thread is located at:
https://vborg.vbsupport.ru/showthread.php?threadid=42317&goto=newpost
There may be other replies also, but you will not receive any
more notifications until you visit the board again.
Yours,
vBulletin.org Forum team
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:
To unsubscribe from this thread, please visit this page:
https://vborg.vbsupport.ru/member2.php?action=usub&threadid=42317
To unsubscribe from ALL threads, please visit this page:
https://vborg.vbsupport.ru/member2.php?action=usub&type=allthread
__________________________________________________ _________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
I have no idea why your showthread.php is doing what it is. It
just doesn't seem to like any versions of vB below 2.26!
I've already produced a hack that puts a mini leaderboard on
the front page, but I'm not sure whether I should release it
or not...
NexDog
08-16-2002, 11:30 PM
Yea, I just recently upped to 2.2.6. Leaderboard on the home page is no good for me as it is a hosting forum. ;)
Lesane
08-17-2002, 07:09 AM
Originally posted by john.eovie
it seems that this hack only really works well with 2.2.6, for some unknown reason...
It works perfect on my board with vb 2.2.2 installed and i also installed it on my test board with vb 2.2.4. :smoke:
Kars10
08-17-2002, 09:10 AM
Originally posted by Lesane
It works perfect on my board with vb 2.2.2 installed and i also installed it on my test board with vb 2.2.4. :smoke:
But what can the Problem be, that specially in my case the crown thing dosent work??
I mean some others have the same Problems. I am doing exactly what the Hack-Manual says.
All other hacks ive installed work fine for me.
Can somebaody have a look at my file? :bored:
Lanigironu
08-20-2002, 06:01 PM
I am running a vB 2.2.6, but this hack doesn't work for me. The Tetris works perfectly, and records everything right, and the code is there, but the crown doesn't show.
I tried Lesan's way and kept getting an error, I don't know what to do.
I don't get any errors right now, but the crown isn't showing.
Courage
08-20-2002, 06:34 PM
I'm running vb 2.2.2 and I get a blank page when I want to see a thread :(
IO also haveproblems with the tetris add-on. I can play it, but I get this message:
"Unfortunately your score wasn't good enough to get onto the leaderboard."
- but the score is recorded. + I cannot add comments :(
Lanigironu, what version of php is your server running?
Originally posted by Courage
I'm running vb 2.2.2 and I get a blank page when I want to see a thread :(
IO also haveproblems with the tetris add-on. I can play it, but I get this message:
"Unfortunately your score wasn't good enough to get onto the leaderboard."
- but the score is recorded. + I cannot add comments :(
Never heard of that before... probably an installation mistake.
Courage
08-20-2002, 07:00 PM
Never heard of that before... probably an installation mistake.
yep... it is a very complicated hack ! :(
I have a lot of hacks applied on my board...
And ALL work !
Originally posted by Courage
yep... it is a very complicated hack ! :(
I have a lot of hacks applied on my board...
And ALL work !
1. I was talking about the original tetris hack not being installed, not this one.
2. I'm no longer supporting any versions of vB lower than 2.2.4 - if I find a fix for earlier versions, I'll post it.
Lanigironu
08-20-2002, 11:28 PM
The PHP version we have on the server is 4.2.2.
drives fast
08-21-2002, 03:25 AM
for the vb2.2.5 users....here is what works.....
in admin/functions find:
$datecut = time() - $cookietimeout;
place under it this:
// King of Tetris Hack, by John Warwick
global $DB_site;
$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="http://www.yoursite.com/forum/images/crown.gif" alt="King of Tetris!" />';
} else {
$crown = '';
}
the
global $DB_site;
was missing from Lesane's fix
p.s.
don't forget to set your url to the crown gif
Or use:
$crown = '<img src="{ imagesfolder}/crown.gif" alt="King of Tetris!" />';
(Without the space between { and imagesfolder})
drives fast
08-21-2002, 05:17 PM
yea....I made that change in mine too but forgot to document it when I posted
Lanigironu
08-21-2002, 06:15 PM
Atill doesn't show.
Lanigironu
08-21-2002, 06:56 PM
Ok, I fixed it. It was a screw up on my behalf. I use the contract posts hack on my board, and I added $crown to the contracted view only by mistake.
kypdurron
08-21-2002, 09:11 PM
I still get the same erros on showthreads.php, anyone else?
drives fast
08-21-2002, 09:42 PM
if you are using vb2.2.5 and have removed the hack completely from both admin/functions.php and showthread.php and do it the way shown above (which doesn't have any code added to showthread.php) it will work
I got it to work on mine with that code
kypdurron
08-23-2002, 08:25 PM
You are right! it works great now!
I changed it so it auto takes you to the game.
Thanks again
I have PHP 4.2.2 and run 2.2.6 and I have https://vborg.vbsupport.ru/showthread.php?s=&threadid=42293 installed, will THIS hack work for me?
Originally posted by Tha Rock
I have PHP 4.2.2 and run 2.2.6 and I have https://vborg.vbsupport.ru/showthread.php?s=&threadid=42293 installed, will THIS hack work for me?
Well, you're running exactly the same setup as me, and it works on my board.
Put it this way - most of the cases where it hasn't worked for a person were due to "installation mistakes". :|
Courage
08-24-2002, 12:31 AM
still this stupid thing.. I get the blank pages when accesing showthread.php
The tetris is now working, but NOT the ADD-ON ;(
I'm running vb 2.2.2
Courage
08-24-2002, 12:38 AM
I made it !!!
Is working now.!!!
For 2.2.2 you must use the instructions for 2.2.5
https://vborg.vbsupport.ru/showthread.php?postid=288147#post288147
Thank you drives fast :)
P.S. NO changes made in showthread.php !!!!
installed, working, great :)
Glad to hear it's working well for both of you :)
and it's pretty cool apart from the fact that I have some members that are very bored and they're king and not me :(
Courage
08-24-2002, 01:00 AM
Any ideea how to implement this addon in the Leaderboard Results ?
drives fast
08-24-2002, 02:00 PM
Courage,
I cannot take credit for all of that.....Lesane came up with that new method.....I only added the global to it to get it to work with the other version but glad I could help
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.