Page 1 of 9

Groups on Registration and Custom Profile Fields

Posted: Tue Dec 01, 2009 5:05 am
by Extensions Robot
Modification name: Groups on Registration and Custom Profile Fields
Author: mtrs
Modification description: This mod can display groups on registration screen to join. Displayed groups cannot be special groups; request, closed and hidden type group membership requests need to be approved. It can also brings the ability of adding users to groups based on custom profile fields data. Whenever a user's custom profile fields data is changed, custom profile fields groups are updated. Admininistrators can batch add/remove users to/from custom profile fields based groups at ACP.
Modification version: 1.0.1
Tested on phpBB version: 3.0.6

Download file: Group_on_Registration_and_Custom_Profile_Fields_v1.0.1.zip
File size: 154.48 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--

Groups on Registration and Custom Profile Fields

Posted: Tue Dec 01, 2009 5:05 am
by DavidIQ
Modification validated/released

Notes:

Groups on Registration and Custom Profile Fields

Posted: Tue Dec 01, 2009 5:05 am
by mtrs
Thank you MOD Team validating this mod.
***********************
AutoMOD install 1.0.1 on 3.0.7-PL1 just fine. Using AutoMOD is recommended.
Also, don't forget to run database update script after file edits. See DIY section in install.xml
***********************
WARNING:
If you change and save custom profile field settings, your Custom profile fields based Groups settings are lost. You'll have to do mod setting again.
***********************
Features:
  • ACP control module
  • Display normal groups to join on registration
  • Require joining a group on registration
  • Selected group can be set default
  • Subsilver2 support
  • Groups based on custom profile fields
  • ACP batch add and remove users to custom profiles based groups
  • User profile change can change custom profile based groups
  • Multiple groups selection on registration
  • Custom profile fields based groups auto add without pending option
Made upon request in this topic.

**********************
Registration Screen
Registration Screen
group-on-registration.png (28.71 KiB) Viewed 12148 times
ACP Controls
ACP Controls
group-on-reg-acp-2.png (49.52 KiB) Viewed 12148 times

Re: Groups on Registration and Custom Profile Fields

Posted: Tue Dec 01, 2009 2:13 pm
by nasadows
finally... congrats mtrs :mrgreen: the mod version now seems too small compared to the past :lol:

One question: now we have Newly reg users group in 306. from the ACP we can set it to be the default group too. How does GRCPF handle that when it has its own "add to default group" settings? will this cause a conflict?

Re: Groups on Registration and Custom Profile Fields

Posted: Tue Dec 01, 2009 2:19 pm
by mtrs
Thanks for the congrats
nasadows wrote:One question: now we have Newly reg users group in 306. from the ACP we can set it to be the default group too. How does GRCPF handle that when it has its own "add to default group" settings? will this cause a conflict?
This mod adds users to groups after user_id created by user_add() function, which also adds users to the default (Registered or Newly Registered users) groups and sets default group. Thus, no conflict can be expected.

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 12:48 pm
by stainless_steelrat
I'm not sure if it's a bug or not yet.... I've just completed the install of the mod on 3.0.6 this morning. (still should check all my edits again).

So here's the issue... I'm trying to have a group assigned based on a CPF field. It's a drop down style, and it's only available to admins. The CPF is configured like this....

option 1: Contributing
option 2: non-contributing

Option2 is default.

When I go to use option 1 for a group assignment it doesn't work right. All it shows is -- in the drop down menu. I'm not sure if the mod doesn't allow for the "first" id in the drop down to work or not.

Suggestions?

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 12:54 pm
by mtrs
Can you add ACP screenshot?

Try dropdown list like
Gender
    • ?
      Female
      Male

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 4:43 pm
by stainless_steelrat
Here's a screen cap....

It shows the drop down list of available fields. The first one is listed with -- instead of the name in the list.

I tried adding a "third" option called default which does show up on the list.

Thanks.

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 4:50 pm
by stainless_steelrat
Trying your suggestion, I created another field (a like the one I have, and b) with the ?, male, female.

At this point the "gender" field works the same way.... the first entry is not a visible option to assign the group to.... the ? doesn't show, but the male/female options do.

So it definately seems like it's not reading the first "entry" in the list as an option for assigning groups. Almost like it thinks its a "lable" field.

Thanks for the support thus far. Let me know if that helps clear it up any.

I know I could go through and adjust the CPF field with a "crap" option as the first option, but it would mean that I would have to change a whole bunch of additional code that I have written to lock accounts out automatically based on the values in that field. (more of a PITA than anything else).

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 7:05 pm
by mtrs
stainless_steelrat wrote:So it definately seems like it's not reading the first "entry" in the list as an option for assigning groups. Almost like it thinks its a "lable" field.
I checked the code again, the first option is ignored for a reason, to avoid adding anyone to groups by means of first option.

You can remove that limit and test if it fits your needs

Open
includes/acp/acp_groups_reg.php
Find (2 occurances) and delete

Code: Select all

AND l.option_id <> 0

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 8:02 pm
by stainless_steelrat
Yeah, that seems to be OK.... except that it is giving me an error when I go to remove the entry now....

It says invalid group_id. So there's probably another "check" value on one of the other sql queries....

Thanks for the quick suggestion.

Although, looking at it, if you are suggesting that it's a check value, maybe I should make the other changes, and leave this mod as stock. <G>

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 10:42 pm
by mtrs
stainless_steelrat wrote:Although, looking at it, if you are suggesting that it's a check value, maybe I should make the other changes, and leave this mod as stock. <G>
I can say that, since, it is tested for a few months as it is now. So, using as it is, shall be preferred.

Re: Groups on Registration and Custom Profile Fields

Posted: Mon Dec 14, 2009 11:47 pm
by stainless_steelrat
OK, working on putting the other code up to the right configuration. I'll probably "uninstall" the mod through umil to clear any database weirdness and then go back.

Thanks for the help though....

Re: Groups on Registration and Custom Profile Fields

Posted: Tue Dec 15, 2009 12:08 pm
by PinoyEngineâ„¢
Is there a way those who already registered before this MOD was installed be ask again to choose what group should they join?

Thanks.

Re: Groups on Registration and Custom Profile Fields

Posted: Tue Dec 15, 2009 3:12 pm
by mtrs
PinoyEngineâ„¢ wrote:Is there a way those who already registered before this MOD was installed be ask again to choose what group should they join?
For first option : No
For custom profile based groups: Yes - synchronise cpf based groups at ACP