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.5 | Leaderboard, Comments and High Score System v2.5 :) (https://vborg.vbsupport.ru/showthread.php?t=42293)

trilOByte 08-26-2002 04:40 PM

...showing *only* thier high score.

I think I've worked it out myself. This should list users in order ofg their high dcore on the leaderboard, but list them only once, allowing lower scoring users a foot on the leaderboard....

find *both* instances of...

PHP Code:

$leaderboard_q $DB_site->query("SELECT * FROM arcade WHERE game='tetris' ORDER BY score DESC LIMIT 10"); 

and replace them *both* with.....

PHP Code:

$leaderboard_q $DB_site->query("SELECT game,userid,comment,max(score) as score FROM arcade WHERE game='tetris' GROUP BY userid ORDER BY score DESC LIMIT 30"); 

Oh yeah, this also increases the displayed users from 10 to 30.

Thanks.

trilOByte 08-26-2002 04:56 PM

BTW - how can I reset the leaderboard?

I'd like to run regular "races" and periodically zero all the scores. I assume I'll need to run a query, anyone know what it is?

Thanks.

Ian 08-26-2002 05:02 PM

Quote:

Originally posted by trilOByte
BTW - how can I reset the leaderboard?

I'd like to run regular "races" and periodically zero all the scores. I assume I'll need to run a query, anyone know what it is?

You could just go in phpMyAdmin and empty the 'arcade' table.

portion 08-26-2002 05:09 PM

can you tell us what the query is to do so if we cannot or choose not to use the phpmyadmin?

trilOByte 08-26-2002 05:10 PM

I'm one of 2 admins on the board, unfortunately, I dont have access to PHPMyAdmin I just run the query's through scripts usually.

futureal 08-26-2002 06:42 PM

Quote:

Originally posted by john.eovie
I've just got a couple of things to fix in the beta, then I'm releasing! (In a manner of speaking ;)) There's already an option in the arcade hack to view the top scorers only, I had to add a lot of code to do it.
I'm telling you guys, all you need is that one query to get the top scorers only to work. No one should have to "add a lot of code" to do it. If it isn't working for you (trilObyte?) give me the error and I'll help you out.

trilOByte 08-26-2002 06:47 PM

Quote:

Originally posted by futureal


I'm telling you guys, all you need is that one query to get the top scorers only to work. No one should have to "add a lot of code" to do it. If it isn't working for you (trilObyte?) give me the error and I'll help you out.

Yeah, I got it to work, but had to change it slightly, see about 4 posts further up the thread.

Thanks for the code ;)

futureal 08-26-2002 06:51 PM

Quote:

Originally posted by trilOByte
BTW - how can I reset the leaderboard?

I'd like to run regular "races" and periodically zero all the scores. I assume I'll need to run a query, anyone know what it is?

Run this query:

PHP Code:

$DB_site->query("DELETE FROM arcade WHERE game='tetris'"); 

But be careful! :D

My arcade hack has that option (Reset Scoreboard) in the Admin Panel.

Martin64 08-26-2002 07:02 PM

Will you release it, futureal?

Link14716 08-26-2002 08:52 PM

Quote:

Originally posted by john.eovie
:\ it seems to work fine, but I can't find anyone else to beta test it. my three beta testers have disappeared!
I think I'd be good enough. But wait, it's finished. DAMN, now how am I supposed to get it? I haven't seen a dime in about 3 months.....


All times are GMT. The time now is 03:20 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.02065 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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