PDA

View Full Version : Top Referrer This Month On Forumhome - How do I do it?


citeman
06-01-2008, 07:30 AM
Is there any product or plugin which can do this? Show top ten referrers this month on forum home?

Or if someone could help me create a plugin for this. I am new to vBulletin and don't know the methods we can extract such information in an optimized way. I can do it with expensive mysql queries but I would like to avoid that.

Regards,
Sid

veenuisthebest
06-01-2008, 09:37 AM
this shows a lot more than you want
Cyb - Advanced Forum Statistics (https://vborg.vbsupport.ru/showthread.php?t=177778&highlight=advanced)

citeman
06-01-2008, 10:01 AM
Thanks Veenu.. I've tried that hack it is too resource intensive. I am thinking of creating a plugin for this which will simply calculate and display the top ten referrers on the home page.

If anyone has any idea how the queries should be formed please let me know.

The dissplay would be a simple list like:

Top Referrers This Month
1 - USERNAME(232), 2 - USERNAME(200), ...

--------------- Added 1212373269 at 1212373269 ---------------

I am trying this query to get the referrers:

SELECT COUNT(*) AS referrals, user.username, user.userid FROM vbulletin_user AS users LEFT JOIN vbulletin_user ON (users.referrerid = user.userid) WHERE users.referrerid <> 0 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT 1;

But its giving me an error: ERROR 1054 (42S22): Unknown column 'user.username' in 'field list'

This is taken from: https://vborg.vbsupport.ru/showthread.php?s=&threadid=25170