News:

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

Main Menu

Ask for gender during registration

Started by kerux4, February 13, 2005, 02:08:48 PM

Previous topic - Next topic

kerux4

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.
C-YA,
Mike

[Unknown]

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]

kerux4

C-YA,
Mike

[Unknown]

Where ever you want the option to appear :P.

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

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


Add after that:

</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]

kerux4

Alright, I have tried adding this several times and every time I save, it never takes.
C-YA,
Mike

kerux4

C-YA,
Mike


[Unknown]

Quote from: kadhumia_flo on August 26, 2005, 05:22:19 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]

rojamaia


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.

desistyle

Quote from: [Unknown] 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:

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


Add after that:

</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

JayBachatero

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

desistyle

Quote from: JayBachatero on November 21, 2005, 06:42:01 PM
Register.template.php located in /Themes/default folder.

Can i use this with 7dana theme too ?

JayBachatero

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

desistyle

Quote from: JayBachatero 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.

Thanks a lot for ur help smf rocks

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

Quote from: JayBachatero on November 21, 2005, 07:45:51 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

JayBachatero

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

desistyle

Quote from: JayBachatero 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.

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

JayBachatero

Follow me on Twitter

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

Senkusha

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?
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Advertisement: