PDA

View Full Version : Force valid Registration year


Protoman
03-11-2005, 10:00 PM
This modification forces new users to enter a valid calendar date before they are allowed to continue registration on your forum. Users are prevented from registering if older than 110 years.

In register.php

find:
if ($year < ($current['year'] - 13) OR ($year == ($current['year'] - 13) AND $month <= $current['month']))
Above it put:

if ($year < $current['year']-110)
{
eval(print_standard_error('error_too_old'));
}
add a new phrase in AdminCP..

Type: Front-End Error Message
VarName: too_old
Text: Sorry, but you must be living to join the site.

change the 110 above to however many years back you want it to limit membership.

-=My First Mod=- :p

Oblivion Knight
03-12-2005, 08:18 AM
I have a feeling this will be installed more for the comedic value rather than it's usefulness.. :)

Polo
03-12-2005, 08:20 AM
This is a nice little addon :) thanks for sharing... however I would definetly add more years to that... I think we may insult someone if we leave it a 110 lol

thank you corollasbest for sharing with the community :)

Oblivion Knight
03-12-2005, 09:16 AM
Something else could also be added to this.. ;)

if ($year > $current['year'])
{
eval(print_standard_error('error_too_young'));
}Anything later than the current year, is too an invalid Date of Birth..

T3MEDIA
03-12-2005, 09:59 AM
this is a half way hack. In a way its good with the hack I made. the combo would be awsome that way they have to put an age AND its forced 18 and up or what ever you prefer:
https://vborg.vbsupport.ru/showthread.php?t=74808

nexialys
03-12-2005, 11:17 AM
the point with your hack T3, is that not all boards need to be 18+ ... forcing birthday dates is not needed to everybody.

any good hack is good (hey, i'm the one to find this sentence!)

Allan
03-12-2005, 11:35 AM
very nice addon, thanks :)

yoyoyoyo
03-12-2005, 12:18 PM
great idea/addon! Thanks for sharing!

Protoman
03-12-2005, 03:42 PM
Something else could also be added to this.. ;)

if ($year > $current['year'])
{
eval(print_standard_error('error_too_young'));
}Anything later than the current year, is too an invalid Date of Birth..

I agree, that addition would work too with a new phrase.

I just have the COPPA enabled on my site, so under 13 ins't allowed to register anyway.. somebody born in 5000 AD equates to being -2995 yrs old and too young to register :nervous:

defcon_420
04-01-2006, 01:08 PM
could this code be mod'd to prevent person under 18 registering? and if so how?

DjTaz
04-02-2006, 03:22 PM
https://vborg.vbsupport.ru/showthread.php?t=105297 this is one that makes sure that people post their age - because a lot of my members were leaving the year empty.

its pretty simple to make sure the person is over 18 with a hack like that, but then the lie about their age on sign up - its better to let them join , and use an Age limit Hack on the forums u dont want them entering - like this one ... https://vborg.vbsupport.ru/showthread.php?t=93438&highlight=Age+limit

Datenpapst
04-05-2006, 11:32 AM
does this also work for v3.5 ?

Protoman
05-01-2006, 08:34 PM
3.5.x has this feature built-in! guess they liked the idea :D

it is set to recognize 1901 and later dates