News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Gender On Registration

Started by JayBachatero, August 01, 2006, 11:51:17 PM

Previous topic - Next topic

JayBachatero

Link to Mod

This was originally posted to Tips & Tricks by [Unknown] - packaged as a mod by JayBachatero

http://www.simplemachines.org/community/index.php?topic=27772.0
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

denislici


would he/she be forced to choose ?
Love the Creature for Creator's sake. (English)
Duje Krijesen per hire te Krijuesit. (Albanian)
Yaradılan'ı sev Yaradan'dan ötürü. (Turkish)
Ami la Creatura per ce la creato il Creatore. (Italian)

JayBachatero

No but you can make it be required.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

fasterthanyours

Can you make a mod or is there a mod for requiring Location?

JayBachatero

There is a Tip & Tricks about it I believe.  I know it was asked for many many times before..
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

desistyle

will this work for smf 1.1 rc3

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

desistyle

An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted. :-[

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

desistyle

did it w/o a problem thanks

Installations actions for "Gender On Registration":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Themes/default/Register.template.php    Test successful

Gobo

#10
Quote from: denislici on August 02, 2006, 07:10:54 AM

would he/she be forced to choose ?
Quote from: JayBachatero on August 02, 2006, 12:16:50 PM
No but you can make it be required.

could you tell me how?

Aku


JayBachatero

In Register.template.php Find and remove

<input type="radio" name="gender" value="0" checked="checked" tabindex="', $context['tabindex']++, '" /> ', $txt[470], '<br />
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dustydogge

Quote from: JayBachatero on November 11, 2006, 12:23:46 AM
In Register.template.php Find and remove

<input type="radio" name="gender" value="0" checked="checked" tabindex="', $context['tabindex']++, '" /> ', $txt[470], '<br />


Yes but that just removes the "N/A" option from the 3 options, leaving just "male" and "female" to be chosen. But with this code, if you choose neither the registration still goes ahead. What I mean was, can it be changed so that if the applicant doesn't make a choice out of the two, the registration does not complete? A popup giving an error and directing the applicant to choose one of them would be perfect.

JayBachatero

True.  It was just a quick fix.  You can make it that "female" is picked by default and that would make them change it ;).  I'll see what I can do about making it mandatory.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dustydogge

Hehe sure, thanks but I'd still prefer if they HAD to make a choice themselves. Sometimes, guys would pretend to be girls on the forum and I don't wanna help them out by pre-selecting "female" as the gender.

Please do let me know if you come up with something. Thanks.

JayBachatero

Ok I haven't tried this so not sure if it's going to work.  In Subs-Member.php
Code (find) Select

// Setup the activation status on this new account so it is correct - firstly is it an under age account?
if ($regOptions['require'] == 'coppa')


Code (add before) Select

// Make them pick a gender.
if (empty($regOptions['extra_register_vars']['gender']))
fatal_error('Please select a gender');
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dustydogge

I assume that the Subs-Member.php you are talking about would be located in the Sourcesnew folder, since I upgraded to RC3.

After modifying it, there is no change....the registration still proceeds. No fatal errors.

JayBachatero

Yes that's the correct file.  I'll look into it tom and post something.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

rockinaway

Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

Advertisement: