Top Referrer In Forum Statistic
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Top Referrer In Forum Statistic
A simple plugin that displaying top referrer in forum statistic and displaying an image in postbit/classic and profile page for top referrer.

The image path: images/topref.gif

Additional variable:
postbit and postbit_classic:

Code:
{$post['mntref']}

member_profile:

Code:
{$mn_top_referrer}


Translation:
Spanish

Statistics:
   
Post Bit:
   
Profile:
   



Attached File(s)
.7z  top_referrer_in_forum_statistics.7z (Size: 1.66 KB / Downloads: 375)

(This post was last modified: 07-17-2011 02:59 AM by RateU.)
03-19-2011 07:31 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Top Referrer In Forum Statistic
Nice simple mod RateU Smile

I might suggest adding a secondary sort, eg by referrals, then by uid (or maybe registration date) since it's not exactly known what would happen with two people with the same number of referrals.  Not really an issue, but might help be a bit more consistent.
Maybe also stick an index on the referrals column when activating the plugin (or if you decide to sort by referrals then uid, make a composite index KEY(referrals,uid) ).  Alternatively, you could cache the user with most referrals.
Hope that helps, and thanks for sharing!

My Blog
03-19-2011 04:09 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: Top Referrer In Forum Statistic
Thanks for the suggestion, Yumi Smile

I've tried using KEY in the referrals and uid columns (attachment updated in the first post).
Please tell me if I did it wrong, Yumi Biggrin

03-20-2011 07:45 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Top Referrer In Forum Statistic
I see you've used a cache - very nicely done and well written RateU! Smile

My Blog
03-20-2011 08:58 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: Top Referrer In Forum Statistic
Unfortunately, I don't know how updating the cache if the User Pruning task run, Yumi Oops
So, I use the Recount Statistics if the cache can't be updated by the reason and other reasons. Is it OK, Yumi?

(This post was last modified: 03-20-2011 09:19 AM by RateU.)
03-20-2011 09:08 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Top Referrer In Forum Statistic
There are ways to try to hook in, but I personally wouldn't bother - that feature isn't used too often, and you'd probably expect users with high amount of referrals not likely to be pruned.
It's all thanks to MyBB not implementing proper central handling functions...

My Blog
03-21-2011 08:54 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: Top Referrer In Forum Statistic
Thanks, Yumi Smile

03-22-2011 04:28 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Top Referrer In Forum Statistic
A little optional update Biggrin
Displaying an image in postbit/classic and profile page for top referrer.

07-15-2011 05:00 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #9
RE: Top Referrer In Forum Statistic
This plugin looks pretty nice RateU (:

I don't like using ProStats for showing this kind of stuff so thanks for sharing it Biggrin

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
07-15-2011 01:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: Top Referrer In Forum Statistic
Thanks, Sama34 Smile

Well, if you want to use a complete statistics on forum index, probably you can try Overview.
It uses cache for displaying most of the statistics.

http://mods.mybb.com/view/overview-mybb-1-6

07-16-2011 08:19 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: