PDA

View Full Version : Minimum Age For Registration


peterska2
10-10-2006, 10:00 PM
This modification allows you to set a minimum age for registration on your site.

It uses the vBulletin COPPA Cookie system, if you have it enabled, to stop people from clicking back in their browser to change the date of birth that they have entered.

The age is set via a setting in the vBOptions > User Registration Options.

Important:

This is a code modification, with the addition of a product to import the setting needed for this modification to work. Therefore, the code modification part will need to be carried out on each upgrade of vBulletin.
In order for this modification to work, the COPPA setting on your site must be set to deny registrations for users aged under thirteen years. The age that they will be denied at however is set by yourself in the user registration options.
This modification is for 3.6.x only. It is tested on 3.6.0 and 3.6.2 and should work on any later versions in the 3.6.x series. It will not work on anything earlier than 3.6.0, and may not work on later series.

Reports have been made that this does not work on 3.6.3 and 3.6.4 and so I expect that it will not work on anything later than 3.6.2

I will be looking into this when I get chance, but there may not be a fix for it, so please do not try this on 3.6.3 or later.

dieselpowered
10-11-2006, 12:29 AM
Great idea!!

Shazz
10-11-2006, 12:38 AM
/me installs thanx!

shadowevil
10-11-2006, 12:42 AM
Good job :) .... *installed*

Shazz
10-11-2006, 12:44 AM
Wait Im confused.
There are 2 parts of the
{
$dob = explode('-', $coppaage);
$month = $dob[0];
$day = $dob[1];
$year = $dob[2];
}


Which one to ADD BELOW? The first or the second?

peterska2
10-11-2006, 01:04 AM
The one that appears around line 100 (thats the first one if you don't have a line numbered editor)

Shazz
10-11-2006, 03:58 AM
As you see here, for some reason when I have this installed it always refreshes and your stuck on this page
Then when I uninstalled it, it worked went back to normal no problems ... :(

peterska2
10-11-2006, 04:05 AM
did you put the code in the right places and have the settings correct?

Shazz
10-11-2006, 04:14 AM
did you put the code in the right places and have the settings correct?
Yes, Followed every step corretly, I could attach my resigter.php . Settings are right in the admincp. :cross-eyed:
Wondering if anyone else has problems relating to this?

peterska2
10-11-2006, 04:21 AM
I'll reinstall it again tonight on a fresh install 3.6.2 to make sure.

If you want to email your register.php to me @gmail.com then I'll check it over against my copy too.

Shazz
10-11-2006, 04:42 AM
Whats your gmail?
Only 2 basic .php edits and a plugin . I don't see where I went wrong

Snake
10-11-2006, 07:11 AM
Thanks! :)

webspider
10-11-2006, 12:35 PM
As soon as I modify my register.php the register system gives this message "Sorry, we are unable to register your account at this time."

I'm finding the extra bracket in the instructions here a bit confusing
FIND (around line 132)

}

webspider
10-11-2006, 12:47 PM
Ok I think I have it working but there may be a bug. As a test I put my options to min age 18. I click register and it asked for a DOB I put in 1/1/1990 and proceed. I get the error "Sorry, we are unable to register your account at this time." Now if I click the register link again I get taken to the rules page and I'm able to complete the registration.

MusicMan
10-11-2006, 01:25 PM
Isn't this already a default feature in 3.6.x? I'm confused why a hack is needed to add a coppa cookie when it's already there if you want it.

https://vborg.vbsupport.ru/

webspider
10-11-2006, 01:37 PM
The difference is age 13 to age 18 or whatever age you want to set.

peterska2
10-11-2006, 11:25 PM
Whats your gmail?
Only 2 basic .php edits and a plugin . I don't see where I went wrong

peterska2 [at] gmail.com

peterska2
10-11-2006, 11:27 PM
Ok I think I have it working but there may be a bug. As a test I put my options to min age 18. I click register and it asked for a DOB I put in 1/1/1990 and proceed. I get the error "Sorry, we are unable to register your account at this time." Now if I click the register link again I get taken to the rules page and I'm able to complete the registration.
I'm reinstalling this on a fresh install of 3.6.2 in the next 30 mins. I'll come back with further details then on how it went and any fixes if required.

peterska2
10-11-2006, 11:30 PM
Isn't this already a default feature in 3.6.x? I'm confused why a hack is needed to add a coppa cookie when it's already there if you want it.

http://img244.imageshack.us/img244/7066/tttteh7.png

The COPPA System allows to block registrations by under 13's, or to allow parent/guardian consent before their account is activated. However, some people prefer to require their users to be at least an age which isn't 13. This allows them to set the minimum age that users need to be to register for their site.

Shazz
10-11-2006, 11:32 PM
peterska2 [at] gmail.com
I tried that last night, Email couldn't be found in the system :(

peterska2
10-11-2006, 11:38 PM
It is valid as I am logged into it. If you let me have yours I'll send an outgoing one to you that you can reply to

peterska2
10-11-2006, 11:56 PM
Update released

A new version of the Minimum Age for Registration modification has been released.

To upgrade, redownload the zip (labeled v1.1) and import overwriting the existing product. Please check your plugins when you have done so and ensure that the plugin entitled "Check Age" has been removed. This code is not required and is the cause of the problems that some users have been reporting.

/me kicks self for not double checking the contents of the product file before uploading it

MusicMan
10-12-2006, 01:09 PM
The difference is age 13 to age 18 or whatever age you want to set.
Ahh ok. Thanks for the explanation. :)

