Required Field upon registration

Started by Goldeagle, August 06, 2008, 10:46:45 AM

Previous topic - Next topic

Eliana Tamerin

http://custom.simplemachines.org/mods/index.php?mod=638

That's for displaying age and location.

And as for changing the order of the birthdate, that's pretty simple. Open up your Register.template.php.

Find this:
<td width="40%">
                     <b>', $txt[563], ':</b>
                     <div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
                  </td>
                  <td>
                     <input type="text" name="bday3" size="4" maxlength="4" value="" tabindex="', $context['tabindex']++, '" /> -
                     <input type="text" name="bday1" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" /> -
                     <input type="text" name="bday2" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" />
                  </td>


Replace it with this:
<td width="40%">
                     <b>', $txt[563], ':</b>
                     <div class="smalltext">', $txt[564], ' - ', $txt[565], ' - ', $txt[566], '</div>
                  </td>
                  <td>
                     <input type="text" name="bday1" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" /> -
                     <input type="text" name="bday2" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" /> -
                     <input type="text" name="bday3" size="4" maxlength="4" value="" tabindex="', $context['tabindex']++, '" />
                  </td>
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Goldeagle

Many thanks again Eliana :)

You are a saviour.

ccbtimewiz

Hello Tom,

In order to do that, open your display.template.php

Find:
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';


Replace with:
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

// Show the date when they joined! =D
echo 'Joined: ', strftime('%b %e, %Y', $message['member']['registered_timestamp']) , ' <br />';

nickvivid

Thanks for the info on this mod. I just added required birthday and gender options on 1.1.5 and it works perfectly!

Sabre™

After adding their birthdate upon registering, the changes dont show in the profile.
The gender selected does, but the age/birthdate is N/A.

Does this happen for anyone else?
If not, do you know why its doing this?
Im running smf 1.1.5 and have no other modifications to the reg temp.
Thank You in advance :)

EDIT: Its working in the default theme, but not my custom theme.
I dont see why not, because this only touches on 2 templates that my custom theme doesnt have, so it reverts to the default anyway.

Any help is appreciated :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Eliana Tamerin

What theme do you have? And what other mods do you have installed? Any other custom tweaks you made?
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Sabre™

I dont know what happened, but it come right lol

Thanks for that :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Eliana Tamerin

Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

a3des

Excellent mod! It's working on 1.1.6 too.
But are you sure that registering isn't allowed if one field is left blank?
I mean if I fill all the required fileds, check the agreement, then delete the Location I still can register myself.
How can I fix that?

Trashcan

any way to make the "location" field read "address" and make it required at registration?
Man, I sure would appreciate the assistance.
1.1.8

Advertisement: