Membergroup On Registration

Started by codenaught, September 30, 2006, 09:44:18 PM

Previous topic - Next topic

syrimo


syrimo

#101
aha... will try this step.
Quote from: JustJen on December 09, 2006, 11:51:59 AM
I'm getting an error at this point:

4.     Execute Modification     ./Themes/default/Register.template.php     Test failed

ETA~~ It was not getting along well with the Gender on Registration mod installed. Seems to work fine if this mod is applied first and Gender second. Who knows why, but whatever.

aha... will try this step.

perplexed

hmmm I already have this installed on another forum but today when I tried to install it on my test forum there is a weird problem

It installed ok with no fails but now at the top of my site there is this:

Quote
$txt['pick_group'] = 'Pick your membergroup'; $txt['allowed_groups_reg'] = 'Groups that members can register to upon registration'; $txt['allowed_groups_reg_not_all'] = 'Groups with forum management permissions are not selectable for security reasons'; $txt['allowed_groups_reg_no_groups'] = 'Every membergroup has at least one permission that involves forum management so there are currently no groups you can select to allow your members to register to.'; $txt['allowed_groups_reg_default'] = '--No special membergroup--'; $txt['allowed_groups_reg_default_help'] = 'This allows you to select the groups that you would like members to be able to select during registration. Just hold down Alt + S to select multiple groups. Groups with the following permissions allowed are not selectable and do not appear on the list: Administrate forum and database, Manage boards and categories, Manage attachments and avatars, Manage smileys, Edit news, Moderate forum members, Manage and assign membergroups, Manage permissions, Manage ban list, and Send a forum email to members.'; $txt['allowed_groups_type'] = 'Set group as primary group or secondary group'; $txt['allowed_groups_type_help'] = 'If you pick primary group, the member\'s primary group upon registration will be the one they selected. If secondary group is selected, the member\'s group they selected will be their secondary group.'; $txt['allowed_groups_primary'] = 'Primary Group'; $txt['allowed_groups_secondary'] = 'Secondary Group';

and it won't go away.  Any ideas?

M_rTable

Hello


This is a great mod, but, how do i make the "Select membergroup" mandatory? Has users can select "no memebergroup" and them they will be has newbies...how to make the mg select mandatory? I mean users MUST select one mode on registering.


Thanks

M_rTable

bump,,,still wheres the mod creator?



This is a great mod, but, how do i make the "Select membergroup" mandatory? Has users can select "no memebergroup" and them they will be has newbies...how to make the mg select mandatory? I mean users MUST select one mode on registering.


Thanks

codenaught

perplexed, I believe if you move the line in Themes/default/languages/Modifications.english.php:

?>

To the very end of the file, that would take care of your problem.

M_rTable, sorry for the long time to respond.

Open Sources/Register.php:

Find:

$context['membergroups'][0] = $txt['allowed_groups_reg_default'];

And remove it or comment it out.

Next find:

// Seriously is the ungrouped/regular membergroup the only group they can register to?
if(count($context['membergroups']) == 1)
$context['no_avail_groups'] = true;


And change to:

// Seriously is the ungrouped/regular membergroup the only group they can register to?
if(count($context['membergroups']) == 0)
$context['no_avail_groups'] = true;


Find:

// Well, if you don't agree, you can't register.
if (!empty($modSettings['requireAgreement']) && (empty($_POST['regagree']) || $_POST['regagree'] == 'no'))
redirectexit();


After add:

if (empty($_POST['ID_GROUP']))
fatal_error("You must select a group");
Dev Consultant
Former SMF Doc Coordinator

M_rTable

Quote from: akabugeyes on February 29, 2008, 04:20:07 PM
perplexed, I believe if you move the line in Themes/default/languages/Modifications.english.php:

?>

To the very end of the file, that would take care of your problem.

M_rTable, sorry for the long time to respond.

Open Sources/Register.php:

Find:

$context['membergroups'][0] = $txt['allowed_groups_reg_default'];

And remove it or comment it out.

Next find:

// Seriously is the ungrouped/regular membergroup the only group they can register to?
if(count($context['membergroups']) == 1)
$context['no_avail_groups'] = true;


And change to:

// Seriously is the ungrouped/regular membergroup the only group they can register to?
if(count($context['membergroups']) == 0)
$context['no_avail_groups'] = true;


Find:

// Well, if you don't agree, you can't register.
if (!empty($modSettings['requireAgreement']) && (empty($_POST['regagree']) || $_POST['regagree'] == 'no'))
redirectexit();


After add:

if (empty($_POST['ID_GROUP']))
fatal_error("You must select a group");



Nothing was changed! Nothing!
The "Dont select membergroup" is STILL there!


