Not Solved [How To?] Date of Birth Calendar Limit
#1
Not Solved
Hello!

I was wondering if it would be possible to remove the 'The birthday you entered is invalid. Please enter a valid birthday or leave the field empty.' error?

I'm building an RP, and we have characters that are going to be more than a century old, and it would be cool if we could enter their birth year that is more than 100 years prior to the current year?

Would anyone be able to guide me on how to make the change?

Thank you kindly!
[Image: BloodTies.png]

[Image: Pern.png]
Reply
#2
Not Solved
(2019-09-15, 11:08 AM)ThistleProse Wrote: (...)

I'm building an RP, and we have characters that are going to be more than a century old, and it would be cool if we could enter their birth year that is more than 100 years prior to the current year?

(...)
Yep, you're right. MyBB disallows a birthday year is exactly 100 years ago. It's not that easy to judge whether this limit is incorrect or aggressive or even a little biased.

If you're using the latest version of MyBB 1.8.21, you may look into this file ./inc/datahandlers/user.php in line 379:
		if($birthday['year'] != 0 && ($birthday['year'] < (date("Y")-100)) || $birthday['year'] > date("Y"))

So you read $birthday['year'] < (date("Y")-100) and you'll probably know what to do with it.

BTW, I'm quite astonishing that users can input 0 as their birthday year.
Could be wrong but worth a try.
Email me at: [email protected]
Reply
#3
Not Solved
@noyle ! Thank you that worked perfectly Smile
[Image: BloodTies.png]

[Image: Pern.png]
Reply
#4
Not Solved
(2019-09-15, 11:43 AM)noyle Wrote: BTW, I'm quite astonishing that users can input 0 as their birthday year.
In usercp, year is a textfield, so if not filled (or filled with not number value) it gives 0.
Tchat en français
Do not ask me help through PM or Discord

Reply
#5
Not Solved
You may also completely deacitvate the age verification by simply comment lines 378 - 392.
Then there is no check at all.
Starting comment from line 360 dismiss day/month check as well.

[ExiTuS]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)