Version: 2.3, by gspot
Developer Last Online: Aug 2008
Version: 3.0.7
Rating:
Released: 04-27-2004
Last Update: 04-16-2005
Installs: 149
DB Changes
No support by the author.
Are you looking for statistics on the number of referrals your members have made? Or are interested in promoting your website by allowing members to engage in a referral competition?
THIS HACK IS FOR YOU
To show referral statistics from members and to manage referral competitions.
- this hack is to help you manage your forums referrals
- promote new user registrations
- perfect for contests/promotional giveaways or incentives for referrals
- INSTALL today and start managing your boards referrals.
Features:
- Limit the number of results shown
- Admin ability to reset all members referrals to zero
- Admin ability to reset "specific members" referrals to zero
- Includes an update to your whois online
- Up-to-date listing on when you last reset all members referrals to zero
*** Seen in the admincp and an option for all members to view
- Total number of referrals since last reset
*** viewable in admincp and again an option for all members to view
- Pagination is now included and an option for another at bottom of results
- Shows up-to-date total number of board referrals
- Shows leading referrer in admincp
- Ability to limit referral results by number of posts or a usergroupid(s)
- Configuration is now done in admincp
- Auto installer now included w/ auto un-installer
- BEST OF ALL (LETS MEMBERS REFER MORE PEOPLE TO YOUR SITE.
I will like always SUPPORT my hacks
Thanks goes out to: unixman - for all the referred members are now clickable to their profile.
Total install time: less than 3 minutes.
New templates: 2 - refer, referbit
New files to upload: 2 pages
Edit templates: 2 - footer, /includes/functions_online.php
File edit: 1 - /admincp/index.php
** 4/17/05 - Version 2.3 Released = Includes many new one click options in the admincp, also auto configures your vbulletin path (which many people were having errors performing) **
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Samething. does the table have to be created in the database? thanks for all your help by the way
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM precisi_forums.user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'precisi_forums.user' doesn't exist
Samething. does the table have to be created in the database? thanks for all your help by the way
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM precisi_forums.user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
Very simple fix. In the referals.php file
Find:
PHP Code:
$referrers = $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users LEFT JOIN user ON (users.referrerid = user.userid) WHERE user.userid > 0 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT $max");
REPLACE it with:
PHP Code:
$referrers = $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) WHERE user.userid > 0 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT $max");
Umm you want me to replace the code i find with the same code? still got the error. sorry to be a bother.
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
LEFT JOIN user AS user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'precisi_forums.user' doesn't exist
Umm you want me to replace the code i find with the same code? still got the error. sorry to be a bother.
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
LEFT JOIN user AS user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
I changed the second line in the query to user AS user ON. Anytime there is a table prefix being used, all tables must must delared like that in a query if you are accessing more than one table in the query.
$referrers = $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM precisi_forums.user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT $max");
AND THEN CHANGE THE OTHER QUERY TO:
PHP Code:
$referreds = $DB_site->query("SELECT username FROM precisi_forums.user WHERE referrerid = '$referrer[userid]' AND referrerid > 0");
Once those changes are made, that should work.. Just let me know.
Samething. I think i am doing something wrong here. it cannot be that difficult. also everytime i have to run queries for any hack it gives me an error. I am in the middle of building vB3.01 for an upgrade from vB2.3.4 so it is just in a test directory. Could this be causing my problems? I did set up a new database to run the test dir. ugh this bites. Thanks for all the help.
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM precisi_forums.user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE user.userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'precisi_forums.user' doesn't exist
Did you make this test site for vbulletin with a table prefix?? If so, please post the prefix that you used for the installation of vbulletins sql tables.. This will help me eliminate the problem you are having.