Now working
Now working
I made this changeTheButcher2 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
http://www.gimplearn.net/viewtopic.php/ ... f=5&t=1610scriptman wrote: Sun Aug 26, 2018 9:02 pm Could you please make this compatible with Ultimate Points?
Will look into these requests.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.I'm looking forward to tracking the development of this extension!
- 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?
Thanks
ONLY_FULL_GROUP_BY
, to reproduce go viewing stats
in contests
(ACP).Admin controllerGeneral 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
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);
Code: Select all
GROUP BY referrer_username
Code: Select all
GROUP BY user_id, referral_id, referrer_username
Will check it.3Di wrote: Sat Oct 06, 2018 11:11 pm Not compatible withONLY_FULL_GROUP_BY
, to reproduce go viewingstats
incontests
(ACP).
Admin controllerGeneral 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 DESCChanging this lineCode: 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);
toCode: Select all
GROUP BY referrer_username
seems to do the trick, have a look.Code: Select all
GROUP BY user_id, referral_id, referrer_username