PDA

View Full Version : [Improvement] vBStats -> Top Posters list PHP-code improvement (much less queries)


KuraFire
02-12-2003, 10:00 PM
HACK: [Improvement] vBStats -> Top Posters list PHP-code improvement (much less queries)
BY: KuraFire [www.kurafire.com]
DESCRIPTION: Instead of a max. total of 30 queries to list the users in your vBStats -> Top Posters
section, this code uses 3 queries.
DIFFICULTY: Very Easy
INSTALL-TIME: 1 minute I'd say :)
STEPS: 3


EXTENDED DESCRIPTION:
This hack improves the Top Posters code section of vBStats. It lists roughly the same thing, the only difference
is that this takes the user's postcount instead of doing a COUNT(*) query on the (big) `post` table in the database. However, the second and third columns still do those queries that way because it's impossible to do them otherwise. What this means is that if you use forums where posts don't count for the postcount, a new member who spams enough in one of such forums could be listed in the second/third columns as having "200 posts" while he/she doesn't yet appear in the left column, since this user's Postcount field will still be low (because (s)he posted only in a forum where it doesn't count for the postcount field).
This isn't a big problem, though. Who'd be happy to have such a member on the board anyway? :)


Install instructions are in the attachment :)

Bane
02-13-2003, 09:40 AM
As much as I like that your improving it I think starting a new thread for each modification of the hack is a bit odd. You could have started it in the vbstats thread actually and had me link to it. ahh well.

NuclioN
02-13-2003, 09:42 AM
Yep, Bane is right. Nevertheless a great improvement Kura. Good job. ;)

Floris
02-13-2003, 11:46 AM
Yet, this way it is easier to find it back, and almost nobody else on this web site posts improvements and add-ons in the original thread anyway :)

I also am going to install your other vB stats improvements to save mucho queries.

Works great. Easy installation too and page loads fast. Thank you.

vB stats rulez!! :) Maybe Bane makes a final version for 2.2.10 and uses your additions to a) tweak current version and b) improve the other code he made to have c) a cool new version for 2.2.10 :)

g0 kura
g0 bane :)

Dean C
02-13-2003, 03:21 PM
Does this include the modification for the referrals too?

KuraFire
02-14-2003, 10:00 AM
No, the referrals bit modification is a different thread. See my signature if you want it :)
Edit: Grrr, d*mmit, if my sig's too long, at least tell me and not just remove it, f*ckity...

*goes edit sig*


And Xiph: he already has these two covered in the new vBStats ^_^

KuraFire
02-14-2003, 10:07 AM
okay, you'll have to check my profile instead for the hack url... :/

Dean C
02-14-2003, 03:49 PM
Why not combine the two and ask Bane to put it into his vbstats thread ;)?

Xer
02-15-2003, 07:47 AM
Originally posted by Mist
Why not combine the two and ask Bane to put it into his vbstats thread ;)?


totally agree.. :bunny:

Bane
02-15-2003, 08:32 AM
This has been fixed in the newest version of vbstats.

Also note that if you installed this "improvement" as is your links to member.php will now be broken as they will point to "/thecouch/member.php"

KuraFire
02-15-2003, 12:53 PM
ACK!!!!

I fixed the attached instructions of the first post. Sorry, I forgot to take that out! :(

ahwell, fixed now. :)