View Full Version : Referral Statistics
gspot
04-27-2004, 10:00 PM
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) **
FrOgZ
04-28-2004, 01:31 AM
Sounds cool ty! You should put it all into one big zip file to make it easier to dl.
Anyhow, cool stuff!
insanctus
04-28-2004, 01:38 AM
Perhaps a screan shot? but does sound cool.
???`S?LV?R???`
04-28-2004, 01:45 AM
yeah, i wanna see a screen shot first too before i install. :)
???`S?LV?R???`
04-28-2004, 02:32 AM
nice screen, I think i'll use this.
gspot
04-28-2004, 02:39 AM
nice screen, I think i'll use this.
Remember: Please click install
Wifey
04-28-2004, 03:04 AM
Hey gspot, I can't seem to find the showgallery part of that function :) I have just plain gallery, does that work?
Also, where do you upload the new php file to? You didn't specify where to save it in the database.
edit: Okay, so you just upload it to your main forum. You should add thatto the instructions since it isn't there.
Also, so this start counting from referrals AFTER I install? I have a bunch of referrals and nobody is showing up as having any. I'd like to get it to count from previous referrals.
Yeah, so I just made a new account and used myself as a referral to test it - it's not working. I have the follow e-mail link disabled for my board...
gspot
04-28-2004, 04:17 AM
Hey gspot, I can't seem to find the showgallery part of that function :) I have just plain gallery, does that work?
Also, where do you upload the new php file to? You didn't specify where to save it in the database.
edit: Okay, so you just upload it to your main forum. You should add thatto the instructions since it isn't there.
Also, so this start counting from referrals AFTER I install? I have a bunch of referrals and nobody is showing up as having any. I'd like to get it to count from previous referrals.
Yeah, so I just made a new account and used myself as a referral to test it - it's not working. I have the follow e-mail link disabled for my board...
ashkarita - sorry about that, I have re-edited the instructions for the readme.txt
Also, are you using a special usergroup?? Other than registered as the default usergroup??
If so, you will have to change the number in the referals.php for user.usergroupid to whatever the correct number is for your usergroup. If you have any problems, please let me know. I will help you...
???`S?LV?R???`
04-28-2004, 04:35 AM
this hack's instruction's wasn't written right :-\
gspot
04-28-2004, 04:36 AM
this hack's instruction's wasn't written right :-\
Did you re-download the zip??? Please do that now... Sorry (:
???`S?LV?R???`
04-28-2004, 04:41 AM
This hack was a good idea, but was poorly written. It should of went beta first
gspot
04-28-2004, 04:44 AM
This hack was a good idea, but was poorly written. It should of went beta first
Like I stated it is my first hack, so if you would like to help out in modifying it in anyway, please do so, I would like to see people even help add-on more options for this hack. It is just a good start.
msimplay
04-28-2004, 04:25 PM
i'd like it if all usergroups are counted for referals
if thats possible
ps would it be possible to display all users via pagination
instead of user limit
Wifey
04-28-2004, 06:17 PM
Okay, yes I am using different usergroups. I had admin, moderator, supermoderator, registered students and then 4 others. I'm not sure how I change that in the php file. I would love it if you could help me out with that when you get a chance, but I know you're busy so take your time!
edit: I need it to work for all of my usergroups - how can Ido that? Also, I tried switching it to my usergroup and when I opened that page all there was was a 1 in the middle column - nothing else.
msimplay
04-28-2004, 06:41 PM
you will have 2 uncached templates unless you put this code in your referals.php
find
//Your full path to vbulletin forum
and place underneath
$globaltemplates = array(
'reflist',
'GENERIC_SHELL'
);
save and upload
joeychgo
04-28-2004, 07:04 PM
can this hack be set so that "successful registrations" could be changed to another dynamic?
Example..... If a user on my site makes 5 posts, he is upgraded to "full member" --- I woulld like to run a contest for those who refer the most users that become upgraded to FULL member status --- not just register.
BigJohnson
04-28-2004, 08:01 PM
can this hack be set so that "successful registrations" could be changed to another dynamic?
Example..... If a user on my site makes 5 posts, he is upgraded to "full member" --- I woulld like to run a contest for those who refer the most users that become upgraded to FULL member status --- not just register.
ya same here. i have something that works this way and would like this idea better.
gspot
04-28-2004, 08:28 PM
ya same here. i have something that works this way and would like this idea better.
Yes, I can look into this for you... But it shouldn't be to hard to add that to this hack.
gspot
04-28-2004, 08:33 PM
Everyone please redownload the zip file... New changes have been made.
Wifey
04-28-2004, 08:34 PM
I've done everything - even added that new code, and this is what I'm getting
http://www.degrassi-boards.com/referals.php
Any idea? I want it to count the referrals of 8 different usergroups, but I don't know how to add more usergroups.
Is the reason this isn't working because I have the e-mail user and have them click back to the boards disabled?
gspot
04-28-2004, 10:23 PM
I've done everything - even added that new code, and this is what I'm getting
http://www.degrassi-boards.com/referals.php
Any idea? I want it to count the referrals of 8 different usergroups, but I don't know how to add more usergroups.
Is the reason this isn't working because I have the e-mail user and have them click back to the boards disabled?
Ashkarita,
Please upload the new templates that are in the zip and the new referals.php page in the zip. This will show all your referrals.. If you have any questions, i will email you my aim.. Just re-follow all the instructions in the new zip that I have uploaded to this thread.
Wifey
04-28-2004, 10:40 PM
It's working perfectly now! Thank you so much! GREAT HACK!
edit: I take that back - I'm getting this above my top banner
Warning: chdir(): No such file or directory (errno 2) in /home/degrassi/public_html/referals.php on line 28
Everything else is working.
gspot
04-28-2004, 10:49 PM
It's working perfectly now! Thank you so much! GREAT HACK!
edit: I take that back - I'm getting this above my top banner
Warning: chdir(): No such file or directory (errno 2) in /home/degrassi/public_html/referals.php on line 28
Everything else is working.
try blocking out the chdir part of the script example:
// chdir ('/path/to/vbulletin/forums/');
Since your root directory is already the forum...
just add the 2 back slashes in front of the chdir
msimplay
04-28-2004, 10:52 PM
is there anyway to make the referal stats users limitless ie not ten not a number but limitless
and then add pagination on the user names and reduce the names in the members refered to click here to see members refered by this user
and add pagination to that aswell
it would be a much better hack this way
gspot
04-28-2004, 10:53 PM
try blocking out the chdir part of the script example:
// chdir ('/path/to/vbulletin/forums/');
Since your root directory is already the forum...
just add the 2 back slashes in front of the chdir
Also, are you sure that is the right path to where the file resides on your server???
/home/degrassi/public_html/referals.php
But my first suggestion should help u... :)
gspot
04-28-2004, 10:55 PM
msimplay,
Yes, take out the $max in the first database query in referals.php file.. then comment out the $max=number line and there will be no limit for the results... Let me look into the pagination thing.
ryancooper
04-28-2004, 11:10 PM
installed and working perfectly! Thanks
msimplay
04-28-2004, 11:15 PM
msimplay,
Yes, take out the $max in the first database query in referals.php file.. then comment out the $max=number line and there will be no limit for the results... Let me look into the pagination thing.
thanks :)
with those mods i'll be able to hold a referal competition
Wifey
04-28-2004, 11:33 PM
gspot - that fixed it - the //
And yes, that is where all the information is on my server. I use f5hosting and I can edit my files in my server database as opposed to having to reupload things everytime.
Thanks again!
gspot
04-28-2004, 11:51 PM
I'm glad everyone likes it... Had a few minor errors, but seems that all is fixed.. :)
minerva1
04-29-2004, 04:35 AM
can this hack be set so that "successful registrations" could be changed to another dynamic?
Example..... If a user on my site makes 5 posts, he is upgraded to "full member" --- I woulld like to run a contest for those who refer the most users that become upgraded to FULL member status --- not just register.
This would be awesome!
joeychgo
04-29-2004, 10:29 AM
can this hack be set so that "successful registrations" could be changed to another dynamic?
Example..... If a user on my site makes 5 posts, he is upgraded to "full member" --- I woulld like to run a contest for those who refer the most users that become upgraded to FULL member status --- not just register.
Has this been incorporated in the new zip?
gspot
04-29-2004, 03:08 PM
Has this been incorporated in the new zip?
I almost have this feature working.. What it will do is allow you to select how many posts the member needs to have if any, how many referrals the member needs to have if any, and what usergroup you want them updated to upon receiving the requirements... I'm still testing this script and everything is working... I just need to add one last thing.. Hopefully have this completed by the end of the week.. I will keep all of you updated.
msimplay
04-29-2004, 03:11 PM
I almost have this feature working.. What it will do is allow you to select how many posts the member needs to have if any, how many referrals the member needs to have if any, and what usergroup you want them updated to upon receiving the requirements... I'm still testing this script and everything is working... I just need to add one last thing.. Hopefully have this completed by the end of the week.. I will keep all of you updated.
thank you
gspot
04-30-2004, 02:46 AM
I don't know if this was exactly what everyone was looking for, but please feel free to try it as well as add some more features to it if you wish. This script will be hidden to everyone once installed, and will be ran everytime someone views your homepage of the forum, thus leaving your users usergroup status up-to-date.
This script is a completely different hack in addition to the one here I previously released. It has it's own installation/readme.txt file ect. It has limiting conditionals including number of referrals, number of posts on the forum. More can be added pending on a persons needs. I have tested it many times on my own forum and it works GREAT.
TWO INSTALLATION METHODS AVAILABLE:
1) require_once('promo.php'); in your forums index.php
2) Set-up a scheduled task cron
** Both installation instructions are in the zip in the same file readme.txt **
ENJOY, PLEASE LEAVE SOME FEEDBACK. :rolleyes:
gmarik
04-30-2004, 03:45 PM
nice and easy one
Fluous
05-01-2004, 03:11 AM
GSpot = nice person. I asked him for a hack, and he did it for free. Well somewhat, I asked him for a modification to this hack, and he did it. Very trustworthy, and very fast. He wasn't a problem at all, and didn't get mad at me when I asked him to go the extra mile. Great person, I suggest him for your next one. :)
Lee Wilde
05-08-2004, 07:39 AM
Thank you very much. My site is still under construction and I am new to vbulletin, but I was able to get this hack up and running within minutes, as promised. Very much appreciated.
gspot
05-08-2004, 02:51 PM
Thank you very much. My site is still under construction and I am new to vbulletin, but I was able to get this hack up and running within minutes, as promised. Very much appreciated.
Remember to click install :)
lifesourcerec
05-10-2004, 12:23 AM
I got 5 uncached templates (2 from the referals hack). even after adding
$globaltemplates = array(
'reflist',
'GENERIC_SHELL'
);
gspot
05-10-2004, 03:12 AM
I got 5 uncached templates (2 from the referals hack). even after adding
$globaltemplates = array(
'reflist',
'GENERIC_SHELL'
);
That is wierd then, I don't get that, and I have checked with many other hacks and all of them are set-up the same way as mine... I even followed this thread on creating hacks and other modifications for vb3.x.x
How to create vb pages?? (https://vborg.vbsupport.ru/showthread.php?t=62164)
** ALSO PLEASE NOTE: DON'T USE GENERIC_SHELL... Thats has nothing to do with this hack anymore.. **
REMEMBER TO CLICK INSTALL AS WELL ONCE YOUR HAVE IT ON YOUR SITE.
lifesourcerec
05-10-2004, 03:35 AM
Heh.. nevermind. It's not that. It's the adcolumn hack which will not cache for anything.
Fluous
05-10-2004, 12:39 PM
GSpot, can you PLEASE message me when you get on. I keep not seeing you for days wondering when you will appear. Thanks. :)
Boofo
05-10-2004, 12:48 PM
Are you going to be adding a pagenav to this so we can list all of the referrers? ;)
gspot
05-10-2004, 02:04 PM
Are you going to be adding a pagenav to this so we can list all of the referrers? ;)
You can list all the referrers, just by not giving it a limit in the referals.php page.
Boofo
05-10-2004, 02:17 PM
You can list all the referrers, just by not giving it a limit in the referals.php page.
And what happens when you get 100 or 150 of them and no pagenav? ;)
msimplay
05-10-2004, 04:03 PM
yeh i was on about pagination earlier :P
gspot
05-10-2004, 10:49 PM
yeh i was on about pagination earlier :P
Still working on the pagination scripting... :( sorry for the delay guys
msimplay
05-10-2004, 11:05 PM
Still working on the pagination scripting... :( sorry for the delay guys naww don't be silly
we appreciate your work :)
JagFan
05-11-2004, 08:25 PM
I have installed and it is working fine....nice work :)
Big Kahuna
05-12-2004, 01:03 AM
Ok -- what's the secret format for the //path to your vbulletin directory?
I getting the below error
Warning: chdir(): No such file or directory (errno 2) in /home/moparsty/public_html/forums/referals.php on line 28
Unable to add cookies, header already sent.
File: /home/moparsty/public_html/forums/referals.php
Line: 28
my forums are at www.moparstyle.com/forums
gspot
05-12-2004, 01:07 AM
For you it would be: /home/moparsty/public_html/forums/
REMEMBER CLICK INSTALL :)
Big Kahuna
05-12-2004, 01:10 AM
Ok thanx -- that got me one step further -- but now I have a blank screen
http://www.moparstyle.com/forums/referals.php
Suggestions?
Big Kahuna
05-12-2004, 01:19 AM
I modified includes/functions_online.php and uploaded it
I created the two templates (in one of my 12 styles to test) in my 64 Imperial style
I added the path to the referals.php and put it in my main forum directory
I added the call in the footer of the style with the templates http://www.moparstyle.net/forums/index.php?styleid=36
But I get a white screen.
Big Kahuna
05-12-2004, 01:29 AM
Fixed -- I gave the full URL to the referals.php so I could also use it in the footer of the Portal.
Thanx
I'll click install as soon as I update the other styles.
Big Kahuna
05-12-2004, 01:35 AM
I'm missing the big picture here -- how does it relate new members to the person that referred them? Is this something that occurs this moment forward as a person registers?
I already have an extra field in the user CP that has the person registering leave the name of the person refering them. Any way to use that data?
gspot
05-12-2004, 02:08 AM
I'm missing the big picture here -- how does it relate new members to the person that referred them? Is this something that occurs this moment forward as a person registers?
I already have an extra field in the user CP that has the person registering leave the name of the person refering them. Any way to use that data?
What version are u using for vbulletin? 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. I'm currently finishing an addon for this hack that will be used for competitions. Say you only want to show statistics for members who have referred new members that have posted a certain amount of times. This will show the results based on this condition. Hope this helps.. By the way, did you get it up and working??
** Change that I have visited your site and you didn't copy and paste the information for the templates correctly. Please re-copy the templates and make sure they are named: refer & referbit .. Then this hack will work properly, it works for all referrals made prior to this hack and for future referrals. :)
Big Kahuna
05-12-2004, 04:35 AM
this is the template refer
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - Referral Statistics</title>
$headinclude
</head>
<body>
$header
$navbar
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="550" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="550" align="center">
<tr>
<td class="thead" align="center" width="160"><b>Member</b></td>
<td class="thead" align="center" width="80"><b>Referrals</b></td>
<td class="thead" align="center" width="310"><b>Members Referred</b></td>
</tr>
$referbits
</table>
</td></tr></table>
$footer
</body>
</html>
this is the template referbit
<tr align="center">
<td class="alt1"><b><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$referrer[userid]">$referrer[username]</a></b></td>
<td class="alt2">$referrer[referrals]</td>
<td class="alt1">$referrerlist</td>
</tr>
I copied and paste exactly as the .txt file instructed. Am I seeing something different than you?
Big Kahuna
05-12-2004, 04:37 AM
although the instructions has referbit (singular) -- I see the refer wants to call $referbits (plural)
gspot
05-12-2004, 04:47 AM
although the instructions has referbit (singular) -- I see the refer wants to call $referbits (plural)
That doesn't matter.. It's how the script actually works. Do you actually have members at this time that have made referrals?? Please feel free to AIM me my username is: gspot003
Big Kahuna
05-12-2004, 04:51 AM
I changed $referbits to $referbit in the refer template -- but that didn't change anything.
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.
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
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
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
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.
armani1072
05-15-2004, 11:17 PM
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
Boofo
05-16-2004, 12:25 AM
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:
$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:
$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");
armani1072
05-16-2004, 12:37 AM
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
Boofo
05-16-2004, 12:44 AM
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.
armani1072
05-16-2004, 01:29 AM
same error message as post #73
gspot
05-16-2004, 06:01 AM
TRY THIS:
$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:
$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. :)
gspot
05-17-2004, 03:35 AM
Did this work for u?? :speechless:
armani1072
05-17-2004, 08:21 PM
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
mysql error number: 1146
Boofo
05-17-2004, 08:24 PM
Did this work for u?? :speechless:
What about the LEFT JOIN table? ;)
gspot
05-18-2004, 03:52 PM
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.
Boofo
05-18-2004, 10:10 PM
gspot, this is basically the same query as in my forumhome stats hack. If you don't use the table AS table on all tables in a query that access more than one table, you will never get it working for this guy right. This:
LEFT JOIN user ON (users.referrerid = user.userid)
HAS to be this:
LEFT JOIN user AS user ON (users.referrerid = user.userid)
gspot
05-19-2004, 04:22 AM
Thank you, should I add this to the main file in general?? :)
Not just for this guy, but for everyone??
Boofo
05-19-2004, 04:28 AM
Yes, because there will be others who use table prefixes and that is where you will need it. I found out the hard way about this. ;)
Just remember for future reference, that if it is only 1 table with no joins then you don't need the table AS table. Only if the query has more than one table in it is when you will need it. And all the tables in a query like that have to have the table AS table in it. It is the table prefixes that cause the problem with that. ;)
gspot
05-20-2004, 04:18 AM
Yes, because there will be others who use table prefixes and that is where you will need it. I found out the hard way about this. ;)
Just remember for future reference, that if it is only 1 table with no joins then you don't need the table AS table. Only if the query has more than one table in it is when you will need it. And all the tables in a query like that have to have the table AS table in it. It is the table prefixes that cause the problem with that. ;)
Thanks, the file referals.php has been revised to this latest addon thanks to - BOOFO
msimplay
05-20-2004, 06:28 AM
well i have a slight problem now
because the referals php seems to be using getinfo&username=
but it would be better if it used userid because the way thats currently used won't parse ascii code for example a user name like this
∙?МųşKąąη?
joeychgo
05-20-2004, 12:44 PM
Option: To limit your referral results by usergroups, such as how many referrals were made to members in the registered usergroup, etc..
OK so my question is this.....
My board is set up so that when you first register, your a registered user. When you make 5 posts, your automatically upgraded to a full member.
Now, what I would like is to run a referral contest - but I only want those referrals that become full members to count in the score. (this way someone cant refer 20 false people or people who just sign up and never come back)
Does this hack do that now?
Aside from tht - what does this hack do that is different then the referral system built into VB3?
Boofo
05-20-2004, 12:53 PM
Thanks, the file referals.php has been revised to this latest addon thanks to - BOOFO
You almost got it. You forgot to add the TABLE_PREFIX to the tables. ;)
The query should actually be:
$referrers = $DB_site->query("SELECT COUNT(*) AS referrals, 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 referrals DESC
LIMIT $max");
armani1072
05-20-2004, 08:02 PM
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.
yes i added a prefix of "vB3" so all the table in mysql database start with vB3....
if i have to change this everytime then this would explain why i get errors everytime i have to run a query right?
Boofo
05-20-2004, 09:39 PM
yes i added a prefix of "vB3" so all the table in mysql database start with vB3....
if i have to change this everytime then this would explain why i get errors everytime i have to run a query right?
You should be able to run the query I just posted above just fine the way it is with a table prefix. You don't need to change or add anything to the query.
armani1072
05-20-2004, 09:52 PM
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT username FROM precisi_forums.user WHERE referrerid = '1' AND referrerid > 0
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
sorry to keep bugging. changed code in referals.php and this is the new error i got. at least it is different
Boofo
05-20-2004, 10:24 PM
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT username FROM precisi_forums.user WHERE referrerid = '1' AND referrerid > 0
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
sorry to keep bugging. changed code in referals.php and this is the new error i got. at least it is different
Can you post the fulll error code on that?
armani1072
05-21-2004, 03:24 AM
Can you post the fulll error code on that?
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT username FROM precisi_forums.user WHERE referrerid = '1' AND referrerid > 0
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
Date: Friday 21st of May 2004 12:27:15 AM
Script: http://www.precisionmuscle.org/testvb/forums/referals.php
Referer: http://www.precisionmuscle.org/testvb/forums/index.php?
Username: armani1072
IP Address: 205.201.132.83
gspot
05-21-2004, 04:51 AM
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT username FROM precisi_forums.user WHERE referrerid = '1' AND referrerid > 0
mysql error: Table 'precisi_forums.user' doesn't exist
mysql error number: 1146
Date: Friday 21st of May 2004 12:27:15 AM
Script: http://www.precisionmuscle.org/testvb/forums/referals.php
Referer: http://www.precisionmuscle.org/testvb/forums/index.php?
Username: armani1072
IP Address: 205.201.132.83
Try this - If u used vb3 as the prefix, put in either:
SELECT username FROM vb3.user WHERE referrerid = '1' AND referrerid > 0
or
SELECT username FROM precisi_forums.vb3.user WHERE referrerid = '1' AND referrerid > 0
Because we got past the first query, so now it's only hanging up on the last query... BOOFO if you have any suggestions, please post them... :)
Boofo
05-21-2004, 07:52 AM
What is the actual table_prefix in the config.php?
armani1072
05-21-2004, 09:29 PM
What is the actual table_prefix in the config.php?
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'precisi_forums';
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = 'vB3';
Boofo
05-21-2004, 09:31 PM
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'precisi_forums';
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = 'vB3';
Try chnage the user table name in the query to this:
vb3user
and see if it runs that way.
armani1072
05-21-2004, 09:45 PM
Try chnage the user table name in the query to this:
vb3user
and see if it runs that way.
if were to change in config.php to not have a prefix and upload it will that update everything? this is too much trouble i should have never put a prefix.
gspot
05-22-2004, 04:15 AM
if were to change in config.php to not have a prefix and upload it will that update everything? this is too much trouble i should have never put a prefix.
NO that wouldn't change everything. Since you installed vbulletin with a prefix, you would have to completely reinstall it with no prefix to never use one again. :( But try like BOOFO said it is really easy.
Try vB3.user for the table in the query
or try vb3.user depending on the cap locks if you used them or not
or last try vb3user in that last query... :)
That should make it work
etaslim
09-05-2004, 03:34 PM
I modified includes/functions_online.php and uploaded it
I created the two templates (in one of my 12 styles to test) in my 64 Imperial style
I added the path to the referals.php and put it in my main forum directory
I added the call in the footer of the style with the templates http://www.moparstyle.net/forums/index.php?styleid=36
But I get a white screen.
I got the same problem, white screen. I've redo everything but still get the empty screen. I'm using vb 3.0.3. Please help...
gspot
09-05-2004, 10:06 PM
I got the same problem, white screen. I've redo everything but still get the empty screen. I'm using vb 3.0.3. Please help...
ETASLIM,
Please re-download the zip file, I have updated the coding to work with people who are using databases with prefix's. Try this, if it still doesn't work please let me know. Sorry I have been out of town for the past few days...
Thanks,
GSPOT
etaslim
09-06-2004, 01:15 PM
thanks for the prompt reply, gspot.
I've downloaded the new files, edited & uploaded, but still get the blank page. I did all steps very carefully but still no success. Is this hack compatible for 3.0.3?
gspot
09-06-2004, 02:14 PM
thanks for the prompt reply, gspot.
I've downloaded the new files, edited & uploaded, but still get the blank page. I did all steps very carefully but still no success. Is this hack compatible for 3.0.3?
Yes, this hack is compatible for 3.0.3 - Let me look at a few things and I will get back to you here in a few minutes
gspot
09-06-2004, 02:24 PM
Yes, this hack is compatible for 3.0.3 - Let me look at a few things and I will get back to you here in a few minutes
Make sure the path to your vbulletin directory is correct in the referals.php file. Also make sure the new template names are spelt correctly and contain the correct data that was supplied. I just edited a few more things on the zip, so please re-download the files again and start fresh with this new install. Then please let me know... Also, give me a link to your white page that your receiving.
etaslim
09-06-2004, 02:51 PM
Sory to disturb you gspot. It was my mistake. After read more carefully, I found the problem...quite silly actually :). When I added the 2 templates, I named both as "refer copy" and "referbit copy". That's why I always get the blank referals.php page. What a dumb mistakes! I must get some more coffee :laugh:
Now it's working smoothly. Thanks for this great hack & your support! It's really a perfect feature for my referral contest. I definitely will install it to my other two forums.
Wifey
09-06-2004, 05:53 PM
Yeah, so I'm getting this error at the top of my referals.php page. It's working like a charm this time (I had to uninstall before), except for this one little error :)
Warning: chdir(): No such file or directory (errno 2) in /home/degrassi-boards.com/html/referals.php on line 28
Any ideas?
gspot
09-06-2004, 09:08 PM
Yeah, so I'm getting this error at the top of my referals.php page. It's working like a charm this time (I had to uninstall before), except for this one little error :)
Any ideas?
your path to your vbulletin forums directory has to be wrong. Check with your host for the correct path, then you should be ok. Let me know.
venomx
09-06-2004, 11:38 PM
Would be nice if this listed all refs from all usergroups... Plus have a second page with ref stats that could be deleted as per the admin... that way you could run ref contests and after its down reset the stats for the contest....
Wifey
09-07-2004, 12:47 AM
I'd just like to express my EXTREME gratitude for gspot and say how wonderful it is to have a hack creator who gives support for their hack. I had a problem and gspot solved it for me and I wish that everyone were like that.
gspot you get 2 thumbs up from me and I hope everyone gives you the credit you deserve because YOU ROCK.
gspot
09-07-2004, 02:55 AM
venomx - this hack should show all referrals from all usergroups by default. I have only an option to limit the referral results by usergroups that you can implement into the code listed in the commented out instruction in referals.php file.
venomx
09-07-2004, 04:59 AM
Sorry didnt try to install this yet just read the first few pages. How about a way to count how many new refs since last reset?
gspot
09-08-2004, 07:44 AM
Sorry didnt try to install this yet just read the first few pages. How about a way to count how many new refs since last reset?
Ok people I have re-edited the whole layout of this hack... I think everyone will like it. Please check-out the new pictures and the new features that it has to offer. Many features where added from VENOMX's requests that I think all of us will find useful. Enjoy and post any comment or suggestions that you may have. :)
venomx
09-08-2004, 08:08 AM
Cool :)
Ill install this in a few hours.. Was just heading to bed when the email came in saying you posted.. :P
gspot
09-08-2004, 08:10 AM
Cool :)
Ill install this in a few hours.. Was just heading to bed when the email came in saying you posted.. :P
No problem, had some free time this afternoon and now its bedtime for me as well. Hope you all like it. :)
venomx
09-08-2004, 08:14 AM
Hey just had an idea.... What would be nice is for you/someone to make an addon for this and uShop.
Like an on/off switch for the "since reset" counter and when we turn it off it auto awards the top 3 members whatever amount of points we have set for the winners...
When its turned off it wouldnt show the since last reset text of the pages for the members... :P
gspot
09-08-2004, 02:33 PM
Hey just had an idea.... What would be nice is for you/someone to make an addon for this and uShop.
Like an on/off switch for the "since reset" counter and when we turn it off it auto awards the top 3 members whatever amount of points we have set for the winners...
When its turned off it wouldnt show the since last reset text of the pages for the members... :P
Remember to click Install. Yes, that is a whole different hack that I dont support. Sorry, but if someone else wants to make this an addon then please go ahead. Since everyone's referal competitions are probably going to be different. Some people will issue points, some will issues prizes and so forth. Sorry.
etaslim
09-12-2004, 02:14 PM
How to add the new database table? Has to be done from PHPMyAdmin, is it? Can someone be kind enough to advice step by step procedure. Thanks alot!
gspot
09-12-2004, 04:16 PM
How to add the new database table? Has to be done from PHPMyAdmin, is it? Can someone be kind enough to advice step by step procedure. Thanks alot!
In PHPMyAdmin run this query:
CREATE TABLE `referrals` (
`date` TEXT NOT NULL
);
Or for step by step:
1) create a new table named: "referrals"
2) create one new field named: "date"
3) Type: "text"
4) not null
Hope this helps :)
SaN-DeeP
09-14-2004, 10:48 AM
Database error in vBulletin 3.0.3:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.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 referrals DESC
LIMIT 10
mysql error: Table ******.user' doesn't exist
aNy fix for this ?
thnx
gspot
09-14-2004, 03:19 PM
Database error in vBulletin 3.0.3:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.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 referrals DESC
LIMIT 10
mysql error: Table ******.user' doesn't exist
aNy fix for this ?
thnx
SAn-deep
I think you need to try it again. If your using a database table prefix for vbulletin, it looks like the script is working then. Is your prefix "vb3" for your database tables? The script is trying to grab the table "vb3_user" - do you even have this table in your vbulletin database? If not, you need to not use a database prefix and it should be trying to use table "user". Many people have installed this hack with no problems.
-GSPOT-
etaslim
09-16-2004, 11:52 AM
In PHPMyAdmin run this query:
Hope this helps :)
Great! Thanks for the help, gspot. It runs perfectly now on my two forums.
Milktruck
09-18-2004, 09:23 AM
Thank you! Installed it perfectly.
*clicked Install*
Jack28
09-22-2004, 07:20 PM
Help! i got the follow error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\init.php on line 520
Warning: Invalid argument supplied for foreach() in W:\www\includes\sessions.php on line 270
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in W:\www\includes\functions.php on line 3622
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622
There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
How can i fix this?
gspot
09-22-2004, 11:49 PM
Help! i got the follow error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\init.php on line 520
Warning: Invalid argument supplied for foreach() in W:\www\includes\sessions.php on line 270
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in W:\www\includes\functions.php on line 3622
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622
There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
How can i fix this?
To me it sounds like your path to your vbulletin forums is not set correctly in my hack files. Please make sure it is. It looks like your path should be this: /www/
etaslim
10-15-2004, 11:41 AM
Great! Thanks for the help, gspot. It runs perfectly now on my two forums.
Ups, appearently not all :ermm: In one of my forum, the total referrals are not shown. I've rechecked but couldn't found anything wrong. Any idea? Anyway, the address is http://forum.chip.co.id/referals.php
SaN-DeeP
10-15-2004, 12:46 PM
i re-uploaded all the files, did all the edits once again,
but still getting this error :
Database error in vBulletin 3.0.3:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.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 referrals DESC
LIMIT 10
mysql error: Table 'sanp_faS3.user' doesn't exist
mysql error number: 1146
Date: Friday 15th of October 2004 01:45:21 PM
Script: http://forums.tech-arena.com/referrals.php
Referer:
Username: SaN-DeeP
Boofo
10-15-2004, 01:01 PM
That's because you have a table prefix. You need to add . TABLE_PREFIX . before each table. ;)
SaN-DeeP
10-15-2004, 01:30 PM
That's because you have a table prefix. You need to add . TABLE_PREFIX . before each table. ;)
I am confused boofo, Can you help fixing the table prefix in this code ?
<?php
////////////////////////////////////////////////////////
//Referral Statistics// Created By: G-Spot//////////////
////////////////////////////////////////////////////////
///////////////www.gspotracing.com//////////////////////
////////////////////////////////////////////////////////
// INSTRUCTIONS:
// Change the $max variable to show how many results you want.
////////////////// OPTIONAL REFERRAL RESULTS ///////////
// You can limit your referral results to certain usergroups,
// by adding the following under each query after the WHERE clause's:
// AND user.usergroupid=2 -->
// this number will be different for different user groups. To find
// the usergroup number login to your admincp and click on usergroup
// manager and next to the usergroups you should see something close
// to: edit usergroup(id:2) where the 2 is the usergroup number.
///////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////////////
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'referrals');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
$globaltemplates = array('refer','referbit','navbar');
// ######################### REQUIRE BACK-END ############################
chdir('/path/to/vbulletin/forums/');//edit path to your vbulletin directory
require('./global.php');
// ######################### NAVIGATION ############################
$navbits = array();
$navbits[$parent] = 'Referral Statistics';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// ################################################## ###
// ################################################## ###
// ######################### START MAIN SCRIPT #########
// ################################################## ###
// START REFERRAL STATISTICS SCRIPT //
//GET TOTAL REFERALS//
$gettotal = $DB_site->query("SELECT COUNT(*) FROM " . TABLE_PREFIX . "user
WHERE referrerid > 0");
$total=mysql_fetch_row($gettotal);
// END TOTAL REFERALS //
// GET LAST DATE RESET //
$lastreferals=$DB_site->query("SELECT date FROM " . TABLE_PREFIX . "referrals");
$lastcount = mysql_fetch_row($lastreferals);
if ($lastcount == ''){
$lastcount[0]="(No Reset Record Found!)";
}
// END LAST DATE RESET //
$max=10; //This number decides how many results to display
$referrers = $DB_site->query("SELECT COUNT(*) AS referrals, 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 referrals DESC
LIMIT $max");
while ($referrer=$DB_site->fetch_array($referrers)) {
$referreds = $DB_site->query("SELECT username FROM " . TABLE_PREFIX . "user WHERE referrerid = '$referrer[userid]' AND referrerid > 0");
while ($referred = $DB_site->fetch_array($referreds)){
$enc_username = urlencode($referred[username]);
if ($referrerlist) {
$referrerlist .= ", <A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>";
} else {
$referrerlist .= "<A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>";
}
}
eval("\$referbits .= \"".fetch_template("referbit")."\";");
$referrerlist="";
}
eval('print_output("' . fetch_template('refer') . '");');
?>
Regards,
gspot
10-15-2004, 10:17 PM
San-Deep
Do you see this line in my configuration file that you posted above:
chdir('/path/to/vbulletin/forums/');//edit path to your vbulletin directory
- You need to edit this path to reflect your forums directory and then try it.
- try this first.
SaN-DeeP
10-17-2004, 07:29 AM
San-Deep
Do you see this line in my configuration file that you posted above:
chdir('/path/to/vbulletin/forums/');//edit path to your vbulletin directory
- You need to edit this path to reflect your forums directory and then try it.
- try this first.
tried to change the path too, but dont work :(
gspot
10-19-2004, 06:22 AM
Its trying to load this table from mysql: "sandeep_f1nalDbaS3.user" does this table even exist? Please check your table extension that your using against your database tables in your mysql.
SaN-DeeP
10-19-2004, 12:36 PM
Its trying to load this table from mysql: "sandeep_f1nalDbaS3.user" does this table even exist? Please check your table extension that your using against your database tables in your mysql. there is no table name sandeep_f1nalDbaS3.user but a table named sandeep_f1nalDbaS3.vb3_user exisits, i assume you still need to tweak the file a lil for me :(
gspot
10-19-2004, 01:24 PM
No, there shouldnt be any more editing needed to the files. - Your post number 125 up above shows that you were gettting the following database error: Table 'sanp_faS3.user' doesn't exist
Now when I visit your website I see the following error:
sandeep_f1nalDbaS3.user No table exists
So the only thing I can think of is that you dont have the table prefix being integrated correctly on your site... You can try adding (FROM " . TABLE_PREFIX . "vb3_referrals) - the (vb3_) into the each query being executed in the configuration file of my script that you posted in #127 above. That should do the trick, but make sure you add (vb3_) to every table like i showed you in the above example.
Let me know - good luck
trackpads
10-25-2004, 02:06 AM
Great work!
SupraT
10-25-2004, 02:39 AM
OK question, this is perfect for what I want to do with competitions and such. I also have am using the Store Hack.
I want to create a easy way for member to refer. How do I create "buttons" for the members to put on their sites etc so when they click on the button, get referred to my site, register, that the referrer gets credit automatically without having the person that is registering enter the referrerrrrrr's name?
Get that sorted and I click install :)
SaN-DeeP
10-25-2004, 07:27 PM
No, there shouldnt be any more editing needed to the files. - Your post number 125 up above shows that you were gettting the following database error: Table 'sanp_faS3.user' doesn't exist
Now when I visit your website I see the following error:
sandeep_f1nalDbaS3.user No table exists
So the only thing I can think of is that you dont have the table prefix being integrated correctly on your site... You can try adding (FROM " . TABLE_PREFIX . "vb3_referrals) - the (vb3_) into the each query being executed in the configuration file of my script that you posted in #127 above. That should do the trick, but make sure you add (vb3_) to every table like i showed you in the above example.
Let me know - good luck
gspot last request, i have tried my best to make this nice addon work for me, but alas :(, can you make a different file for me which will have the prefix vb3_ added for all tables ?
Warm Regards,
Sandy...
gspot
10-26-2004, 02:39 AM
This file has been modified only for "san-deeps" configuration. Please do not use this file unless you are this user listed above.
LET ME KNOW...
* You still need to edit the path to your vbulletin directory, and you need to make sure the path to your global.php file is correct. If you get any error messages, please post them or send them to me via. vbulletin instant messenger.
SaN-DeeP
10-26-2004, 08:34 PM
Big thanks gspot, there were 2 or 3 small problems with prefix in above file, i have fixed them now, and the referral system on my forums work great.
Big thanks for the hack and morever, your great support of taking time to make a seperate file finally :) I apprecaite ur efforsts for same.
Regards,
Sandy...
gspot
10-26-2004, 08:44 PM
You are welcome.. :) And I'm glad I could help. Enjoy!!
etaslim
10-27-2004, 04:39 PM
bump.....
Ups, appearently not all :ermm: In one of my forum, the total number of referrals are not shown. I've rechecked but couldn't found anything wrong. Any idea? Anyway, the address is http://forum.chip.co.id/referals.php
SaN-DeeP
10-27-2004, 06:40 PM
i have a strange problem now. :S
i have also installed - link for each user for inviting members (https://vborg.vbsupport.ru/showthread.php?t=67407) hack
and all the new users are getting added to webmaster (user id =1) referrals list
check this page - http://forums.tech-arena.com/referrals.php
Any idea ?
Regards,
i have a strange problem now. :S
i have also installed - link for each user for inviting members (https://vborg.vbsupport.ru/showthread.php?t=67407) hack
and all the new users are getting added to webmaster (user id =1) referrals list
check this page - http://forums.tech-arena.com/referrals.php
Any idea ?
Regards,
Possibly it is due to that hack duplicating an already exisitng vB feature?
dominick32
10-27-2004, 11:12 PM
Guys.
I am usually very good at making my hacks fully functional.
But I dont seem to understand how to add this to the database:
//////////////////////////////////////
//////////////////////////////////////
////////// NEW TABLE /////////////////
//////////////////////////////////////
1) create a new database table
CREATE TABLE `referrals` (
`date` TEXT NOT NULL
);
I can use phpAdmin to create a new table.
But after I create a table called referrals. what do I do?
Am I doing this right?
Thanks.
Dom
dominick32
10-27-2004, 11:32 PM
Never Mind Guys.
Sorry, i just read page 7 of this thread.
Question Solved.
Dom
gspot
10-28-2004, 04:21 AM
Never Mind Guys.
Sorry, i just read page 7 of this thread.
Question Solved.
Dom
Dominick32 - remember to click install please. :)
rex_b
11-01-2004, 08:26 PM
Man that took forever to fix the prefix glitches.. ugh
but thanks for the hack!
Kaktus
11-10-2004, 04:56 PM
I had the same mysql error as SaN-DeeP..
Just removed the vb3_ - prefix from all my tables.. now it works like a charm :)
Sweet Evil
11-10-2004, 05:53 PM
nice mod, thanks
etaslim
11-12-2004, 06:09 AM
Any solution to this yet? The total referrals number & the date since referrals reset are not shown. What could possibly wrong?
Ups, appearently not all :ermm: In one of my forum, the total referrals are not shown. I've rechecked but couldn't found anything wrong. Any idea? Anyway, the address is http://forum.chip.co.id/referals.php
gspot
11-12-2004, 01:41 PM
Any solution to this yet? The total referrals number & the date since referrals reset are not shown. What could possibly wrong?
etaslim - There has to be a problem with one of the other hacks you have installed prior to this one. I told you earlier how you can error check by usergroups, so please do that prior to double-posting. It sounds to be from what you have told me - that there is another hack that you have installed that is more than likely messing up your forum. You might want to back trace to fix this issue...
etaslim
11-16-2004, 09:02 AM
etaslim - There has to be a problem with one of the other hacks you have installed prior to this one. I told you earlier how you can error check by usergroups, so please do that prior to double-posting. It sounds to be from what you have told me - that there is another hack that you have installed that is more than likely messing up your forum. You might want to back trace to fix this issue...
hmm....ok i will try to trace back my installation. thanks.
T3MEDIA
12-13-2004, 09:22 AM
I am sorry can I get a clear answer on this?
Does this hack count referals from a user that has new members join fully?
As in a referal becomes a full member.
I see the usergroups thing but that sounds to me like only "registered members" or what ever user group you pick can be PART of this hack (race, competion what ever)
Please and thank you.
T3MEDIA
12-13-2004, 11:58 AM
OK so my question is this.....
My board is set up so that when you first register, your a registered user. When you make 5 posts, your automatically upgraded to a full member.
Now, what I would like is to run a referral contest - but I only want those referrals that become full members to count in the score. (this way someone cant refer 20 false people or people who just sign up and never come back)
Does this hack do that now?
Aside from tht - what does this hack do that is different then the referral system built into VB3?
Joey did you get a answer?
T3MEDIA
12-13-2004, 12:15 PM
This part is confusing. I will wait untill some one can help me in this area.
You can limit your referral results to certain usergroups,
// by adding the following under each query after the WHERE clause's:
// AND user.usergroupid=2 -->
I just want registered referals to show. people who refered people and now they are registered. that group is 2.
thanks.
gspot
12-14-2004, 12:55 AM
This part is confusing. I will wait untill some one can help me in this area.
You can limit your referral results to certain usergroups,
// by adding the following under each query after the WHERE clause's:
// AND user.usergroupid=2 -->
I just want registered referals to show. people who refered people and now they are registered. that group is 2.
thanks.
If you leave the settings at default - then only registered members will be counted that are fully registered. If you add what I specified to add if you wanted to as an option then it would only count referrals by that usergroup.
GOOD LUCK. please click install :)
T3MEDIA
12-14-2004, 03:36 AM
If you leave the settings at default - then only registered members will be counted that are fully registered. If you add what I specified to add if you wanted to as an option then it would only count referrals by that usergroup.
GOOD LUCK. please click install :)
ok. sorry but to be clear. default will have full registered people. not people waiting for email confirmation. becuase at default it shows a lot of referals. an they are not full members.
this is why I thought it would be best to ask.
Here dont take my word for it. look here (http://www.sprnch.com/forums/referrals.php) and view the members for persona. They are not members yet they are waiting for email verification.
any ideas? or maybe a print out of some sort I could paste in to fix this? I know this took some time to make and I did click install. I honestly am greatefull you did it. But I would love to see it work at its full potental.
gspot
12-14-2004, 04:03 AM
Ok, so you have it setup so when you have a new user they are considered to be in one usergroup correct?? And then when they are confirmed they are changed to another user group? If this is the case then you need to add into the script the usergroup number that i show commented out in the script. If not please let me know how you have your forum setup.
T3MEDIA
12-14-2004, 05:02 AM
Ok, so you have it setup so when you have a new user they are considered to be in one usergroup correct?? And then when they are confirmed they are changed to another user group? If this is the case then you need to add into the script the usergroup number that i show commented out in the script. If not please let me know how you have your forum setup.
Only group that should count as a good referal is usergroup 2. Reg. users.
But with this User group 3 (users awaiting confirmation) also shows with 2.
do you mind showing me in text what you mean? Sorry and thank you.
gspot
12-14-2004, 05:07 AM
Only group that should count as a good referal is usergroup 2. Reg. users.
But with this User group 3 (users awaiting confirmation) also shows with 2.
do you mind showing me in text what you mean? Sorry and thank you.
Post up your referrals.php file and I will edit it to what you will want to use.
T3MEDIA
12-14-2004, 06:31 AM
Ok well 1,3,4 are the no no groups.... they are not logged in, waiting for confirmation and COPPA.
Any one that refers a person and they are part of this list it just wouldnt count.
I really want referrals that become full members. (really any number besides the three I just stated)
gspot
12-15-2004, 04:54 AM
T3media - I will have this edited for you by tomorrow night. Sorry for the delay.. :(
gspot
12-15-2004, 01:19 PM
Try this file. I have edited it, make sure that you have all your setting correct in it though. And please let me know if it works for you. :) This is set up to not count users in usergroups 1,3, and 4
T3MEDIA
12-15-2004, 03:09 PM
Try this file. I have edited it, make sure that you have all your setting correct in it though. And please let me know if it works for you. :) This is set up to not count users in usergroups 1,3, and 4
It works! awsome. I couldnt understand the lingo but I see now what you mean.
I am very intrested in having this only accept people who refer new users and the people they refer also refers a person. (WAHHHT?)
I am giving away on my site $100 to each user that refers 5 people. the only catch is the 5 have to be full members and have to refer 5 themselves. (the last 5 dont have to be full members). of course the next set is 90% near their 100$ All they have to do is make sure their 5 also brings 5. It will start a large boost to the site.
In other words you have to bring someone that knows 5 people. (You would need to know 5 people in total like this to win the money)
I am willing to make a donation if you can do that for me.
ericgtr
12-15-2004, 06:28 PM
Excellent mod here! I installed it and then setup a contest where the most referrals in a month earns them an award that goes under their avatar that I setup a basic conditional for. So far this has been very productive, thanks!
gspot
12-16-2004, 12:35 AM
t3media - sorry man, that would require a lot more hacking for this hack... I dont have the time right now since I opened a new business. :(
Sorry, but thanks for installing. :)
T3MEDIA
12-16-2004, 02:04 PM
t3media - sorry man, that would require a lot more hacking for this hack... I dont have the time right now since I opened a new business. :(
Sorry, but thanks for installing. :)
hey you do what you can right?
That is good enough for me.
djjeffa
01-02-2005, 02:31 AM
I think I did everything right but heres what i get
Database error in vBulletin 3.0.3:
Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM vb_user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid)
WHERE vb_user.vb_userid > 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 10
mysql error: Table 'djjeffa_djjeffaVB.user' doesn't exist
mysql error number: 1146
Date: Saturday 01st of January 2005 10:29:39 PM
Script: http://www.djjeffa.com/vb/referrals.php
Referer: http://www.djjeffa.com/vb/home.php
any ideals?
PurpleCow
01-02-2005, 09:18 AM
Hi... Great Hack
/me Clicks Install
I would suggest something liek this for a referral promo..
Refer 5 friends and those five refer another 2 each and be eligible to win something as a Prize. We could probably have another few levels of referrals.
Besides...each referred person again can be eligible for the prizes based on referrals.
And similiarly on those lines.
Any help on this ... much Appreciated
Also, does this work with Erwin's refer a Friend ? or works as a stand alone hack ??
Thanks
gspot
01-02-2005, 03:16 PM
djeffa - it was a problem in the referrals.php file. ITS BEEN FIXED.
gspot
01-02-2005, 03:17 PM
PurpleCow - Someone else even recommended this addon for my hack, I will start looking into it, but however it may take me a few weaks to release it. Thanks for clicking install :)
MajorFm.com
01-04-2005, 12:18 AM
I dont suppose u can help with this:
https://vborg.vbsupport.ru/showthread.php?t=67407&page=3
nice mod, but directions need to be improved.
djjeffa
01-06-2005, 12:35 AM
djeffa - see this:
mysql error: Table 'djjeffa_djjeffaVB.user' doesn't exist
It's trying to find that table called: djeffa_djjeffaVB.user check your mysql and see if this table exists, if not then you have a problem in using the database prefix maybe even from a previous hack that was installed prior to this one. Someone else had the same problem, but however this is not from my hack. :( sorry.
the only part that i think i could have messed up was this
1) create a new database table
CREATE TABLE `referrals` (
`date` TEXT NOT NULL
);
cause i had a freind do that cause i didnt really understant it.
but i still cant figer it out.
gspot
01-06-2005, 04:36 AM
djjeffa - basically all that says is create a new database table: the
CREATE TABLE `referrals` (`date TEXT NOT NULL ); is the command you would use in phpmyadmin to execute this new table named exactly like it says: referrals.
djjeffa
01-12-2005, 02:06 AM
djjeffa - basically all that says is create a new database table: the
CREATE TABLE `referrals` (`date TEXT NOT NULL ); is the command you would use in phpmyadmin to execute this new table named exactly like it says: referrals.
im really bad with this so if you can walk me throug lol
i get to this :
Create new table on database djjeffa_djjeffaVB:
Name:
Fields:
is that where i should be and what do I put for feilds? Name i guss would be referrals ?
gspot
01-12-2005, 04:39 AM
im really bad with this so if you can walk me throug lol
i get to this :
Create new table on database djjeffa_djjeffaVB:
Name:
Fields:
is that where i should be and what do I put for feilds? Name i guss would be referrals ?
djjeffa - yes thats where u need to be. This is pretty self explaining, but here i will try to explain it completely for you. NAME = referrals , Fields = date
This field date needs to have the following settings: TEXT, NOT NULL
Thats basically it. You should look into how to run a database query in phpmyadmin somewhere on google. Then all you would have to do is copy and paste the CREATE TABLE script above and click submit. Then it would create the new table and automatically set all the settings up for you. GOOD LUCK :)
coloradok5
01-12-2005, 01:05 PM
Ability to limit referral counts based on usergroups. (good for limiting referral competitions for certain usergroups)
Hello, sorry if these questions have been anwsered allready, Does this work for secondary usergroups as well? What I mean is could I allow all usergroups to referr, but only the referrees that become paid subscribers that are in a secondary usergroup would count, kind of like an affiliate program?
Can you reset referrals by user only?
gspot
01-13-2005, 02:14 AM
Hello, sorry if these questions have been anwsered allready, Does this work for secondary usergroups as well? What I mean is could I allow all usergroups to referr, but only the referrees that become paid subscribers that are in a secondary usergroup would count, kind of like an affiliate program?
Can you reset referrals by user only?
Yes colorado you can limit the count to a specific usergroup which is explained in the referrals.php file. As far as resetting referrals by username, no not in this release, but will be available in the next. You can only reset all referrals in this version. :)
GetGamer.com
01-13-2005, 10:42 PM
There something really unclear about the installation instructions for this MOD. I'm using a table prefix of "vb3_" for my forums. I want to maintain that structure for all forum-related tables, for obvious reasons. The instructions on do not explain how to handle prefixes so I created a "vb3_referrals" table rather than simply a "referrals" table.
Now when I load http://www.bigblueball.com/forums/referrals.php I get the following error: Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.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 referrals DESC
LIMIT 10
mysql error: Table 'bbb.user' doesn't exist
mysql error number: 1146And yes, I edited line #28 of referrals.php to the correct path already (the readme.txt doesn't cover that either). As I understand this error message, it appears that the forum prefix is not being used for just part of the SQL command.
gspot
01-14-2005, 01:03 AM
gamer - it was a problem in the referrals.php. IT HAS BEEN FIXED
GetGamer.com
01-14-2005, 01:19 AM
gamer - try it the way the instructions say...
Your problem is the following:
mysql error: Table 'bbb.user' doesn't exist
It's looking for a table with the prefix "bbb" is that what you are using for your vbulletin database tables? I dont know how or where it could be getting that prefix from unless you specified that somewhere within vb. Also there have been 2 or 3 other members that have had problems trying to install this hack, but out of 60 that have installed successfully they (the 3 of them including yourself) might have installed another hack that is somehow conflicting with this one. This hack is setup correctly. And yes the instructions do need to be revised, but that will occur in the next release. I'm sorry, but this is all I can help you with at this time. good luck :)I have only a few Mods installed, and all of them work perfectly. bbb is the name of the database, not the prefix. My table prefix is "vb3_"
nice utility for users and admins. I have installed it. works p-e-r-f-e-c-t-l-y.
thanks <clicking install>
hey, i think i spoke too soon hehe...
im getting the following error when i click "referal statistics" link from FORUMSHOME page -
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /hsphere/local/home/vikram/thalforum.com/forums/referrals.php on line 28
and following error when no user is logged in.
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /hsphere/local/home/vikram/thalforum.com/forums/referrals.php on line 28
Unable to add cookies, header already sent.
File: N/A
Line: 0
=-=-=-=-=-=
AND when i click the link from CMPS home I get page cannot be displayed because it is trying to hit the refferal.php in the root directory instead from /forums/refferal.php.
any suggestions gspot? others?
V
gspot
01-14-2005, 10:17 PM
hey, i think i spoke too soon hehe...
im getting the following error when i click "referal statistics" link from FORUMSHOME page -
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /hsphere/local/home/vikram/thalforum.com/forums/referrals.php on line 28
and following error when no user is logged in.
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /hsphere/local/home/vikram/thalforum.com/forums/referrals.php on line 28
Unable to add cookies, header already sent.
File: N/A
Line: 0
=-=-=-=-=-=
AND when i click the link from CMPS home I get page cannot be displayed because it is trying to hit the refferal.php in the root directory instead from /forums/refferal.php.
any suggestions gspot? others?
V
viks - on line 28 in referrals.php file you need to have the following:
chdir('/hsphere/local/home/vikram/thalforum.com/forums/');
TRY THAT - it should fix your problem. It seems that you didnt have the path setup correctly. Save the file and reupload once you edit it. Then let me know if it works. :)
thanks gspot.
yeah, i had missed that part. now the URL work perfectly from forumshome and inside the forum.
but I stil cud not get it to work from the CMPS footer. has anyone here with CMPS got this working on CMPS main page?? if yes, then please share the info.
thanks
gspot
01-15-2005, 08:10 AM
ATTENTION EVERYONE:
The new version of this hack 2.0 will be released by the end of this weekend. It includes the following:
1) Pagination - yes its finally here
2) The ability to delete referrals by a specific member
3) Updated instructions for install - I might even build an installer :) will see...
4) Any wants? Let me know...
lasto
01-15-2005, 10:46 AM
will wait for new version :)
ATTENTION EVERYONE:
4) Any wants? Let me know...
1. Who has used Referral system (wud be nice addon)
2. Email addresses to which referrals have been sent (wud be a nice addon)
3. How many refferal sent by individual. :ermm:
4 . :ermm: Refferal this year/month/week
howzzat?
gspot
01-16-2005, 12:57 AM
EVERYONE THE NEW RELEASE IS HERE.. :)
LET ME KNOW WHAT YOU THINK :)
:):):):):):):):):):)
EVERYONE THE NEW RELEASE IS HERE.. :)
LET ME KNOW WHAT YOU THINK :)
:):):):):):):):):):)
COOL. thx dude.
I will try it. can i run the install on top of my old version of refferal stats or do i have to uninstall first.
gspot
01-16-2005, 06:18 AM
COOL. thx dude.
I will try it. can i run the install on top of my old version of refferal stats or do i have to uninstall first.
Should be fine over the top of it. :)
MajorFm.com
01-16-2005, 11:58 AM
Got the following error on the auto installation on step 2...
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...
gspot
01-16-2005, 04:54 PM
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. :)
Megareus Rex
01-16-2005, 09:33 PM
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
$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?
T3MEDIA
01-16-2005, 09:50 PM
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.
gspot
01-16-2005, 09:56 PM
REX - It was an error in the referrals.php page. IT HAS BEEN FIXED.
gspot
01-16-2005, 09:57 PM
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
Megareus Rex
01-17-2005, 04:53 AM
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:
Database error in vBulletin 3.0.5:
Invalid SQL: SELECT COUNT(*) as ttl, user.username, user.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.
gspot
01-17-2005, 02:03 PM
Rex - try changing this:
////////////////////////////////////////////
$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:
////////////////////////////////////////////////
$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:
////////////////////////////////////////
$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:
/////////////////////////////////////
$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.
Megareus Rex
01-17-2005, 05:34 PM
Yes, that fixed it! Thanks a lot!!! :):):)
James Goddard
01-17-2005, 05:50 PM
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
Megareus Rex
01-17-2005, 06:13 PM
I just have one more question...would it be possible to add the # of refferals users have next to their name? I miss that feature...
gspot
01-18-2005, 03:23 AM
REX - please re-download the hack. I have edited the ziped files to fix this problem that you are having. Please re-upload all new files and see if that works. The only file that was edited was the referrals.php
James - Give me a day or two and I will have an answer for you.. Sorry.
gspot
01-18-2005, 11:18 PM
James - Please re-download the zip file, I have made some changes in referrals.php
Please re-upload this new file to your forum, will take care of that problem. Everyone else please do the same. File was edited for this problem on 1/18/05 - RESOLVED
James Goddard
01-19-2005, 01:06 AM
That did the job! Thanks.
James
MajorFm.com
01-19-2005, 12:59 PM
Warning: chdir(): No such file or directory (errno 2) in /usr/local/apache/www/crazyapes/majorfmforum.com/htdocs/forum/referrals.php on line 29
Get the above error on http://www.majorfm.com/forum/referrals.php
Please advise... this is after your fixes... :ermm:
gspot
01-19-2005, 01:36 PM
Major - You are still required to edit this page to your vbulletin path. On line 29 of referrals.php it looks like you need to have the following:
chdir('/usr/local/apache/www/crazyapes/majorfmforum.com/htdocs/forum/');
MajorFm.com
01-19-2005, 02:01 PM
Ok sorry, my bad, i didnt realise the upgrade overwritted the file, its fixed, thanks...
MajorFm.com
01-19-2005, 02:17 PM
hmm... i think i still have problems... the admin panel doesn't look like your screen shot...?
Also i cant see the option to make the list more etc... currently it only shows me in the list.
http://img70.exs.cx/img70/204/ref3xe.jpg
Megareus Rex
01-19-2005, 08:13 PM
REX - please re-download the hack. I have edited the ziped files to fix this problem that you are having. Please re-upload all new files and see if that works. The only file that was edited was the referrals.php
James - Give me a day or two and I will have an answer for you.. Sorry.
YES!!! Thank you!!!
Finally...this hack is looking GOOD :)
gspot
01-19-2005, 09:36 PM
MAJORFM - you need to run the upgrade script that is in the zip file. This should solve your problems. Follow the instructions for upgrade exactly how they are written. Then let me know.
MajorFm.com
01-20-2005, 11:46 AM
i did that again... as i did the first time...
Referral Statistics Version 2.0 Upgrader
New Phrases were added.
All steps of this script were completed.
PLEASE DELETE THE FOLLOWING FILE FROM YOUR WEB SERVER:
- /admincp/install_referrals.php
FILE IS LOCATED IN YOUR ADMINCP DIRECTORY.
Click on "Exit" to exit this script and proceed with the rest of the required modifications.
Still doesnt work
gspot
01-20-2005, 12:01 PM
copy and paste manually both templates into your template manager. For some reason your template that you are using isnt showing the updated one. Make sure you get both refer & referbit uploaded and then let me know. :)
aussiev8
01-20-2005, 12:02 PM
i was wondering if there was any way i could get my mods to see this hack as well without giving them admin privlidges! my mods play a very active role in my website and think would benefit all of the mod/admin team!
MajorFm.com
01-20-2005, 12:12 PM
copy and paste manually both templates into your template manager. For some reason your template that you are using isnt showing the updated one. Make sure you get both refer & referbit uploaded and then let me know. :)
Just did it manually, :ermm:
Now it gives me page numbers but only one person per page, and in the ACP, there still isnt a box to reset individual member ref's etc... and where is the option to display more then just one member per page?
gspot
01-20-2005, 01:44 PM
Major - You really need to follow the instructions. Again in the referrals.php file there is a setting that will allow how many results you want to show per page. Find it and edit that. As far as the ACP - try re-uploading the file referralstats to your admincp area.
gspot
01-20-2005, 03:19 PM
OK people I'm adding a few more new things to this hack, but I need some input from all of you. I'm adding the following: total users ever referred since joined - would you like to see this total in the admincp or allow your users to see this on the referrals.php page? Also what else would you like to see in both the admin and users referrals pages???
T3MEDIA
01-20-2005, 09:40 PM
OK people I'm adding a few more new things to this hack, but I need some input from all of you. I'm adding the following: total users ever referred since joined - would you like to see this total in the admincp or allow your users to see this on the referrals.php page? Also what else would you like to see in both the admin and users referrals pages???That is sweet but how about what I was asking for. the ability to see if the referrals actually refered someone.
That is the real object right? So it moves up users that have referals that bring in x each.
this option could be in admin cp. like referal pyramid?=x
aussiev8
01-20-2005, 10:40 PM
and my suggestions :)
- pick a usergroup or user's that should be able to see and use this (pref user's as individuals). (just so moderators can see this as well)
- and you also need the ability to have what usergroup the referals are in, so you can tell if they're an active part of the community, i know you have posts.
- the join date of the referals
- and just a number in brackets showing the amount of people they've refered mark (4)
then you can click on mark and see who his refered!
i don't believe this to be to hard, just a few more sql statements.
gspot
01-21-2005, 02:37 AM
aussiev8 - the moderators can see this, actually everyone is allowed to see these referral statistics the only thing they can't use or see is the reset referrals in the admincp. Is this what you are talking about??
Good ideas though...
MajorFm.com
01-21-2005, 10:57 AM
Major - You really need to follow the instructions. Again in the referrals.php file there is a setting that will allow how many results you want to show per page. Find it and edit that. As far as the ACP - try re-uploading the file referralstats to your admincp area.
Ok fixed, thank u
djjeffa
01-23-2005, 11:29 PM
ok now I got it to work but how can i get it to look like this showing more than one user per page
gspot
01-24-2005, 03:26 AM
djjeffa - you need to read the instructions. You need to set the max results in the referrals.php page. This shows how many results per page. It is at default set to 1 result per page... :)
MajorFm.com
01-25-2005, 10:04 PM
glad to see it wasnt only me that was blind... lol
djjeffa
01-25-2005, 11:20 PM
glad to see it wasnt only me that was blind... lol
yea duhhhh lol
thanks guys worked great
Megareus Rex
01-26-2005, 05:45 AM
gspot - great upgrade, except for one thing.
The auto-installer must've left out the phrases, because the entire admin CP section of it is phraseless. (even in the navigation window)
gspot
01-26-2005, 01:49 PM
gspot - great upgrade, except for one thing.
The auto-installer must've left out the phrases, because the entire admin CP section of it is phraseless. (even in the navigation window)
I just checked the installer and its installing the phrases, database changes and settings correctly. Make sure you re-upload all the files and in the instructions there has been a change in the link that you needed to edit in the /admincp/index.php page. Edit your to reflect and I bet you get it to work. :)
Megareus Rex
01-26-2005, 11:53 PM
Nope, the phrases just aren't there. I ran the installer again, and still no dice. Everything else is ok though.
What phrases are added by it? I could do it manually if neccessary...
gspot
01-27-2005, 12:59 AM
Nope, the phrases just aren't there. I ran the installer again, and still no dice. Everything else is ok though.
What phrases are added by it? I could do it manually if neccessary...
Did you edit the link in the admincp/index.php file?? You really need to do this...It is different than what it was originally. Then perform a seach in phrases for all phases that contain "referrals" - let me know
Hi Gspot.
i finally did the upgrade to the new version.
Im having 2 small issues...
1. Can't see "referaal Statistics' option in admin panel. Its there... but hidden. See attached pic.
2. I do not get the full text on the configuration settings.!! what cud be missing? the phrases? how can I ad those?
3. what does RESET REFFERAL do now in the new version??? the option in admin panel under USERS. it open a BLANK page when i click on it. does it needs to be removed?
overall, :up:
gspot
01-27-2005, 04:49 AM
viks - the "Reset Referral" needs to be removed, the $vbphrase for that line in /admincp/index.php was changed from $vbphrase['reset_referrals'] to $vbphrase['get_referrals'] that was the only change to this file.
I will add the manual addition of the phrases tonight to the zip file, so please re-download if you are having issues with the auto-installer.
gspot
01-27-2005, 06:07 AM
who ever is having problems installing phrases - please re-download the zip file and upload the new auto-installer. Let me know if you still have problems...:)
I have upgraded again using the auto-installer.
This time around I see that 26 phrases have been added however the issue remains the same.
1. I have removed "reset referrals" as u suggested but "Referral Statistics" option un Admin Panel remain hidden (as per my pic above).
2. I still do not see any text in the right frame after seletcing "referral Statistics". (as my my second pic above).
:ermm: - any suggestions
Megareus Rex
01-27-2005, 05:20 PM
:ermm: That fixed it for me, gspot! :)
Edit: I keep getting this error on referrals.php
Warning: chdir(): No such file or directory (errno 2) in /referrals.php on line 18
I have it chmod to 777, and set the path correct in the admin CP, but I still get it...
[QUOTE=Megareus RexWarning: chdir(): No such file or directory (errno 2) in /referrals.php on line 18
I have it chmod to 777, and set the path correct in the admin CP, but I still get it...[/QUOTE]
Goto Admin CP -> Users -> Referral Statistics
click configure refferal statistics
and then put the path to your referral.php here
mine is like this -
/hsphere/local/home/myname/mywebsite.com/forums
once u have the path OK u wont get the error message.
-
Megareus Rex
01-27-2005, 10:39 PM
Thanks Viks, I was able to get it to work! (Actually, you just reminded me that another hack I had possessed the correct path to my vB forum, so I just copy/pasted :P)
gspot
01-28-2005, 12:25 AM
For all of you that had problems installing the new phrases prior to 1/27/05 on "referral statistics Version 2.1" please download this file and upload it to your /admincp directory. Follow the instructions and then remove this file from your server.
** Please note: only run this file if you have already ran the auto installer and your phrases were not added **
The auto installer was fixed at 6:22pm pacific standard time on 1/27/05
The auto installer was fixed at 6:22pm pacific standard time on 1/27/05
Everthing is working perfectly.
Thanks Gspot.
good stuff and good support.
gspot
01-28-2005, 12:46 AM
Everyone - There were some errors in some of the scripts on the new release. Please re-download the zip file and re-upload all the files. If you have already upgraded to this version, please just re-upload the new files to your server. You DONT need to run the install or upgrade script if you are already up-to-date.
THIS SHOULD BE THE LAST FIX FOR VERSION 2.1 :)
FIXED 1/27/04 - 6:30PM PST.
bi11i
01-28-2005, 12:51 AM
what version are we on now? v2.1.1.1.1.1? (just poking at you a little....)
gspot
01-28-2005, 01:02 AM
what version are we on now? v2.1.1.1.1.1? (just poking at you a little....)
:) Ya I know.. It should be the final version of 2.1 :)
CSS59
01-28-2005, 02:56 AM
how and where do i set the file path? Sorry, im not too good with hacks. Can you explain it to me?
gspot
01-28-2005, 04:13 AM
css59 - If you login to your admincp then under the navigation on the left find section called users - under that you should see "referrral statistics" click on that and then click on configure referral statistics in here is were you set the file path. I have explained this in 2 -3 posts earlier.
paulz
01-28-2005, 04:37 AM
ok, on top of having all of the phrasing issues, i'm getting an internal server error when clicking the link to referrals.php
Premature end of script headers: /home/msnow/public_html/forums/referrals.php
note i uninstalled and reinstalled, and also tried the fixit.php and still have no phrases in the admincp panel for referral stats, and the internal server error
moethelawn
01-28-2005, 07:18 AM
ok, on top of having all of the phrasing issues, i'm getting an internal server error when clicking the link to referrals.php
Premature end of script headers: /home/msnow/public_html/forums/referrals.php
note i uninstalled and reinstalled, and also tried the fixit.php and still have no phrases in the admincp panel for referral stats, and the internal server error
I second that... same exact thing happening with me...
T3MEDIA
01-28-2005, 09:12 AM
ummm ok should I dl this or stick with 2.0?
Megareus Rex
01-28-2005, 10:52 AM
I second that... same exact thing happening with me...
Hmm...I have it working just fine. You DID remember to enter the path to your forum in the admin CP, right?
I'll see if I can help with it, moeballs.
gspot
01-28-2005, 02:28 PM
You All Need To Enter The Path To Your Forum In The Admincp:
Under Users: Click On Referral Statistics
Then Click On: Configure Referral Statistics
--------------------------------------------------
All Of This Is In The Instructions If You Follow Them
--------------------------------------------------
paulz
01-28-2005, 05:22 PM
ok, i got it workin, sorta. i still can't get the admincp phrasing to work, but the script itself does at least
gspot
01-28-2005, 08:17 PM
paulz - can you please post a picture of the problem your facing in the admincp. I might be able to help you.. I'm going to change the installation instructions to make them a little more clearer for people. Sorry. :(
moethelawn
01-28-2005, 09:38 PM
Hmm...I have it working just fine. You DID remember to enter the path to your forum in the admin CP, right?
I'll see if I can help with it, moeballs.
Yeah, it least I believe I have it right. (hard to tell cause of the stupid blank config referral statistics page even with the newest 2.1 RS hack and the fixit.php file) I'll have to check again to make sure. Talk to you later on AIM about this, thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.