[RC3] Referral Plus v 1.3.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
DrmaFreek
Registered User
Posts: 7
Joined: Thu Mar 10, 2005 1:04 pm

Post by DrmaFreek » Wed May 11, 2005 2:33 am

Currently getting this when I try and view top ten referrals.

Code: Select all

Could not get uesrs data

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '' at line 7

SELECT ruid, username, count(ruid) as total FROM phpbb_refer_plus, phpbb_users WHERE user_id=ruid AND ruid != '-1' GROUP BY ruid ORDER BY total DESC LIMIT

Line : 80
File : rp_top.php
Other than that it's working great. Thanks.

<edit>One thing I though of. Is there a way to keep multiple people from sending emails to the same person, a way to check to see if that person has received an email within the last month or so. I know this would require keeping track of all emails used, but it might help from being annoying.</edit>

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 3:05 am

bbus3r wrote: Not sure if you tried activity mod, but they have an option to choose the cash/point system on the administration side.

Maybe you can include cash/point option on the administration side:

Points system: O Yes O No

Cash system: O Yes O No
If yes: reward field ________ (ie: user_points)


I just made it configurable for the amount of gold/points to give for a referral in the ACP so admin now can change the amount of gold/points per referral.

The thing about what you suggest that disturbs me is that the original idea was to keep seperate the "referral" this is why I went this route. The amount you get for a referral is a seperate issue from posting period. You may set it to add it to an allready existing "points" base if you choose this route.

You could name it Referral Gold or Referral Points or whatever you please. It will use user_gold in cash mod or user_points in cash mod, depending on choice of install, which you could name Referral Points or whatever you choose, the points side works with any points system using the user_points if you choose to lump it with other points. By using the user_gold you can name it whatever you please and keep it seperate from user_points if using cashmod. Call it Referral Bucks... anything you desire, just set the field as user_gold.

I only did an install for "points" due to many people allready use a points system and may not want to add cashmod to have the rewards system with the referral or may choose to just use their existing user_points in cashmod as the referral reward. Then you need do nothing further as it will add to user_points by using the points install.

You see my point? Or maybe I don't understand yours. :?

*=Matt=* had an excellant idea and I implemented right away. I see the reason that the amount for a referral may be desired to be changed or just more easily set in the first place after install. But I am not sure I see the reason to change back and forth from points to gold as the reward. The only issue I see for an admin is if they had allready set a user_gold and user_points both for another purpose.

Maybe you are thinking of something I am not getting my head around. :)

If you care to explain more I will look at implementing the idea. Just not sure I get the "user_point" :)
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 3:12 am

DrmaFreek wrote: Currently getting this when I try and view top ten referrals.

Code: Select all

Could not get uesrs data

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '' at line 7

SELECT ruid, username, count(ruid) as total FROM phpbb_refer_plus, phpbb_users WHERE user_id=ruid AND ruid != '-1' GROUP BY ruid ORDER BY total DESC LIMIT

Line : 80
File : rp_top.php
Other than that it's working great. Thanks.

<edit>One thing I though of. Is there a way to keep multiple people from sending emails to the same person, a way to check to see if that person has received an email within the last month or so. I know this would require keeping track of all emails used, but it might help from being annoying.</edit>


Hmm download the newest pack and be sure you have run the sql. There seems no reason for such an error as the page stands alone and require no edits. Unless ftp upload mess things up or sql not in place.

New pack requires no further edits just adds features and should handle any problems.

As to the email you are requesting a similar idea as another. How much value do you think this will be? Without a list for users to send mails to people from, what do you think the odds are that many users would send email to the same person? Or is your concern that the same person will send many mails to the same person?
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

DrmaFreek
Registered User
Posts: 7
Joined: Thu Mar 10, 2005 1:04 pm

Post by DrmaFreek » Wed May 11, 2005 5:00 am

Ok, so I took this:

Code: Select all

DESC LIMIT $rp_top
out of this:

Code: Select all

   $sql = "SELECT ruid, username, count(ruid) as total 
      FROM " . REFER_PLUS_TABLE . ", " . USERS_TABLE . " 
         WHERE user_id=ruid 
            AND ruid != '-1' 
            GROUP BY ruid 
            ORDER BY total 
            DESC LIMIT $rp_top";
and my top ten page is working again. Don't know why, but it does. Ideas? Also, I think I deal with not needing to keep track of who were to receieve emails. What about the ability to do an across the board wipe of referrals for doing monthly contests and what nots. Take everyone down to zero, or make a second count that can be taken down to zero while not losing the original numbers.

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 5:17 am

@ DrmaFreek
Well that will make it a members referral page. That is the line to set the top 10, it defines the limit to the number of members refered on page.

Set this line in db through sql:

Code: Select all

INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ( 'rp_top', '10' );
I get same error if I remove this add from db

If that does not fix you up let me know.

Edit: You mean to remove the referral credits or to reset points and gold?

You can reset cashmod currency to do this or I suppose I could set a option in acp to clean db of entries and reset for top 10 list and remove all referral data easy enough. Let me know if I am understanding you correct.
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

DrmaFreek
Registered User
Posts: 7
Joined: Thu Mar 10, 2005 1:04 pm

Post by DrmaFreek » Wed May 11, 2005 5:52 am

First off, thanks so much. That fix worked perfectly. For some reason my inserts weren't running all the way through so that was never inserted. Anyways, thanks again.


You can reset cashmod currency to do this or I suppose I could set a option in acp to clean db of entries and reset for top 10 list and remove all referral data easy enough. Let me know if I am understanding you correct.


That's the idea. I don't use cash mod, so I won't go that route, but some way to reset the top ten when needed would be great. Again, it would be even better to reset the top ten, but not lose the total amount of refereals. Almost like having to numbers, your total referals and your referals since last reset. Again, if that's a pain, no worries, I can always go in to the database and clear it out when I want. Thanks.

DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing » Wed May 11, 2005 8:16 am

I have two suggestions:
1. Show which user (if any "N/A" default) refered each user in their profile view. (For people who were there before the mod got installed, it's an obvious "N/A" ;))
2. Have a separate page that shows all of the peope a user has refered. (Accessed via uid: "referredby.php?uid=<user_id>". The filename could change or whatever).
Then, you could see who was referred by who.

Just a suggestion!
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 2:34 pm

DKing wrote: I have two suggestions:
1. Show which user (if any "N/A" default) refered each user in their profile view. (For people who were there before the mod got installed, it's an obvious "N/A" ;))
2. Have a separate page that shows all of the peope a user has refered. (Accessed via uid: "referredby.php?uid=<user_id>". The filename could change or whatever).
Then, you could see who was referred by who.

Just a suggestion!


1. A "Referred By" "User" kind of thing? If this was to be implemented where do you feel it should reside. Under say the date joined or?

2. The number of people you referred is a link to such a page as I believe you are asking for. Where (*)= the number of friends you have referred.

If you click on the number * you will get the page. Or do I mis-understand you?

If you click on the number of referrals you have in your profile or others profile you can see everyone you or they referred.
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 2:41 pm

DrmaFreek wrote:
That's the idea. I don't use cash mod, so I won't go that route, but some way to reset the top ten when needed would be great. Again, it would be even better to reset the top ten, but not lose the total amount of refereals. Almost like having to numbers, your total referals and your referals since last reset. Again, if that's a pain, no worries, I can always go in to the database and clear it out when I want. Thanks.
Ahhhhh ok. I will take a look into this. Have to give some thought on how to implement this. It would need to be a seperate db field and extra data added at registration at first thought. I will think on it. :)
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

Keva
Registered User
Posts: 101
Joined: Mon Mar 28, 2005 12:21 pm
Contact:

Post by Keva » Wed May 11, 2005 8:13 pm

quick question ... can the referl list be reset say every week or so?

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 8:49 pm

Keva wrote: quick question ... can the referl list be reset say every week or so?


Not in the admin at this time. Are you looking to reset all referral data or only the top 10?

DrmaFreek has made a request of the same nature and I am trying to narrow down exactly what this function should do.

1. Leave referral data intact and only reset a top 10 list.
2. Rest all referral data.

Which are you thinking?
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

bbus3r
Registered User
Posts: 158
Joined: Sat Apr 16, 2005 2:10 pm

Post by bbus3r » Wed May 11, 2005 8:57 pm

MentalMaze wrote:
Keva wrote:quick question ... can the referl list be reset say every week or so?


Not in the admin at this time. Are you looking to reset all referral data or only the top 10?

DrmaFreek has made a request of the same nature and I am trying to narrow down exactly what this function should do.

1. Leave referral data intact and only reset a top 10 list.
2. Rest all referral data.

Which are you thinking?



How about monthly Top 10, then another one for All time?

That way you can have it reset every month, but still retain the grand total.
Last edited by bbus3r on Wed May 11, 2005 9:04 pm, edited 1 time in total.

bbus3r
Registered User
Posts: 158
Joined: Sat Apr 16, 2005 2:10 pm

Post by bbus3r » Wed May 11, 2005 9:03 pm

MentalMaze wrote:
bbus3r wrote:Not sure if you tried activity mod, but they have an option to choose the cash/point system on the administration side.

Maybe you can include cash/point option on the administration side:

Points system: O Yes O No

Cash system: O Yes O No
If yes: reward field ________ (ie: user_points)


.....

I only did an install for "points" due to many people allready use a points system and may not want to add cashmod to have the rewards system with the referral or may choose to just use their existing user_points in cashmod as the referral reward. Then you need do nothing further as it will add to user_points by using the points install.

You see my point? Or maybe I don't understand yours. :?

*=Matt=* had an excellant idea and I implemented right away. I see the reason that the amount for a referral may be desired to be changed or just more easily set in the first place after install. But I am not sure I see the reason to change back and forth from points to gold as the reward. The only issue I see for an admin is if they had allready set a user_gold and user_points both for another purpose.

Maybe you are thinking of something I am not getting my head around. :)

