Log in

View Full Version : Birthday on registration (NO YEAR REQUIRED)


trilljester
09-28-2005, 09:33 PM
OK, 3.5 is sweet in that it can force the user to enter their birthday when registering, but it forces them to put a year. Is there a way to remove that restriction?

I looked at register.php and it would appear entering 0 for the year would do it, but it fails with an invalid birthdate error.

Any ideas on what I should change to allow this?

Andreas
09-28-2005, 09:36 PM
Yes - don't require birthdays.

trilljester
09-28-2005, 09:41 PM
:lol: Excellent idea, but I want to require just the month and day, not the year. ;)

Andreas
09-28-2005, 09:43 PM
That does not make sense IMHO.
Why would you want to do that?
Just day and month are worth nothing.

Borgs8472
09-28-2005, 09:44 PM
^ ^
not at all. It can allow people to have birthday events without giving away how old they are :)

Andreas
09-28-2005, 09:48 PM
I C.

Kirk Y
09-29-2005, 01:30 AM
It won't show their age in the postbit, with no year to calculate with.

trilljester
09-29-2005, 03:18 AM
Well the goal is simple: I'd like to be able to send birthday messages to my users, but not force them to reveal their true age. If you turn on Require Birthday in VB User Profile Options, the year they were born is required.

If you turn off that option, users can enter their birthday, but exclude the year if they so choose, but this option is not presented during registration.

So, the question is: Is there a way to force users to enter their actual birthday but be able to choose wether or not they reveal their year of birth?

Andreas
09-29-2005, 11:53 AM
Yes. Make it required and set default to only show age, but not full birthdate.

trilljester
09-29-2005, 06:05 PM
I got it to work. I had to go into includes/class_dm_user.php and modify this line:


(!$this->adminoverride AND $this->registry->options['reqbirthday'] AND ($birthday['day'] <= 0 OR $birthday['month'] <= 0 OR $birthday['year'] <= 0))


And change $birthday['year'] <= 0 to $birthday['year'] < 0

If you enter nothing for year during registration, it defaults to 0, so changing that code will allow nothing to be entered for the year.

Tralala
03-04-2006, 01:12 AM
Okay, but then the user needs to know this ahead of time when they first register.

In every members' UserCP, there's options to:
Hide Age and Date of Birth
Display Age and Date of Birth
Display just your Age

Seems sensible to add a forth option:
Display just birthdate (month and year)

I think that'd be a welcome feature for some smaller social boards.

The D.O.B. could still be required entry on registration for COPPA, but the public display is what I'm talking about.

IE: A female member may like to have her birthday recognized/celebrated on the forum but not necessarily share their age with everyone.

Has this seriously never come up before?