Btw hen finding

// Well, if you don't agree, you can't register.
if (!empty($modSettings['requireAgreement']) && (empty($_POST['regagree']) || $_POST['regagree'] == 'no'))
redirectexit();


it doesnt find it!


codenaught

Well I even tested it myself, if the changes I posted were applied properly, then there is no way the "No Membergroup" option could still be there, because I told you to remove code that assigns that text string as an option.

I'm not sure why that code isn't there, it should be under the Register2() function in that file.

How about finding this code instead?

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


If you can find that, then you can add the code after that.

Make sure you upload the files over the existing ones and that the changes are going through. One way to check would be to download the file again from FTP somewhere on your computer and checking the file to see if the file has the modified code.
Dev Consultant
Former SMF Doc Coordinator

M_rTable

#108
Can you give me the install file that you correct now? with the changes you did to work good cause I dont know what im doing wrong... :-[

Shortrnd

Quote from: akabugeyes on March 01, 2008, 05:03:00 PM
Well I even tested it myself, if the changes I posted were applied properly, then there is no way the "No Membergroup" option could still be there, because I told you to remove code that assigns that text string as an option.

That worked for me aka.  Thanks a ton.


perplexed

Quote from: akabugeyes on March 01, 2008, 05:03:00 PM
Well I even tested it myself, if the changes I posted were applied properly, then there is no way the "No Membergroup" option could still be there, because I told you to remove code that assigns that text string as an option.

I'm not sure why that code isn't there, it should be under the Register2() function in that file.

How about finding this code instead?

// You can't register if it's disabled.
if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
fatal_lang_error('registration_disabled', false);


If you can find that, then you can add the code after that.

Make sure you upload the files over the existing ones and that the changes are going through. One way to check would be to download the file again from FTP somewhere on your computer and checking the file to see if the file has the modified code.

Just to let you know that I applied these changes too but I just realised today that when you try to register, after selecting a group, and hitting enter to register, it takes you to a page that says :

An Error Has Occurred!
You must select a group, you can join other groups after logging into the forum

only realised this was happening when I looked in the error log and there are 6 guests who have tried to register since yesterday and are getting rejected, so it's making it that no one can register.

I've had to remove the changes as no one can register.

Stigmartyr

I just wanted to drop in and say this is an amazing mod.  w0ot!

I am putting it to use building a Mustang Owners directory here: http://stangnation.com/index.php?page=8

Its going to save me a poop load of time.  When ever you get that Profile feature working so they can make changes to their member groups later that would be awesome.

Also, I did read the entire thread and just wanted to ask again what would be the best way to allow multiple selections @ registration?

Some of our members own more than one kind of Mustang.

Thanks again,

Stig
www.StangNation.com

cellax

It is a wonderful mod, but I think it's very important to add the possibility to change the usergroup on profile too.

like a prayer

O:) I think that the pissibility to change the usergroup on profile will make this mod very important and usefull

Achilles991

I was wondering if i could let member to choose 2 groups? My forum has 3 types of groups, and i would like every member to choose two groups himself on registration, so i have less work to do.
I am sure that it is possible, but my question is how do i do it?

Stigmartyr

If ANYONE has suceeded in making it so you can select more than one group during registration, or has been able to put the option to choose groups in member profiles, please reply.  This is VERY IMPORTANT and USEFUL for the mod and for SMF in general!

Thank you!

codenaught

Just dropping by to say this mod works with just released SMF 1.1.5.

Stigmartyr, I will try to look into adding an option for members to be able to select more than one group in the future.

Also, SMF 2.0 has a joinable and requestable group feature which I think pretty much would take care of the need for this mod to cover such functionality.
Dev Consultant
Former SMF Doc Coordinator

Stigmartyr

Quote from: akabugeyes on May 01, 2008, 06:39:39 PM
Just dropping by to say this mod works with just released SMF 1.1.5.

Stigmartyr, I will try to look into adding an option for members to be able to select more than one group in the future.

Also, SMF 2.0 has a joinable and requestable group feature which I think pretty much would take care of the need for this mod to cover such functionality.

Thanks!  Im scared to death of SMF 2.0 because I have so many mods already, and I dont want to kill the site.  Are you aware of anyone else who's enjoyed a smooth transition?  Also I use TinyPortal.

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

codenaught

Should be soon. I already upgraded all my other mods. Just have a few things I need to take care of first.

Oh and yes that is right. I misspoke in my previous post suggesting that this mod would not be available for 2.0. What I really meant to say was that functionality of allowing members to change their group in their profiles wouldn't be as needed because in SMF 2.0 there is joinable and requestable groups.
Dev Consultant
Former SMF Doc Coordinator

Advertisement: