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:
member_profile:
Translation:
Spanish
Statistics:
[attachment=549]
Post Bit:
[attachment=547]
Profile:
[attachment=548]
Nice simple mod RateU
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!
Thanks for the suggestion, Yumi
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
I see you've used a cache -
very nicely done and well written RateU!
Unfortunately, I don't know how updating the cache if the User Pruning task run, Yumi
So, I use the Recount Statistics if the cache can't be updated by the reason and other reasons. Is it OK, Yumi?
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...
A little optional update
Displaying an image in postbit/classic and profile page for top referrer.
This plugin looks pretty nice RateU (:
I don't like using ProStats for showing this kind of stuff so thanks for sharing it