Advertisement:

Author Topic: Making Gender and Birthday required for register  (Read 13900 times)

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Making Gender and Birthday required for register
« Reply #20 on: February 06, 2010, 12:26:06 PM »
sorry for late response foks .... was bit ill

so here u go

/themes/default/Register.template.php

Find:
Code: [Select]
// If OpenID is enabled, give the user a choice between password and OpenID.

Add Before:
Code: [Select]
//Show Bday on reg

echo '
<dl class="register_form">
<dt>
<strong>', $txt['dob'], '</strong><br />
<span class="smalltext">', $txt['dob_year'], ' - ', $txt['dob_month'], ' - ', $txt['dob_day'], '</span>
</dt>
<dd>
<input type="text" name="bday3" size="4" maxlength="4" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['year'] : ''), '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['month'] : ''), '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['day'] : ''), '" />
</dd>
</dl>';


plz keep the original file as back up ;)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: Making Gender and Birthday required for register
« Reply #21 on: February 06, 2010, 12:55:47 PM »
Its good but people might not like the idea of adding the birthday there.

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Making Gender and Birthday required for register
« Reply #22 on: February 06, 2010, 01:25:22 PM »
its upto them its not a compulsion.... ;)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: Making Gender and Birthday required for register
« Reply #23 on: February 06, 2010, 01:30:02 PM »
then you hat to write ''optional'' below it Just to indicate that. that would be nice

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Making Gender and Birthday required for register
« Reply #24 on: February 06, 2010, 01:49:12 PM »
DOne ... thanx for the suggestion :)
« Last Edit: February 06, 2010, 02:01:14 PM by sid2varun »
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline ForumMustang.com

  • Full Member
  • ***
  • Posts: 474
  • Gender: Male
  • SMF French Translator
    • forummustang on Facebook
    • Ford Mustangs
Re: Making Gender and Birthday required for register
« Reply #25 on: November 27, 2010, 10:33:54 AM »
I tried this mod on SMF: 2.0 RC3 but the text tags below are not showing on the registration page. Does anyone have any idea what I can replace them with? My forum is in French.

Code: [Select]
      <strong>', $txt['dob'], '</strong><br />
      <span class="smalltext">', $txt['dob_year'], ' - ', $txt['dob_month'], ' - ', $txt['dob_day'], '</span>

Update:

I checked the tags in the Profile.french.php file and they are the same as the ones on the mod so I don't understand what could be wrong. ???

Code: [Select]
$txt['dob'] = 'Date de naissance';

$txt['dob_month'] = 'Mois (MM)';

$txt['dob_day'] = 'Jour (JJ)';

$txt['dob_year'] = 'Année (AAAA)';

Update 2:

I don't know if I did the right thing but I added the text strings above in Modifications.french.php and it fixed my problem. I didn't notice any bug with either the registration page or the profile page with those strings in 2 language files but if someone has a better solution, let me know.  :)
« Last Edit: November 27, 2010, 12:18:28 PM by chadon »

Offline SC RaceFan

  • Semi-Newbie
  • *
  • Posts: 67
Re: Making Gender and Birthday required for register
« Reply #26 on: March 14, 2011, 05:53:46 PM »
I don't see how to make it a drop down. Oh, 2.0 RC5.  I went to your site and registered Afro and didn't see either field day or month.  I just went to the profile on here and it has Birthday.....some one needs to share LOL
« Last Edit: March 14, 2011, 06:01:14 PM by SC RaceFan »
If I knew what I was doing, I would not be here asking question!  If I were a programmer, I would not need you!

Offline sliverz

  • Newbie
  • *
  • Posts: 3
Re: Making Gender and Birthday required for register
« Reply #27 on: April 08, 2011, 12:13:52 PM »
Ok, This works on the member registration, but not on administrator's new member registration.

As an administrator I already have a list of members I need to add and assign group member, their birthday, and maybe their avatars image.

So I need to do it from the admin page -> Members -> Register New Member.

Otherwise I have to update their profile after I add them. Which will be a lot of work. I'm looking for the fastest way to do this.

I noticed the fields smf use are : bday3 for year, bday1 for month, and bday2 for date. I tried to add these fields on the form and post it, but it doesn't work.

Any idea?

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Making Gender and Birthday required for register
« Reply #28 on: April 08, 2011, 12:23:30 PM »
I don't see how to make it a drop down. Oh, 2.0 RC5.  I went to your site and registered Afro and didn't see either field day or month.  I just went to the profile on here and it has Birthday.....some one needs to share LOL


Go to
Administration Center » Core Features >> Advanced Profile Fields (enable it)



Then go to
Administration Center » Features and Options » Profile Fields >> Add new field there and adjust options as per your liking.



Ok, This works on the member registration, but not on administrator's new member registration.

As an administrator I already have a list of members I need to add and assign group member, their birthday, and maybe their avatars image.

So I need to do it from the admin page -> Members -> Register New Member.

Otherwise I have to update their profile after I add them. Which will be a lot of work. I'm looking for the fastest way to do this.

I noticed the fields smf use are : bday3 for year, bday1 for month, and bday2 for date. I tried to add these fields on the form and post it, but it doesn't work.

Any idea?
That will require some coding, open a new thread someone might help you there, as this thread is already marked as solved.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Eclipse16V

  • Sophist Member
  • *****
  • Posts: 1,070
  • Gender: Male
  • Tornado Map
    • Eclipse16V on Facebook
    • @Eclipse16V on Twitter
    • Tornado Map
Re: Making Gender and Birthday required for register
« Reply #29 on: December 25, 2011, 10:11:07 AM »
Have any one this for SMF 2.0.2?

Thanks
I worked with:
SMF 2 in German

My Shop:
Das Lieschen

Offline drroot

  • Jr. Member
  • **
  • Posts: 108
Re: Making Gender and Birthday required for register
« Reply #30 on: January 27, 2012, 05:17:02 AM »
Yes. same question here. Any more details?

How to use bday3-bday1-bday2 in good formated "Profile fields"?

Thanks.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,284
Re: Making Gender and Birthday required for register
« Reply #31 on: January 27, 2012, 05:47:40 AM »
please open a separate thread for your issue, this thread belongs to someone else and is marked solved. also please dont bump old threads.

Offline dooie

  • Semi-Newbie
  • *
  • Posts: 83
Re: Making Gender and Birthday required for register
« Reply #32 on: May 29, 2012, 01:37:36 PM »
Thank you for your information, I forgot to add the <dl></dl> open and close tags, now everything lines up.

Cheers.