Staxed
10-21-2006, 01:16 AM
Would it be possible to add something to this so once someone tries to register and gets denied because of age, it automatically captures the IP and adds it to somewhere that will prevent that IP from registering?

If not...someone could just try and register with another name couldn't they? (excuse me if that's wrong...i've never used COPPA so don't really know how it works)

peterska2
10-21-2006, 12:41 PM
This uses the COPPA cookie built into vB so if you get a no permission message as you are under the minimum age that is set in the ACP then you will get the error everytime you click the register button. Of course this can be got around by clearing cookies, but like everything else you can't completely prevent people registering no matter their age but at least you can slow it down and anyone who does get through has lied about their age so you are in the clear as you can only work on the information that you have.

dirtyrat
10-24-2006, 06:31 PM
awesome i've been looking everywhere for a solution to this problem

peterska2
10-24-2006, 10:51 PM
awesome i've been looking everywhere for a solution to this problem

You're welcome. Please remember to click install ;)

katerri
10-30-2006, 09:11 AM
I've installed this to a 3.6.2 system and in testing find that when you receive the error restricting you from registering, you can bypass this by just clicking on the "Registration" link in the navbar, and continue on to successfully register. :ermm:

peterska2
10-30-2006, 09:19 AM
Have you enabled the COPPA Cookie? If not then this is normal vBulletin behaviours.

katerri
10-30-2006, 09:23 AM
Have you enabled the COPPA Cookie? If not then this is normal vBulletin behaviours.

Yes, it is enabled in user registration options.

peterska2
10-30-2006, 09:26 AM
Please check your plugin manager and if there is a plugin called "Check Age" Delete it.

katerri
10-30-2006, 09:33 AM
Please check your plugin manager and if there is a plugin called "Check Age" Delete it.

No. Just the Flashchat Integration Plugins (1) through (5).

peterska2
10-30-2006, 09:44 AM
Odd, as it's working for other people. :confused:

Did you carry out the code modifications exactly as included in the instructions. There are a few { and } which can easily be missed which it is essential that you get in the right places.

Cocko
11-12-2006, 11:28 AM
good idea for this hack - but why this blank page ?
(deinstalled)

ttk_2k
11-20-2006, 08:46 PM
I've installed this to a 3.6.2 system and in testing find that when you receive the error restricting you from registering, you can bypass this by just clicking on the "Registration" link in the navbar, and continue on to successfully register. :ermm:

I have the exactly same problem as you.. tried everything but withno luck!

ttk_2k
11-20-2006, 10:20 PM
Ok, I think here is the way to solve the "bug" that I said above, which prevents users from seeing the forum rules page when they have entered an unallowed age, I have just tested on my vBulletin (3.6.3) and it works, it is a really simple step to go:

1. First of all be 100% sure that you are using 3.6.3 (latest stable release) and you have done all steps that the author of this add-on told you to.

2. No, I believe the installation has not yet been finished, just now open /register.php again, find:

if ($year < 1970 OR (mktime(0, 0, 0, $month, $day, $year) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13)))
{ // this user is >13
$show['coppa'] = false;
$templatename = 'register_rules';
}
else if ($vbulletin->options['usecoppa'] == 2)
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
eval(standard_error(fetch_error('under_thirteen_re gistration_denied')));
}
else
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
$show['coppa'] = true;
$templatename = 'register_rules';
}

Replace with:

if (!$vbulletin->options['minregage'])
{
if ($year < 1970 OR (mktime(0, 0, 0, $month, $day, $year) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13)))
{ // this user is >13
$show['coppa'] = false;
$templatename = 'register_rules';
}
else if ($vbulletin->options['usecoppa'] == 2)
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
eval(standard_error(fetch_error('under_thirteen_re gistration_denied')));
}
else
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
$show['coppa'] = true;
$templatename = 'register_rules';
}
}
elseif (!empty($vbulletin->options['minregage']))
{
if (mktime(0, 0, 0, $month, $day, $year) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - ($vbulletin->options['minregage'])))
{ // this user is > a specific age defined at admin cp
$show['coppa'] = false;
$templatename = 'register_rules';
}
else if ($vbulletin->options['usecoppa'] == 2)
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
eval(standard_error(fetch_error('under_thirteen_re gistration_denied')));
}
else
{
if ($vbulletin->options['checkcoppa'])
{
vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1);
}
$show['coppa'] = true;
$templatename = 'register_rules';
}
}

See now you should have no problem. :knockedout:

ps: thanks all the same for the author who have provided such a good add-on!

JGM007
12-13-2006, 10:22 PM
Hmm I too am getting a blank page now after updating to 3.6.3
After you hit register and select the date, the next page is blank.
I went back and re-did the code chage in register.php and reinstalled the plugin with it set to overwrite.
Has anyone run into this issue with 3.6.4?

MistaMarkael
01-06-2007, 03:43 AM
Hmm I too am getting a blank page now after updating to 3.6.3
After you hit register and select the date, the next page is blank.
I went back and re-did the code chage in register.php and reinstalled the plugin with it set to overwrite.
Has anyone run into this issue with 3.6.4?

i have the same problem with 3.6.4

no fix yet?

peterska2
01-06-2007, 01:14 PM
I've not upgraded yet, and so have not had chance to look at how it works on the latest version.

tawnygirl
01-16-2007, 05:50 AM
:D *subscribes to this thread for news of updated version that works in 3.6.4*