Advertisement:

Author Topic: Ask for gender during registration  (Read 129850 times)

Offline kerux4

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
Ask for gender during registration
« on: February 13, 2005, 02:08:48 PM »
Notice:
This tip has been in some way ported over to be a modification package located on the SMF modsite. Please note, the mod package may not do the exact same function and may not even use any of the code originally written for the tip, but should still hold the same basic functionality of the tip posted here. With the mod package for this tip, you can now let the SMF package manager make the code changes for you without you having to look at the code and edit it manually.

For documentation on using the SMF package manager, view this document.

To download the modification package, [please click here].

Is there a mod that makes people choose gender at registration? I have a couple of forums which one is for men and one for women.
« Last Edit: August 01, 2006, 11:52:49 PM by Jay The Code Monkey »
C-YA,
Mike

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Ask for gender during registration
« Reply #1 on: February 14, 2005, 01:20:26 AM »
You can do this the same way you do custom profile fields, using something like:

<input type="radio" name="gender" value="0" checked="checked" /> Leave it to the imagination<br />
<input type="radio" name="gender" value="1" /> Male<br />
<input type="radio" name="gender" value="2" /> Female<br />

In the Register template.

-[Unknown]

Offline kerux4

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
Re: Ask for gender during registration
« Reply #2 on: February 14, 2005, 11:04:14 AM »
Where in there do I put this?
C-YA,
Mike

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Ask for gender during registration
« Reply #3 on: February 14, 2005, 07:02:58 PM »
Where ever you want the option to appear :P.

For example, if you wanted it after the password, you'd find:

Code: [Select]
</tr><tr>
<td width="40%">
<b>', $txt[82], ':</b>
</td>
<td>
<input type="password" name="passwrd2" size="30" />
</td>
</tr>

Add after that:

Code: [Select]
</tr><tr>
<td width="40%">
<b>Gender:</b>
</td>
<td>
<input type="radio" name="gender" value="0" checked="checked" /> Leave it to the imagination<br />
<input type="radio" name="gender" value="1" /> Male<br />
<input type="radio" name="gender" value="2" /> Female<br />
</td>
</tr>

If you're not comfortable with HTML, I suggest you look at the tutorials on www.w3schools.com ;).

-[Unknown]

Offline kerux4

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
Re: Ask for gender during registration
« Reply #4 on: February 15, 2005, 10:13:26 AM »
Alright, I have tried adding this several times and every time I save, it never takes.
C-YA,
Mike

Offline kerux4

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
Re: Ask for gender during registration
« Reply #5 on: February 15, 2005, 10:50:01 PM »
Aha, I figured it out!! yeah :)
C-YA,
Mike

Offline kadhumia_flo

  • Full Member
  • ***
  • Posts: 433
  • Bug Finder/Help Wanter
Re: Ask for gender during registration
« Reply #6 on: August 26, 2005, 05:22:19 PM »
Can i add new questions/>?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Ask for gender during registration
« Reply #7 on: August 26, 2005, 05:33:34 PM »
Can i add new questions/>?

Of course you can ask questions in these topics (like you just did) just don't post new topics in this board that are questions.

-[Unknown]

Offline rojamaia

  • Semi-Newbie
  • *
  • Posts: 83
Re: Ask for gender during registration
« Reply #8 on: August 27, 2005, 05:09:35 AM »

thanks for this post!  i find this very useful.  it's also a good way for me to learn the PHP language, looking at how they modify things in the board, slowly and piece by piece.

Offline desistyle

  • Jr. Member
  • **
  • Posts: 250
  • Gender: Male
Re: Ask for gender during registration
« Reply #9 on: November 21, 2005, 06:40:55 PM »
Where ever you want the option to appear :P.

For example, if you wanted it after the password, you'd find:

Code: [Select]
</tr><tr>
<td width="40%">
<b>', $txt[82], ':</b>
</td>
<td>
<input type="password" name="passwrd2" size="30" />
</td>
</tr>

Add after that:

Code: [Select]
</tr><tr>
<td width="40%">
<b>Gender:</b>
</td>
<td>
<input type="radio" name="gender" value="0" checked="checked" /> Leave it to the imagination<br />
<input type="radio" name="gender" value="1" /> Male<br />
<input type="radio" name="gender" value="2" /> Female<br />
</td>
</tr>

If you're not comfortable with HTML, I suggest you look at the tutorials on www.w3schools.com ;).

-[Unknown]

Sir can tell me what file should i edit ? and where @ plz

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #10 on: November 21, 2005, 06:42:01 PM »
Register.template.php located in /Themes/default folder.
Follow me on Twitter

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

Offline desistyle

  • Jr. Member
  • **
  • Posts: 250
  • Gender: Male
Re: Ask for gender during registration
« Reply #11 on: November 21, 2005, 07:34:39 PM »
Register.template.php located in /Themes/default folder.

Can i use this with 7dana theme too ?

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #12 on: November 21, 2005, 07:37:28 PM »
Well check in the themes folder and check if it inclused a file called Register.template.php  if not just editing the one in the default theme will carry on for all other templated that do not include a custom template.
Follow me on Twitter

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

Offline desistyle

  • Jr. Member
  • **
  • Posts: 250
  • Gender: Male
Re: Ask for gender during registration
« Reply #13 on: November 21, 2005, 07:45:12 PM »
Well check in the themes folder and check if it inclused a file called Register.template.php  if not just editing the one in the default theme will carry on for all other templated that do not include a custom template.

Thanks a lot for ur help smf rocks

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #14 on: November 21, 2005, 07:45:51 PM »
You're welcome.
Follow me on Twitter

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

Offline desistyle

  • Jr. Member
  • **
  • Posts: 250
  • Gender: Male
Re: Ask for gender during registration
« Reply #15 on: November 21, 2005, 08:20:11 PM »
You're welcome.

Sir sorry to bug u again and again i dont know if it works coz when i try to register a new account it says

An Error Has Occurred!
You are not allowed to access this section

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #16 on: November 21, 2005, 08:21:36 PM »
Because you can only register once every 30 minutes.  What you can do is use different browsers to test it out.
Follow me on Twitter

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

Offline desistyle

  • Jr. Member
  • **
  • Posts: 250
  • Gender: Male
Re: Ask for gender during registration
« Reply #17 on: November 21, 2005, 08:22:48 PM »
Because you can only register once every 30 minutes.  What you can do is use different browsers to test it out.

Oh ok thanks a lot :X >:D< you are da best >:D<

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #18 on: November 21, 2005, 08:24:37 PM »
You're welcome.
Follow me on Twitter

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

Offline Senkusha

  • Full Member
  • ***
  • Posts: 625
  • Gender: Male
  • Embrace Your Destiny!
    • Ayeka's Bliss
Re: Ask for gender during registration
« Reply #19 on: November 29, 2005, 11:19:06 AM »
Is there a way to automatically redirect to the profile page after registering?

If I have "registration activation" enabled, could I also link the activation to the profile page?

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Ask for gender during registration
« Reply #20 on: April 03, 2006, 05:53:13 AM »
I did this hack ... yes it put the fields in the registration form to choose .. but that about it .. even you you choose its still blank one the person sign up ??? any ideas ???
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #21 on: April 03, 2006, 02:49:26 PM »
Can you please explain the problem you are having?  I don't really undestand what you are trying to say.
Follow me on Twitter

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

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Ask for gender during registration
« Reply #22 on: April 03, 2006, 03:14:17 PM »
Problem rectified ... thanks  8)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline IncubuS

  • Semi-Newbie
  • *
  • Posts: 14
    • http://www.the-ien.com
Re: Ask for gender during registration
« Reply #23 on: July 25, 2006, 09:17:58 PM »
Little question about this lil add-on :

Can all this gender registration be saved on the database ? just to see a ratio of male vs female .
www.the-ien.com [nofollow]

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Ask for gender during registration
« Reply #24 on: July 25, 2006, 10:14:40 PM »
All that info is stored in the db.
Follow me on Twitter

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

Offline Joshsux

  • Jr. Member
  • **
  • Posts: 277
  • Gender: Male
  • I BROKE STUFF MORE WHEN ITS BROKE
    • Sneaky-Shits
Re: Ask for gender during registration
« Reply #25 on: July 30, 2006, 03:22:58 AM »
Edit: Dont worry got it fixed, the code in my register file was just different to the one he explained.
« Last Edit: July 30, 2006, 03:59:08 AM by Joshsux »
If you can't hear it before you see it, then it ain't a harley

Offline Senkusha

  • Full Member
  • ***
  • Posts: 625
  • Gender: Male
  • Embrace Your Destiny!
    • Ayeka's Bliss
Re: Ask for gender during registration
« Reply #26 on: August 04, 2006, 08:55:17 AM »
Is there a way to REQUIRE the gender (and age) to be filled in upon Registration.  I've added the code, but some members are still bypassing it.

Offline Joshsux

  • Jr. Member
  • **
  • Posts: 277
  • Gender: Male
  • I BROKE STUFF MORE WHEN ITS BROKE
    • Sneaky-Shits
Re: Ask for gender during registration
« Reply #27 on: August 05, 2006, 11:09:04 PM »
they prolly pick the first one thats default which is "dont wanna tell" or some crap i edited the code and removed that, most of the members do it now. and you dont want to FORCE people to do anything thats the first line to screw up a website, i don't even make people require to check there emails on my site.
If you can't hear it before you see it, then it ain't a harley

Offline icman

  • Semi-Newbie
  • *
  • Posts: 30
    • php & Webmaster & SEO Tools
Re: Ask for gender during registration
« Reply #28 on: August 06, 2006, 12:16:30 PM »
what this mod can do
Show PageRank On Your site

http://meelink.com/Google-PageaRank-Indicator.php
Webmaster & SEO Tools Top google make it esay
http://www.meelink.com
Php website
http://www.mindphp.com
My Forum site witch ptc
http://ptc.icphysics.com/webboard/SFM/index.php
Thailand Domain Company Search
http://thaiwebdirectories.meelink.com

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Ask for gender during registration
« Reply #29 on: August 20, 2006, 10:19:53 AM »
It just makes it easier to tell who is male from female ... as they have to select it on sign up ..

See here on my site http://jagdyb.com/forum/index.php?action=register
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline rosoner

  • Semi-Newbie
  • *
  • Posts: 17
  • Gender: Male
  • Gromoglasnik
    • FM Serbia
Re: Ask for gender during registration
« Reply #30 on: August 23, 2006, 06:40:26 AM »
how did you make that picture verification?
Ko je ukrao moj sir?

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline rosoner

  • Semi-Newbie
  • *
  • Posts: 17
  • Gender: Male
  • Gromoglasnik
    • FM Serbia
Re: Ask for gender during registration
« Reply #32 on: August 27, 2006, 06:44:19 AM »
thank you very much!
Ko je ukrao moj sir?

Offline hawkman

  • Jr. Member
  • **
  • Posts: 219
  • Gender: Male
Just installed the mod. - Can I MAKE them pick M or F
« Reply #33 on: August 29, 2006, 01:46:38 PM »
I just installed the mod and it is certainly progress that they see the gender question.  Is there a way however that will force them to pick male or female and not have a 3rd option?
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Offline dagod

  • Semi-Newbie
  • *
  • Posts: 73
Re: Ask for gender during registration
« Reply #34 on: September 10, 2006, 12:43:12 PM »
Does this mod support RC3 too?

Offline Stirred

  • Semi-Newbie
  • *
  • Posts: 61
Re: Just installed the mod. - Can I MAKE them pick M or F
« Reply #35 on: September 11, 2006, 10:38:59 PM »
I just installed the mod and it is certainly progress that they see the gender question.  Is there a way however that will force them to pick male or female and not have a 3rd option?

Need help on this too... someone?
- eighteen seconds before sunrise -

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,307
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • SMF Helper
Re: Ask for gender during registration
« Reply #36 on: October 25, 2006, 12:28:01 PM »
I would think if you removed this line that it would take the top option (N/A) out of the mix:

