vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Changing Birthday Year to Future Year (https://vborg.vbsupport.ru/showthread.php?t=262772)

Infinity101 04-28-2011 02:44 AM

Changing Birthday Year to Future Year
 
Hello, I'm trying to allow the birthday year to be further out than the current year. When done, a error will state, "invalid birthday entered" and not allow a change.

I edited in profile.php

Code:

        if ($birthday[2] > 1901 AND $birthday[2] = year ('Y')AND @checkdate($birthday[0], $birthday[1], $birthday[2]))
To

Code:

        if ($birthday[2] > 1901 AND $birthday[2] = 4500 AND @checkdate($birthday[0], $birthday[1], $birthday[2]))
This still doesn't work however.. I reviewed the templates and cannot find anywhere else where a year check is taken place. It seems like it should a simple fix, but I'm hoping someone can assist me.

kh99 04-28-2011 11:59 AM

I think you're just missing a '<':

Code:

if ($birthday[2] > 1901 AND $birthday[2] <= 4500 AND @checkdate($birthday[0], $birthday[1], $birthday[2]))

Infinity101 04-28-2011 11:13 PM

Sorry, you're right. I was typing the the tidbit and missed the <. The error occurs just the same still however. I even commented the code out entirely and the invalid DOB comes up. The check must be taking place in another file as well. I cannot find it for the life of me though.

Thanks for any help.

kh99 04-28-2011 11:19 PM

Yeah, it looks like there's a check in includes/class_dm_user.php and also in register.php.

Infinity101 04-30-2011 04:24 AM

Thank you very much. I tried searching all my files and couldn't find anything. Do you run a certain program and perform a search or did you know from experience?

Thanks!

kh99 04-30-2011 09:57 AM

I just did a search on all the php files for "1901". For the record, I think there were a few other places that check for year > 1901 but don't check for a max year.

I use something called Netbeans IDE, but it does a lot of other things so it's not what you'd want to install if you just want to search a bunch of files. (I'm not sure if you're asking what program to use or just how I found those checks).

Infinity101 04-30-2011 10:13 PM

You answered my questions well, thank you for helping me out.


All times are GMT. The time now is 08:59 AM.

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.01026 seconds
  • Memory Usage 1,717KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete