Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Referral Statistics Details »»
Referral Statistics
Version: 2.3, by gspot gspot is offline
Developer Last Online: Aug 2008 Show Printable Version Email this Page

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.

Comments
  #192  
Old 01-16-2005, 11:58 AM
MajorFm.com MajorFm.com is offline
 
Join Date: Dec 2004
Location: UK
Posts: 402
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got the following error on the auto installation on step 2...

Code:
Database error in vBulletin 3.0.3:

Invalid SQL: 
    	CREATE TABLE referrals (
  		`date` text NOT NULL 
		) TYPE=MyISAM
mysql error: Table 'referrals' already exists

mysql error number: 1050

Date: Sunday 16th of January 2005 08:55:51 AM
Script: http://www.majorfm.com/forum/admincp/install_referrals.php
Referer: http://www.majorfm.com/forum/admincp/install_referrals.php
Username: *****
IP Address: 80.42.131.***
I have masked the username and part of the IP

Please advise...
Reply With Quote
  #193  
Old 01-16-2005, 04:54 PM
gspot's Avatar
gspot gspot is offline
 
Join Date: Mar 2003
Location: Nevada
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Major - please re-download the package and re-upload all the files again for the upgrade process. I have created an upgrade script in the auto installer. This should take care of your problem. Good Luck.
Reply With Quote
  #194  
Old 01-16-2005, 09:33 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, problem. I use table prefixes at my forum. The original version didn't have them, so I added em in manually, but I see this version does. However....there's a problem with one bit of coding in it.

Its this block

PHP Code:
$result $DB_site->query_first("SELECT COUNT(*) as ttl, user.username, user.userid FROM " TABLE_PREFIX "user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) 
                   WHERE user.userid > 0
                   GROUP BY users.referrerid 
                   ORDER BY ttl DESC"
); 
I have to add the table prefix to every single instance of 'user' in the entire block, or else it gives me errors such as "Unknown table 'user' in field" and stuff. And when I add the prefix to all instances of it, for some reason it acts like there's no prefix on ANY of it! So I can't get it to work at all.

Any help?
Reply With Quote
  #195  
Old 01-16-2005, 09:50 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gspot
EVERYONE THE NEW RELEASE IS HERE..

LET ME KNOW WHAT YOU THINK

I dont know if you remember I was asking for the referal hack to check for a pertiular setup.

each user has to refer 5 users. Those five have to refer 5 as well and the orignal user gets paid.

can this baby do that yet?

its like free ipods for members kinda thing.
Reply With Quote
  #196  
Old 01-16-2005, 09:56 PM
gspot's Avatar
gspot gspot is offline
 
Join Date: Mar 2003
Location: Nevada
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

REX - It was an error in the referrals.php page. IT HAS BEEN FIXED.
Reply With Quote
  #197  
Old 01-16-2005, 09:57 PM
gspot's Avatar
gspot gspot is offline
 
Join Date: Mar 2003
Location: Nevada
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
I dont know if you remember I was asking for the referal hack to check for a pertiular setup.

each user has to refer 5 users. Those five have to refer 5 as well and the orignal user gets paid.

can this baby do that yet?

its like free ipods for members kinda thing.
Sorry this hack doesnt do that. And It might in the future, just not at this time. sorry
Reply With Quote
  #198  
Old 01-17-2005, 04:53 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gspot
REX - I see this on your referrals.php page:

mysql error: Table 'lancetjades.user' doesn't exist

Are you using the prefix = 'lancetjades'? Because somehow thats what it is trying to use... This hack seems to work fine on my board and others, so it must be a conflict with another hack you might have installed previously. If this hack worked prior to this release, then try not using the prefix at all and just use the table user delete the " . TABLE_PREFIX ." part.
sorry not much help here...
No, lancetjades is the name of the database my forum uses. The prefix I use is vb3_

It gives that error because the "LEFT JOIN user AS user ON" part of the code doesn't have a table prefix code on it, or so I've deduced.

Here is the error text:
PHP Code:
Database error in vBulletin 3.0.5:

Invalid SQLSELECT COUNT(*) as ttluser.usernameuser.userid FROM vb3_user AS users LEFT JOIN user AS user ON (users.referrerid user.userid
                   
WHERE user.userid 0
                   GROUP BY users
.referrerid 
                   ORDER BY ttl DESC
mysql error
Table 'lancetjades.user' doesn't exist

mysql error number: 1146

Date: Sunday 16th of January 2005 10:49:54 PM
Script: http://www.evermoreforums.com/forums/referrals.php
Referer: http://www.evermoreforums.com
Username: Blaze
IP Address: ***** 
As you see, the part of the code that has the table prefix code on it shows the vb3_. Once I attached the prefix to all the blank 'user' instances, it says "Unknown table 'user' in field set, and so on until ALL instances of 'user' have a prefix. Then, it drops the prefix from all of the instances, and it still refuses to work.
Reply With Quote
  #199  
Old 01-17-2005, 02:03 PM
gspot's Avatar
gspot gspot is offline
 
Join Date: Mar 2003
Location: Nevada
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rex - try changing this:
PHP Code:
////////////////////////////////////////////
$result $DB_site->query_first("SELECT COUNT(*) as ttl, user.username, user.userid FROM "TABLE_PREFIX "user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) 
                   WHERE user.userid > 0
                   GROUP BY users.referrerid 
                   ORDER BY ttl DESC"
); 
///////////////////////////////////////////////// 
To this:
PHP Code:
////////////////////////////////////////////////
$result $DB_site->query_first("SELECT COUNT(*) as ttl, user.username, user.userid FROM " TABLE_PREFIX "user AS users LEFT JOIN " TABLE_PREFIX "user AS user ON (users.referrerid = user.userid) 
                   WHERE user.userid > 0
                   GROUP BY users.referrerid 
                   ORDER BY ttl DESC"
); 
//////////////////////////////////////// 
AND THIS:
PHP Code:
////////////////////////////////////////
$referrers $DB_site->query("SELECT COUNT(*) AS number, user.username, user.userid, user.referrals FROM " TABLE_PREFIX "user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) 
                   WHERE user.userid > 0
                   GROUP BY users.referrerid 
                   ORDER BY number DESC 
                   LIMIT 
$from$max_results");
///////////////////////////////////// 
To this:
PHP Code:
/////////////////////////////////////
$referrers $DB_site->query("SELECT COUNT(*) AS number, user.username, user.userid FROM " TABLE_PREFIX "user AS users LEFT JOIN " TABLE_PREFIX "user AS user ON (users.referrerid = user.userid) 
                   WHERE user.userid > 0
                   GROUP BY users.referrerid 
                   ORDER BY number DESC 
                   LIMIT 
$from$max_results"); 
///////////////////////////////
/////////////////////////////// 
This should fix anyones problem who is having the same issue as REX - sorry all.. Make these changes is the referrals.php file.
Reply With Quote
  #200  
Old 01-17-2005, 05:34 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that fixed it! Thanks a lot!!!
Reply With Quote
  #201  
Old 01-17-2005, 05:50 PM
James Goddard James Goddard is offline
 
Join Date: Dec 2004
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, but the pagination stuff is not quite working for me:

I have $max_results set to 10 and 1 user with any referrals (new board), however I still get 2 pages?

Here is an example:

http://www.midwestdive.com/forums/referrals.php

James
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 04:15 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06502 seconds
  • Memory Usage 2,345KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (6)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete