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)

Kars10 08-21-2002 11:38 AM

Quote:

Originally posted by danielhollands
FIND:
PHP Code:

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

REPLACE WITH:
PHP Code:

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

This will need to be done twice, and <number> needs to be replaced with whatever number you want on the highscore.

This however produces produces more queries based on the number you are showing in the leader board (one extra for each person). There was another suggestion in this thread about how to reduce this, but I don't know if it works with the latest verson or not.

Hope this helps?

It works with the new version. Thanx! :rambo:

John 08-21-2002 11:43 AM

thanks to Minifreunde for voting for this on Hack of the Month :) :banana:

*nudge* https://vborg.vbsupport.ru/showthrea...215#post288215 *nudge*

Ninth Dimension 08-21-2002 11:44 AM

*WOOF!*
Private joke

NexDog 08-21-2002 11:48 AM

Daniel,

Changing the limits in tetris.php is the easiestoption and doesn't produce any more queries.

John 08-21-2002 11:51 AM

That's exactly what his code does.. :\

Ninth Dimension 08-21-2002 11:53 AM

Quote:

Originally posted by NexDog
Daniel,

Changing the limits in tetris.php is the easiestoption and doesn't produce any more queries.

I could be wrong, but from the code I can see that for each score in the leader board it does another query to get the users username, this line:
PHP Code:

$user_result $DB_site->query("SELECT username FROM user WHERE userid='$s_userid'"); 

This will result in a query for each person listed on the leaderboard

NexDog 08-21-2002 11:56 AM

Okay, me baka. :)

Kars10 08-21-2002 11:57 AM

Quote:

Originally posted by john.eovie
thanks to Minifreunde for voting for this on Hack of the Month :) :banana:

*nudge* https://vborg.vbsupport.ru/showthrea...215#post288215 *nudge*

I thank you John for giving us this great hack!!
Like i said you create a Monster!! *lol* :bunny:

John 08-21-2002 12:26 PM

Ok, I think this *should* fix the session timeouts and no permission problems...

Give me feedback :)

Ninth Dimension 08-21-2002 12:34 PM

I've just uploaded the new tetris.php file, and so far as I can see there are no problems, but then I was not getting problems in the first place.


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