Code: [Select]
<input type="radio" name="gender" value="0" checked="checked" tabindex="', $context['tabindex']++, '" /> ', $txt[470], '<br />
I have just done this and if you remove that line it only leaves the male/female options.
« Last Edit: October 25, 2006, 12:31:44 PM by Bigguy »
Tell us....Whats Ur Beef

Offline emaildrop

  • Semi-Newbie
  • *
  • Posts: 40
Re: Ask for gender during registration
« Reply #37 on: December 16, 2006, 06:15:16 AM »
can I use this mod for 1.1 latest smf?

Offline 2Ntense

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
Re: Ask for gender during registration
« Reply #38 on: September 24, 2007, 01:23:58 PM »
I just tested it on 1.1.3, so I'd say that's a "yes"

Offline Xarcell

  • SMF Hero
  • ******
  • Posts: 1,684
  • Gender: Male
  • SMF-DP Supporter
Re: Ask for gender during registration
« Reply #39 on: September 27, 2007, 08:09:19 AM »
On the package created from this, can I make a recommendation.

Replace "Gender" with the language string "', $txt[231], ':".

Offline jannah

  • Semi-Newbie
  • *
  • Posts: 14
Re: Ask for gender during registration
« Reply #40 on: December 17, 2007, 09:16:48 PM »
I just installed this mod and couldn't figure out why it wasn't working. When I went back and looked at it manually everything was fine as well. Then I realized that my SMF was using Modifications.english-utf8.php instead of Modifications.english.php D'OH!!  I copied the regular one over to utf and it works... but why is it defaulting to the utf one where can i change that?

Thanx.
Jannah

Offline redone

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,938
  • Gender: Male
Re: Ask for gender during registration
« Reply #41 on: December 17, 2007, 09:23:08 PM »
All this mod does is change the register.template.php. Converting to utf is something you must do to your board.

To resolve this you need a backup of your database prior to converting to utf.

Offline falguni1

  • Full Member
  • ***
  • Posts: 652
  • Gender: Female
  • http://beautymakeupdivas.com/
Re: Ask for gender during registration
« Reply #42 on: January 30, 2008, 03:19:53 AM »
will someone update this mod.

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: Ask for gender during registration
« Reply #43 on: January 30, 2008, 09:21:12 PM »
No update needed the mod already supports current SMF versions.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Ask for gender during registration
« Reply #44 on: January 25, 2009, 11:46:43 PM »
Where ever you want the option to appear :P.

For example, if you wanted it after the password, you'd find:

Code: [Select]
</tr><tr>
<td width="40%">
<b>', $txt[82], ':</b>
</td>
<td>
<input type="password" name="passwrd2" size="30" />
</td>
</tr>

Add after that:

Code: [Select]
</tr><tr>
<td width="40%">
<b>Gender:</b>
</td>
<td>
<input type="radio" name="gender" value="0" checked="checked" /> Leave it to the imagination<br />
<input type="radio" name="gender" value="1" /> Male<br />
<input type="radio" name="gender" value="2" /> Female<br />
</td>
</tr>

If you're not comfortable with HTML, I suggest you look at the tutorials on www.w3schools.com ;).

-[Unknown]

Lets say i dont want a leave to imagination option, and i remove that line of code .. do i then have to change the value for male and female .. or they can remain on 1 & 2 ???

eg..
Code: [Select]
                     <input type="radio" name="gender" value="1" /> Male<br />
                     <input type="radio" name="gender" value="2" /> Female<br />

or
Code: [Select]
                     <input type="radio" name="gender" value="0" /> Male<br />
                     <input type="radio" name="gender" value="1" /> Female<br />

or
Code: [Select]
<input type="radio" name="gender" value="0" checked="checked" /> Male<br />
                     <input type="radio" name="gender" value="1" /> Female<br />
                    

Which is the better code to use  :-\
« Last Edit: January 25, 2009, 11:52:39 PM by aw06 »
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline MoreBloodWine

  • SMF Hero
  • ******
  • Posts: 2,695
  • Gender: Male
  • ...
    • Uncharted 2: Among Thieves Stat Sig Generator
Re: Ask for gender during registration
« Reply #45 on: August 28, 2010, 03:53:29 AM »
Any chance of a 2.0 RC3 port ?
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits