[MODDB] Groups on Registration and Custom Profile Fields

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!
Anti-Spam Guide
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by mtrs »

I will add a warning about the issue stated by Jaifaime. Custom profile fields saving resets the order and groups list for that cpf of this mod.
That is inherent in phpBB3 custom profile fields ACP design. To fix that, would mean rewriting this mod.
You just need to create a dropdown box type custom profile field and set its options. If you change custom profile field dropdown options (or press submit for relevant cpf), you should control groups setting, add groups again. It is that simple.
I abandoned all of my mods.
Shi3A
Registered User
Posts: 1
Joined: Mon Oct 12, 2009 3:51 pm

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by Shi3A »

Mia J wrote:Hey

That's a great mod and I'm really love it, but.......

I made a testuser to sign in and even if I choose a group to join I get this messages: "You should select a group", the groupfield is empty again and I can't get further :-(

What's wrong????

I hope you understand my "english"

Mia J
Hi all! I have the same problem...
My php version - 5.2.6
My phpbb version - 3.0.5
I check code - no mistake
My setting is similar as in screenshot

What's wrong?

I'm sorry for my bad english =)
Mia J wrote:THANKS for your help :D

I have set the first code in after this

Code: Select all

'tz'				=> request_var('tz', (float) $config['board_timezone']),
:oops:

Sorry for the troubble.
Sorry, Has not watched T_T
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by nasadows »

This mod combines CPFields and Group Selection into 1 at registration. So if you choose "This CPF is required field at registration" (while creating the CPF) and Require user to choose a group (in HIS Mod ACP setting) AT THE SAME TIME, the registration field thinks that there are 2 fields to be required to filled in. But there are just 1 field, so it is an endless loop.

De-select the required field in CPF settings should fix it.

THATS what I remember. I ran into this problem 2 weeks ago. Sorry if its not correct.

But if its true, it is a bug.
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by mtrs »

There are two different features for adding users to groups
  • 1. Mod adds a TINY BOOL column to GROUPS_TABLE thus, one or more groups can displayed on registration to join. The selected group can be default if there is only one group will be selected. If more than one group is let to be selected, default option disabled.
  • 2. Mod adds group and group_id values to Custom profile fields table, thus, users are added to groups based on theirt custom profile fields selection on registration, UCP profile page, and ACP user overview.
Feature 1 and 2 are independent.
nasadows wrote:This mod combines CPFields and Group Selection into 1 at registration. So if you choose "This CPF is required field at registration" (while creating the CPF) and Require user to choose a group (in HIS Mod ACP setting) AT THE SAME TIME, the registration field thinks that there are 2 fields to be required to filled in. But there are just 1 field, so it is an endless loop.

De-select the required field in CPF settings should fix it.

THATS what I remember. I ran into this problem 2 weeks ago. Sorry if its not correct.

But if its true, it is a bug.
You have stated before, you couldn't successfully installed and run this mod. I believe you can expand "endless loop" definition.
I abandoned all of my mods.
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by nasadows »

I mean the registerer will meet an "endless loop" (error message again and again: field required) and cannot register, until the board admin fix it like I said. I'm not sure how I fixed it btw, the above is just what I remember it to be. However that is just one of the several problems I encounter with this mod. The more important problem is that even the user can register it does not add him right to the group he selected (well actually it added, but as "Pending" only), I have to manually approve him no matter what settings I choose.

3.0.6 seems to take forever to surface now...
User avatar
RMcGirr83
Former Team Member
Posts: 21969
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by RMcGirr83 »

nasadows wrote:3.0.6 seems to take forever to surface now...
I know, it's been what a whole month already? :roll:
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by nasadows »

sounds sarcastic man I dont blame the bb guys I just express my feelings as a person waiting impatiently for the next release

especially when many of my quite heavily modded forums are just waiting in line to be upgraded from 3.0.4. I can't afford upgrading to 3.0.5, and then suddenly 1 week after that, 3.0.6 comes out.

And especially when all the MODDERS (of the mods Im interested in) seems to stop working also, they too are hibernating for 3.0.6
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by nasadows »

Okay, I've spent a part of the weekend last week to upgrade my boards to 3.0.5, and then install the Mod for the 3rd time Also I've just re-read all 9 pages here :D The good news is, I'm starting to understand quite well the working mechanism of your mod.
Basically my confusion was that "Groups on Registration and Custom Profile Fields" are the same thing. In fact, it is 2 different things
  • one, Groups on Registration (1), displays a selection box at Reg without having to do anything to the CPF.
    IT CAN SET THE SELECTED GROUP AT REG TO BE THE DEFAULT GROUP, BUT CANNOT BYPASS THE PENDING PROCEDURE OF CLOSED OR HIDDEN GROUPS
  • the other, Groups on Custom Profile Fields (2), is like a "synchronisation tool" for the Admin. It does not do anything automatically for the user at Registration, nor does it do anything periodically (at regular time intervals).
    IT CANNOT SET THE SELECTED GROUP AT REG TO BE THE DEFAULT GROUP, BUT CAN BYPASS THE PENDING PROCEDURE OF CLOSED OR HIDDEN GROUPS
AND, (2) also adds ANOTHER selection box at Registration along with the first, that is the reason for MOST of my confusion.
The intention of mine, even BEFORE starting out looking for such a mod (which is yours), is that I will have a group selection based on CPF. I didn't expect it to be "simpler" as much as to just bring the Group list to reg without any CPF touching! When I see the (2) selection box showed up, I wasn't aware that (1) can also create a selection box, and there are a whole lot of separate yet alike-looking sets of configuration for each individual (1) and (2). I just thought that they somehow join into 1!
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by nasadows »

mtrs wrote:As I stated before, I will not add a new feature to the mod package. But, since your idea is good and easy to implement, I added below a few code change edits a hard coded group passwords array() to function file. You'll have to edit that file to hardcode enter your group names and auto add group passwords.

Open
includes/functions_group_on_regs.php

Find

Code: Select all

	$group_default = false;
After add

Code: Select all

	$groups_passwords = array(	'male'	 	=> 'securegroups', 
								'female' 	=> 'femalesecurepass',
								'history' 	=> 'historyesecurepass',
								'math'		=> 'algebra45',
						);
Find

Code: Select all

				$pending = (in_array($row['group_id'], $groups_free)) ? 0 : 1;
After add

Code: Select all

				if (isset($user_fields['pf_' . $row['field_name'] . '_password']))
				{
					$pending = ($user_fields['pf_' . $row['field_name']  . '_password'] == $groups_passwords[$row['group_name']]) ? 0 : $pending;
				}
After this code change you should do something else.
Suppose you have gender custom profile fields with male and female options. Also, you have male and female groups connected to gender:male and gender:female cpf fields.

So, create a single text field type password custom profile field
Field identification: "gender_password".
Enter group names and password in $groups_passwords array.

If user enters a correct password on registration for the relevant group, will be added to group automatically. Otherwise, an administrator might have to approve group memberships for hidden and closed groups.

thanks, it works flawlessly. I even managed to Add the group as Default for user in the CPF case, by just changing false to true in your function file, very simple, thanks very much!
gillian
Registered User
Posts: 9
Joined: Fri Sep 12, 2008 10:12 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by gillian »

I may be silly but I need help.

Have never previously worked with 'umil' so although I have downloaded the directory included in this MODs folder and uploaded the new MOD php files to my forum directory, then manually edited the files specified in the xml install instructions, I get NO changes to register page or acp users & groups.

Should I be using umil is some way? I am using phpBB 3.0.5 and the MOD download at the head of this forum.

I have cleared cache etc and read all posts here - still no change!

Can someone help?
User avatar
Jaifaime
Registered User
Posts: 170
Joined: Wed Jun 10, 2009 12:16 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by Jaifaime »

You purged both your sites cache through the ACP and your browsers cache (ctrl+F5 on most browsers)?
This account is inactive. Have a nice day.
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by mtrs »

gillian wrote:Should I be using umil is some way? I am using phpBB 3.0.5 and the MOD download at the head of this forum.
After making file edits and copying included files in root/ folder of this mod, you should run install script. See DIY instruction at the end of install.xml file, install script also clears cache at the end.

After that, you should be able to see ACP module of this mod, then configure mod. See first message in this topic.
I abandoned all of my mods.
gillian
Registered User
Posts: 9
Joined: Fri Sep 12, 2008 10:12 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by gillian »

Thank you Jaifalme and mtrs for replies. Have actioned them BUT still no change to standard register & acp user & groups. I have reinstated original backup files, removed all MOD root files and started again.

1. Uploaded files to appropriate directories within my "forums directory" as per install.xml
2. Edited root files specified in install.xml
3. Cleared board and browser caches (even though mtrs says this is meant to happen at 4 under)
4. Via browser went to ../forums/install_groups_cpf_reg.php.

Action 4 simply took me to the board's normal LOGIN page. I am NOT using Prosilver but alternative style called Saphic though I did amend ../styles/saphic/template/ucp_register.html there instead of Prosilver.

Except for style change and CAPTCHA answer a question MOD my board is standard phpBB 3.0.5

Any other thoughts?
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by mtrs »

gillian wrote:4. Via browser went to ../forums/install_groups_cpf_reg.php.
You have to run install script successfully, after that, you should be able to see Module added by this mod.

Can you add ACP groups page screenshot?
I abandoned all of my mods.
gillian
Registered User
Posts: 9
Joined: Fri Sep 12, 2008 10:12 am

Re: [RC5] Groups on Registration and Custom Profile Fields

Post by gillian »

mtrs wrote:You have to run install script successfully, after that, you should be able to see Module added by this mod.
Thanks mtrs - all is now working and mod is just what I need for my board!

For some reason, having arrived at my login page vis the script and logged in there was a noticeable delay before your mod install message appeared. Anyway, being impatient I had not waited for that to happen and click the "yes" button. More speed, less haste!

Thanks again.
Locked

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