vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Birthday on registration (NO YEAR REQUIRED) (https://vborg.vbsupport.ru/showthread.php?t=97097)

trilljester 09-28-2005 09:33 PM

Birthday on registration (NO YEAR REQUIRED)
 
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:

Code:

(!$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.


All times are GMT. The time now is 01:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01192 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete