Log in

View Full Version : Force 18 and over at Registration Time


utw-Mephisto
10-09-2006, 10:43 AM
I know the mod for 3.0.3 but is there something similiar for 3.6.2 ?

Basically if someone click on register I would like to show first the birthdate verification (the three drop downs) and only when the guy is above 18 he will get the normal register page..

peterska2
10-09-2006, 10:49 AM
If you don't mind waiting a few days till I can get decent net access I have already written this and just need to test it on 3.6.1 and 3.6.2 before releasing it.

utw-Mephisto
10-09-2006, 07:12 PM
Sure thing :) No Problem to wait :) :)

Thanks ..

Don't mind beta testing :P

rasun
10-09-2006, 08:05 PM
I have made it in my 3.6.0 this way. I haven?t tested myself, but think in 3.6.1 and 3.6.2 it should also work...


AdminCP --> vBulletin Options --> User Registration Options --> "Deny registration for users aged under 13 years" --> Save


After that edit the register.php this way:

Find:
if (mktime(0, 0, 0, $vbulletin->GPC['month'], $vbulletin->GPC['day'], $vbulletin->GPC['year']) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13))


Replace with:
if (mktime(0, 0, 0, $vbulletin->GPC['month'], $vbulletin->GPC['day'], $vbulletin->GPC['year']) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 18))


After that you can edit the error message for the users in the phrase:
$vbphrase[under_thirteen_registration_denied]

peterska2
10-09-2006, 10:27 PM
That works, but I have a nice way of doing it. I'm going to see about getting it into a plugin instead of the code mod that it is currently, and it gives some nice options in the ACP too.

I could release the code mod version now, but I'd rather wait till I have it written as a plugin instead as it makes life a lot easier for everyone concerned.

utw-Mephisto
10-10-2006, 06:12 AM
That works, but I have a nice way of doing it. I'm going to see about getting it into a plugin instead of the code mod that it is currently, and it gives some nice options in the ACP too.

I could release the code mod version now, but I'd rather wait till I have it written as a plugin instead as it makes life a lot easier for everyone concerned.

Great - thanks :)

Neo_obs
05-13-2009, 07:51 AM
Any chance you can still release this if it is available?