[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!
Get Involved
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 »

The mod is working great, and your added code to do the "Password to group" is also working perfectly.

One step further, can you show me how to make the password work with Groups at Reg rather than with Groups on CPF?

Since once chosen the CPF way I will have to adapt with the problem that the "link" between CPF <-> Group seems to reset after each config save (and I expect I will be re-configging quite often to add new groups / change the settings), it may be more convenient / time saving to use Group at Reg rather than CPF to accomplish the task. :)

Thank you so much again for this wonderful mod!
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 »

Open
styles/prosilver/template/ucp_register.html
Find

Code: Select all

	<dl>
		<dt><label for="tz">{L_TIMEZONE}:</label></dt>
		<dd><select name="tz" id="tz" class="autowidth">{S_TZ_OPTIONS}</select></dd>
	</dl>
After add

Code: Select all

	<dl>
		<dt><label for="group_password">{L_GROUP_PASSWORD}:</label><br /><span>{L_GROUP_PASSWORD_EXPLAIN}</span></dt>
		<dd><input type="text" tabindex="1" name="group_password" id="group_password" size="25" value="" class="inputbox autowidth" title="{L_GROUP_PASSWORD}" /></dd>
	</dl>
Open
language/en/mods/group_on_regs.php
Find

Code: Select all

	'SHOULD_SELECT_GROUPS'					=> 'You should one or more groups',
After add

Code: Select all

	'GROUP_PASSWORD'						=> 'Group password',
	'GROUP_PASSWORD_EXPLAIN'				=> 'You may enter pasword to be added to group automatically',
Open
includes/functions_group_on_regs.php
Find

Code: Select all

		//We add user to a new group selected on registration
Before add

Code: Select all

		if (request_var('group_password', '') == 'test-1234')
		{
			$pending = 0;
		}
I haven't tested this code, but I expect it to work, auto-pending members to one or more groups.
password is "test-1234"
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 only see 1 password, can it be used with different pass per group like what you did with CPF?
It sounds harder this way for you, I guess, because the last time it was with CPF you can use an array with the same suffix _passwords?

If it is much complex than CPF, I might just keep the old way. Thanks.
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 »

nasadows wrote:I only see 1 password, can it be used with different pass per group like what you did with CPF?
To use different passwords for groups on registration
Use the edits instead
Open
includes/functions_group_on_regs.php
Find

Code: Select all

		//We add user to a new group selected on registration
Before add

Code: Select all

 $groups_passwords = array();
$groups_passwords[5] = 'aaa124';
$groups_passwords[12] = 'bbb248';
$groups_passwords[15] = 'ccc369';
//5, 12 and 15 are the group_ids those are displayed on registration
          if (isset($groups_passwords[$group_id]) && request_var('group_password', '') == $groups_passwords[$group_id])
          {
             $pending = 0;
          }
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 »

means so much to me, thanks! I will try right away
charley
Registered User
Posts: 132
Joined: Sun Oct 12, 2003 11:08 pm
Location: Motherwell, Scotland

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

Post by charley »

This mod isn't working on 3.0.6. When a user registers, an error message appears. Has anyone else upgraded to 3.0.6 and found this error?

Error:

Code: Select all

Fatal error: Cannot redeclare messenger::$tpl_obj in /...../includes/functions_messenger.php on line 34
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 »

This mod doesn't touch /functions_messenger.php, do you have any other mods in your board?
I abandoned all of my mods.
charley
Registered User
Posts: 132
Joined: Sun Oct 12, 2003 11:08 pm
Location: Motherwell, Scotland

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

Post by charley »

mtrs wrote:This mod doesn't touch /functions_messenger.php, do you have any other mods in your board?
I do have other mods. For some reason I thought functions_messenger.php was part of this mod. My apologies.
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 »

3.06 has come out, can we hope for a finalised (approved) version of this mod soon ? :D
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 »

3.0.6 came out, but I will need to test and update the mod package for 3.0.6, then submit to MODDB again. I haven't done it yet.
I abandoned all of my mods.
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

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

Post by mtrs »

Mod updated for 3.0.6
- Magic number replaced in a couple of places
- Custom profile fields warning added
See contrip folder to update from RC4/Rc5 to RC6/1.0.1 (only on 3.0.6)
If you use 3.0.5 use RC5 version of this mod, see first post to download
I abandoned all of my mods.
charley
Registered User
Posts: 132
Joined: Sun Oct 12, 2003 11:08 pm
Location: Motherwell, Scotland

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

Post by charley »

I've got this mod running on 3.0.6 with no problems (mod version RC5).

I'm assuming the latest update is minor changes, and that the mod functionality in version RC5 isn't at risk? I will be updating to RC6, but I can't get round to it straight away unless there are major problems addressed in the latest update?

TIA
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

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

Post by mtrs »

The functions-features are the same in RC5 and RC6-1.0.1, but there was AutoMOD install error with RC5-3.0.6. The RC6-1.0.1 update fixes that AutoMOD install error. It is due to function added for cpf update in ucp profile, and acp users files in 3.0.6. But, you cannot install RC6-1.0.1 to 3.0.5, due to updated file edits for 3.0.6
I abandoned all of my mods.
appmodo
Registered User
Posts: 70
Joined: Fri Nov 27, 2009 11:37 pm

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

Post by appmodo »

I have an in depth question...

What i'm trying to do is utilize color post background on specific users (developers), to differentiate their posts in the forum. A mod is available to do this: http://www.phpbb.com/community/viewtopi ... s&start=90

However it is only available to Admins/Group Moderators for colored posts. The author is also not adding any updates and is busy.

I want users to be able to select whether they are a developer or an enthusiast in the registration form (which i've already set up).

Is there a way to cheat the registration/database and allow users to signup as a "Developer" but really set as a Group Moderator? The actual permissions for a group moderator have been limited extensively, same as a newly registered user so that is not an issue.

How can i go about changing this groups on registration form to register group moderators by default rather than "newly registered" users?


any help is appreciated
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

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

Post by mtrs »

appmodo wrote:How can i go about changing this groups on registration form to register group moderators by default rather than "newly registered" users?
This does not affect default setting as adding to groups at registrations, (Registered users, Newly registered users).
Second, as a security precaution, this mod cannot add users to groups having a_ and m_ permissions.
I abandoned all of my mods.
Locked

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