vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Referral Statistics (https://vborg.vbsupport.ru/showthread.php?t=64469)

Big Kahuna 05-12-2004 04:51 AM

I changed $referbits to $referbit in the refer template -- but that didn't change anything.

Quote:

This hack is to show statistics on referrals that have been made. For instance, if you referred 5 people, it will show the 5 people you referred as well as a count of referrals for you which would be 5 and your username as the referrer. This is just for statistics.
What I don't understand is what is the link between the referrer and the referred? I tried a throwdown registration -- and I was not asked who referred me. No where in the instructions did I do anything to perform a database modification.

These were the instructions from the hack I downloaded earlier today.

Quote:

Installation Instructions:
I have edited this code from vb version 2.x.x to work with vb 3.0.1.
follow the instructions below to install, and feel free to make any
modifications to the code as you wish. I made some options for this
hack to limit results such as referrals by usergroups. More instructions
on implementing the results limiter is in the referals.php

Thanks to unixman - all the referred members are now clickable to their profile.

Open /includes/functions_online.php
/////////////////////////////////////
/////////////////////////////////////

Search for:
/////////////////////////////////////
case 'modcplogin':
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
break;
/////////////////////////////////////

After add:
/////////////////////////////////////
case 'referrals':
$userinfo['action'] = 'Viewing Referral Statistics';
break;
/////////////////////////////////////

Search for:
/////////////////////////////////////
case '/robots.txt':
$userinfo['activity'] = 'spider';
break;
/////////////////////////////////////

After add:
/////////////////////////////////////

case 'referals.php':
$userinfo['activity'] = 'referrals';
break;
/////////////////////////////////////

Close functions_online.php and upload to server.

/////////////////////////////////////



Open refer.txt attached to this hack and add a new template
named: refer copy and paste all into this template.

Open referbit.txt attached to this hack and add a new template
named: referbit copy and paste all into this template.


//////////////////////////////////////
//////////////////////////////////////

Open your footer template and find:
//////////////////////////////////////
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
//////////////////////////////////////

Before it add:
//////////////////////////////////////
<a href="referals.php">Referral Statistics</a> -
//////////////////////////////////////


END ENJOY.... HAVE FUN WITH IT.......

I've gone over the steps outline above, plus the path to my forum in the referal.php, and put that in my forum's directory. I've had a long day and it is possible that I'm missing something obvious -- but I've gone over the instructions many times and can't see it.

I might also suggest that it may help alieviate a little confusion if your above instructions indicate what directory to upload the referal.php file to -- and a little clarity on the directory change you need to make to the file first.

gspot 05-12-2004 05:00 AM

In your admincp panel make sure that under vbulletin options - user registration options - you have selected to use the "user referrer". This will give a credit towards each referrer in which the referred member has signed up from them. Automatically adding a field in the user registration for this to work, once you have this feature enabled.

Big Kahuna 05-12-2004 03:30 PM

Ok -- I misunderstood how this worked. Instead of referral by a link -- I thought it was a question asked in New User Registration "Who Referred You?"

Thanx

gspot 05-13-2004 01:07 AM

Quote:

Originally Posted by Big Kahuna
Ok -- I misunderstood how this worked. Instead of referral by a link -- I thought it was a question asked in New User Registration "Who Referred You?"

Thanx

Actually it's by both.. No matter if you follow a link with the referrers information or if you type in the referrers name during registration. It will work the same.. But you wont see any statistics until someone has referred someone else. No matter in the past or in the future.. :)

Big Kahuna 05-13-2004 01:50 PM

OK -- I'm back to confused again since I tried a throwdown registration and didn't see anywhere the referrer's name was asked in a new registration.

Was something suppose to be modified in the database (because I didn't see it happen) to add a field for the name of the person that referred a member?

gspot 05-13-2004 05:27 PM

YES, you do have a referrer spot in your new user registration. Please see the attachment.. You will only get statistics if someone has referred someone else. But, they have to either type in the members name in this field during new registration, or they have to follow the link sent to them by the use of your other hack refer friends..

If you still can't get it, I would be more than happy to check out your settings myself, if you want to give me access. Else, I would recommend you to seek some assistance by a website designer. Many people have installed this hack with no problems. Just read the instructions word for word and everything should work properly. :) GOOD LUCK.

armani1072 05-15-2004 03:17 PM

got this database error when i click on the "refer stats" link any ideas???

Database error in vBulletin 3.0.1:

Invalid SQL: 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 10

gspot 05-15-2004 06:11 PM

Did you use a table prefix while installing vbulletin? If so you will need to edit that query to fit your tables database prefix...

There should have been more to that error as well, if you can please post it all. :)

armani1072 05-15-2004 09:56 PM

Quote:

Originally Posted by gspot
Did you use a table prefix while installing vbulletin? If so you will need to edit that query to fit your tables database prefix...

There should have been more to that error as well, if you can please post it all. :)

here is the rest of the error message. Yeah it looks like that table does not exist. Umm if you could point me in the right direction that would be swell :)



Invalid SQL: 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 10
mysql error: Table 'precisi_forums.user' doesn't exist

mysql error number: 1146

gspot 05-15-2004 10:20 PM

Quote:

Originally Posted by armani1072
here is the rest of the error message. Yeah it looks like that table does not exist. Umm if you could point me in the right direction that would be swell :)



Invalid SQL: 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 10
mysql error: Table 'precisi_forums.user' doesn't exist

mysql error number: 1146

Looks to me that u need to change all instances for the mysql querys that have "FROM user" to "FROM precisi_forums.user" since you used a table prefix when installing vbulletin. So edit the referals.php file to meet your needs.. Let me know. I hope this helps.


All times are GMT. The time now is 10:52 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.03543 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete