Page 3 of 5

Re: [DEV] Referrals

Posted: Tue Feb 06, 2018 1:49 pm
by MrMoney1
dmzx wrote:
Tue Dec 12, 2017 5:23 pm

@dmzx
Now working

Re: [3.1][3.2][DEV] Referrals

Posted: Sat Mar 10, 2018 2:12 pm
by TheButcher2
Looks great I installed it and activated it, but I went to do a test join on my forum, there is no field on there to enter who referred you on the registration page, so how do members refer others and get credit for it.

My board url if anyone wants to check the registration page is https://www.sponsor.chat


Thanks

Re: [3.1][3.2][DEV] Referrals

Posted: Sun Apr 01, 2018 2:52 pm
by TheButcher2
Quick question, guests can not see the stats, only registered users and admins, is there a way for guests to sse the top referrers too.

Peace

Re: [3.1][3.2][DEV] Referrals

Posted: Sun May 20, 2018 11:56 pm
by TheButcher2
Is there a way to show the referral link to members when they log in to the board, without them having to go to the UCP > Referrals > link

so it shows directly in the footer of the page please.

Re: [3.1][3.2][DEV] Referrals

Posted: Wed Jul 11, 2018 3:32 pm
by trandoductin
Thank you so much for creating this extension.
I tried it yesterday (without creating contests) because basic functions would work for me an I am happy with it.

I also have Ultimate Points extension so I wanted to add 1,200 points to referrer for each referral.
I found the code that updated referral count after a user is added and simply added simple code to update/add the points there in the same SQL statement.
More details on How I added ultimate points for referrals extension

Re: [3.1][3.2][DEV] Referrals

Posted: Wed Jul 11, 2018 4:17 pm
by trandoductin
TheButcher2 wrote:
Sun Apr 01, 2018 2:52 pm
Quick question, guests can not see the stats, only registered users and admins, is there a way for guests to sse the top referrers too.

Peace
I made this change

Re: [3.1][3.2][DEV] Referrals

Posted: Thu Jul 19, 2018 2:41 am
by totallybeautiful
Is this extension now executable? It has been on DEV since 2016.

Re: [3.1][3.2][DEV] Referrals

Posted: Thu Jul 19, 2018 7:12 am
by dmzx
Still in progress

Re: [3.1][3.2][DEV] Referrals

Posted: Sun Aug 26, 2018 9:02 pm
by scriptman
Could you please make this compatible with Ultimate Points?

Re: [3.1][3.2][DEV] Referrals

Posted: Mon Aug 27, 2018 12:05 am
by king577
scriptman wrote:
Sun Aug 26, 2018 9:02 pm
Could you please make this compatible with Ultimate Points?
http://www.gimplearn.net/viewtopic.php/ ... f=5&t=1610

Re: [3.1][3.2][DEV] Referrals

Posted: Wed Sep 19, 2018 2:35 pm
by Restless Rancor
Hi, thanks for this extension. I understand it's still in development but have a couple of questions/requests/suggestions after testing.
  • If a user is deleted the referral is not changed. Is it possible to have an option to remove referrals if a member is deleted, even if it's only an option in the ACP to delete a specific referal? For example I made a test user to refer and deleted that user once I confirmed it to be working but now I would have to go into the database to delete the referral. Another example would be if a member abuses the system an administrator can easily remove the referral in the ACP.
  • Is it possible to have the referral counts to link to a list of members that person has referred, so members can see who referred who?
  • Is it possible to have "Referred by" on the profile page, to show who referred the member who's profile you are viewing?
I'm looking forward to tracking the development of this extension!

Thanks

Re: [3.1][3.2][DEV] Referrals

Posted: Mon Oct 01, 2018 7:14 am
by dmzx
Restless Rancor wrote:
Wed Sep 19, 2018 2:35 pm
Hi, thanks for this extension. I understand it's still in development but have a couple of questions/requests/suggestions after testing.
  • If a user is deleted the referral is not changed. Is it possible to have an option to remove referrals if a member is deleted, even if it's only an option in the ACP to delete a specific referal? For example I made a test user to refer and deleted that user once I confirmed it to be working but now I would have to go into the database to delete the referral. Another example would be if a member abuses the system an administrator can easily remove the referral in the ACP.
  • Is it possible to have the referral counts to link to a list of members that person has referred, so members can see who referred who?
  • Is it possible to have "Referred by" on the profile page, to show who referred the member who's profile you are viewing?
I'm looking forward to tracking the development of this extension!

Thanks
Will look into these requests.

Re: [3.1][3.2][DEV] Referrals

Posted: Mon Oct 01, 2018 7:23 am
by Restless Rancor
Thanks! 8-)

Re: [3.1][3.2][DEV] Referrals

Posted: Sat Oct 06, 2018 11:11 pm
by 3Di
Not compatible with ONLY_FULL_GROUP_BY, to reproduce go viewing stats in contests (ACP).
General Error
SQL ERROR [ mysqli ]

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bb.phpbb_referrals.referral_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [1055]

SQL

SELECT * , COUNT(referrer_username) AS referrals_count FROM phpbb_referrals LEFT JOIN phpbb_users ON referral_username=username WHERE referral_since BETWEEN 1538867101 AND 1541718318 AND user_posts >= 2 GROUP BY referrer_username ORDER BY referrals_count DESC
Admin controller

Code: Select all

			case 'stats':

				$this->template->assign_vars(array(
					'VIEW_STATS'	=> true,
				));

				$sql = 'SELECT * ,
					COUNT(referrer_username) AS referrals_count
					FROM ' . $this->referral_table . '
						LEFT JOIN ' . USERS_TABLE . '
						ON referral_username=username
					WHERE referral_since
					BETWEEN ' . $start_date . ' AND ' . $end_date . '
						AND user_posts >= ' . $ref_min_posts . '
					GROUP BY referrer_username
					ORDER BY referrals_count DESC';
				$result = $this->db->sql_query($sql);
Changing this line

Code: Select all

GROUP BY referrer_username
to

Code: Select all

GROUP BY user_id, referral_id, referrer_username
seems to do the trick, have a look.

Re: [3.1][3.2][DEV] Referrals

Posted: Sun Oct 07, 2018 5:00 am
by dmzx
3Di wrote:
Sat Oct 06, 2018 11:11 pm
Not compatible with ONLY_FULL_GROUP_BY, to reproduce go viewing stats in contests (ACP).
General Error
SQL ERROR [ mysqli ]

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bb.phpbb_referrals.referral_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [1055]

SQL

SELECT * , COUNT(referrer_username) AS referrals_count FROM phpbb_referrals LEFT JOIN phpbb_users ON referral_username=username WHERE referral_since BETWEEN 1538867101 AND 1541718318 AND user_posts >= 2 GROUP BY referrer_username ORDER BY referrals_count DESC
Admin controller

Code: Select all

			case 'stats':

				$this->template->assign_vars(array(
					'VIEW_STATS'	=> true,
				));

				$sql = 'SELECT * ,
					COUNT(referrer_username) AS referrals_count
					FROM ' . $this->referral_table . '
						LEFT JOIN ' . USERS_TABLE . '
						ON referral_username=username
					WHERE referral_since
					BETWEEN ' . $start_date . ' AND ' . $end_date . '
						AND user_posts >= ' . $ref_min_posts . '
					GROUP BY referrer_username
					ORDER BY referrals_count DESC';
				$result = $this->db->sql_query($sql);
Changing this line

Code: Select all

GROUP BY referrer_username
to

Code: Select all

GROUP BY user_id, referral_id, referrer_username
seems to do the trick, have a look.
Will check it.