![]() |
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:
[SQL]LEFT JOIN user ON (users.referrerid = user.userid)[/SQL] HAS to be this: [SQL]LEFT JOIN user AS user ON (users.referrerid = user.userid)[/SQL] |
Thank you, should I add this to the main file in general?? :)
Not just for this guy, but for everyone?? |
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. ;) |
Quote:
|
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 Code:
∙?МųşKąąη? |
Quote:
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? |
Quote:
The query should actually be: PHP Code:
|
Quote:
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? |
Quote:
|
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 |
Quote:
|
Quote:
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/testv...s/referals.php Referer: http://www.precisionmuscle.org/testvb/forums/index.php? Username: armani1072 IP Address: 205.201.132.83 |
Quote:
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... :) |
What is the actual table_prefix in the config.php?
|
Quote:
// ****** 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'; |
Quote:
vb3user and see if it runs that way. |
Quote:
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. |
Quote:
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 |
Quote:
|
Quote:
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 |
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? |
Quote:
|
Quote:
|
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. |
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 :)
Quote:
|
Quote:
|
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....
|
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. |
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.
|
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?
|
Quote:
|
Cool :)
Ill install this in a few hours.. Was just heading to bed when the email came in saying you posted.. :P |
Quote:
|
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 |
Quote:
|
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!
|
Quote:
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 :) |
Code:
Database error in vBulletin 3.0.3: thnx |
Quote:
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- |
Quote:
|
All times are GMT. The time now is 04:20 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|