If you care to explain more I will look at implementing the idea. Just not sure I get the "user_point" :)


user_point was just an example. the reward field should be a choice so others can input whatever field they are using (money, token, points, etc.). sorry, maybe i wasn't making myself clear as I was just going by the screenshots and your description.

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Wed May 11, 2005 9:20 pm

bbus3r wrote: How about monthly Top 10, then another one for All time?

That way you can have it reset every month, but still retain the grand total.


Hmm I think this might be do-able, give me a visual. Like 2 pages, one all time top referrers page and one this months top referrers?

Something like that?
bbus3r wrote: user_point was just an example. the reward field should be a choice so others can input whatever field they are using (money, token, points, etc.). sorry, maybe i wasn't making myself clear as I was just going by the screenshots and your description.


Ahhh I see what you are saying. hmmm I will look into this. The idea is good. Just not sure how to implement at registration time. Code in registration is fairly simple at this time and hate to add there so I will give thought on this one. Have added to notes.

I will put a section on first post next day or so with suggestions to try and help all keep track of ideas. Also help me keep fresh in my mind which to do next. :)

Also I have not heard any bug reports yet. Has anyone ran into issues of things not working the way they should?

And has anyone installed with easymod yet? If so, how did that go?

Thanks all, I appreciate you all taking the time to suggest and pass on your thoughts.
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

MentalMaze
Registered User
Posts: 531
Joined: Sun Nov 23, 2003 8:22 am
Location: Seattle
Contact:

Post by MentalMaze » Fri May 13, 2005 2:12 pm

bbus3r wrote: How about monthly Top 10, then another one for All time?

That way you can have it reset every month, but still retain the grand total.


I have implemented this option. :)

I could use some suggestions on how to view things.

I am thinking the referral link at the top of the page should go to the new settings i.e. the "Current Promotion" list with maybe a link in it to the Furum Liefetime referrals page, which is the one you view now, that will never be reset. Or maybe a page that offers a choice on which to view?
I see pros and cons to each.

Any suggestions on how this should be handled? :?:
When I whisper of deep dark space or
Ponder upon that of the rhyme of time
I find there is no change in the words of rhyme
Whereas there is in both space and time

Post Reply

Return to “[2.0.x] MODs in Development”