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 :)
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 :)