Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
[Improvement] vBStats -> Member Referrer list PHP-code improvement (much less queries Details »
[Improvement] vBStats -> Member Referrer list PHP-code improvement (much less queries
Mod Version: 1.00, by KuraFire (Member) KuraFire is offline
Developer Last Online: Jan 2007 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (1 vote - 4.00 average) Installs: 15
Released: 13 Jan 2003 Last Update: Never Downloads: 2
Not Supported  

HACK: [Improvement] vBStats -> Member Referrer list PHP-code improvement (much less queries)
BY: KuraFire [www.kurafire.com]
DESCRIPTION: Instead of using 1 query for every member that has referred someone to your forum, this new code will use only 2 queries for it all, allowing you to set your Referrermax variable in the vB stats as high as you want, you'll not get 150 queries if you have 150 referring members or anything, anymore
DIFFICULTY: Easiest
INSTALL-TIME: 1 minute I'd say


extended description:
What the default vBStats Member referrer list bit does, is loop through all users who have referred a member to your board, and for each user it runs an additional query to select all the usernames of that user's referrerlist.

My code improvement eliminates that and simply uses 1 query for all the users in the left column (referrers), 1 query for all the users in the right column (referrals) and some PHP intelligence to get the same result. No more query-per-user. 2 queries are all that remains, and a bit of PHP looping (not much).

Now you can display your entire list without having to fear for the page needing God knows how many queries in total
(it had 52 queries on first guest view in the old default way when I'd not limit the amount of users it'd display, it has 12 now... )


Instructions are in the attachment


Enjoy, vBStats users


Disclaimer: I spoke with Bane about this a long time ago and he was happy I was improving his code cos he didn't have the time for it. I doubt he'd mind me releasing it now that I've gotten around to doing it, but if he does, I'll take it down...

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
is_member_of improvement. merk vBulletin 3.0 Full Releases 18 30 Jul 2005 17:34
[Improvement] vBStats -> Top Posters list PHP-code improvement (much less queries) KuraFire vBulletin 2.x Full Releases 10 15 Feb 2003 14:53
Announcement Improvement rake vBulletin 2.x Full Releases 15 03 Dec 2002 11:59

Comments
  #2  
Old 13 Jan 2003, 21:41
Floris's Avatar
Floris Floris is offline
 
Join Date: Jan 2002
Nice work, implemented it on my site and page loads faster, less less less queries and works with 2.2.9
__________________
My community; https://omgboards.com
Reply With Quote
  #3  
Old 13 Jan 2003, 21:43
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
This works on any board where vBStats works

as long as you haven't brutally raped your vbstats.php code anyway
__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
  #4  
Old 14 Jan 2003, 10:12
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
funny, so many people have vBStats yet hardly anyone has noticed this..

*goes post a notice in the vbstats thread* ^_^
__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
  #5  
Old 14 Jan 2003, 17:42
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Nice mod

Did you ask bane for permission

- miSt
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #6  
Old 15 Jan 2003, 01:38
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Great work - no-one should really be fretting if their work is improved upon IMO ...

__________________
Natcher00
... is the Admin @ MobileForces.org - Official Community for a cult Vehicle based FPS - the only place for support!
... also he's Penfold to Dark_Wizard's Danger Mouse in development of vBWar
http://www.mobileforces.org/sig.jpg
{DaniWeb: Learn HOW-TO mod_rewrite your vB board}
Reply With Quote
  #7  
Old 15 Jan 2003, 02:22
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
Mist: pah! ;p

Natch: I agree ^_^
__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
  #8  
Old 15 Jan 2003, 17:39
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Yes well i can't see why he would mind it's just always nice to ask these things to the respective creator

- miSt
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #9  
Old 17 Jan 2003, 04:51
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
Well done Kura Should I get a chance to upgrade vbstats I will with your permission use this code. =) Very well done.
__________________
Bane
talkloud Network - Forums never smelled this good.
el coolo hacko - vbStats


vBORG Chat - Hang with the price of poop flinging *monkey sound* (irc.devcore.co.uk port 6667 - channel: #vBorg)
Reply With Quote
  #10  
Old 17 Jan 2003, 10:28
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
Yay, Bane's approval ^_^



Feel free to use this code in your new vBStats if you end up making that. I'm working on an alternative for vBStats, a stats system that doesn't do as much queries before a page even starts (like vBStats) and has a bunch of other features and is more flexible... (and, no offense, some cleaner code...)
oh, and my point was, I'll be using my own code in that new Stats hack for the referrerlist (though we will be using a different template-style for the display)

__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
  #11  
Old 17 Jan 2003, 17:21
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Wow Bane's here!

Welcome back buddy

- miSt
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #12  
Old 17 Jan 2003, 18:02
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally posted by KuraFire

Feel free to use this code in your new vBStats if you end up making that. I'm working on an alternative for vBStats, a stats system that doesn't do as much queries before a page even starts (like vBStats) and has a bunch of other features and is more flexible... (and, no offense, some cleaner code...)
oh, and my point was, I'll be using my own code in that new Stats hack for the referrerlist (though we will be using a different template-style for the display)

If you need any testers, let me know.
Reply With Quote
  #13  
Old 17 Jan 2003, 23:52
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
flexible?
__________________
Bane
talkloud Network - Forums never smelled this good.
el coolo hacko - vbStats


vBORG Chat - Hang with the price of poop flinging *monkey sound* (irc.devcore.co.uk port 6667 - channel: #vBorg)
Reply With Quote
  #14  
Old 18 Jan 2003, 01:06
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
will do ^_^

though it'll probably just go in the Beta hack forum
__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
  #15  
Old 18 Jan 2003, 01:09
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Nov 2001
Real name: Faruk
Originally posted by Bane
flexible?

yeah, more control on what all is seen and more power on who can see what, and easier to adjust the look of, mostly

and also flexible like more modular, i.e. ability to add parts/new features at a later point
__________________
EverythingvB.com is closed; it will merge into the KuraFire Network, version 6. KF*N 6 will have information about XHTML, CSS, PHP and vBulletin, and especially all those combined.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:06.

Layout Options | Width: Wide Color: