DjTaz
01-13-2006, 10:00 PM
A few people asked for this in the mod requests and i wanted it myself but couldnt find it , so i did a bit of messing about and came up with this ... pretty easy and seems to have done the job :D
Ive run this on vBulletin 3.0.6 , but i dont see any issues on any other versions - ill give a little support , but im not always on here so it wont be major stuff.
Open register.php and find (roughly line 240) :
// check for missing fields
if (($_POST['coppauser'] AND empty($_POST['parentemail'])) OR empty($_POST['username']) OR empty($_POST['email']) OR empty($_POST['emailconfirm']) OR (empty($_POST['password']) AND empty($_POST['password_md5'])) OR (empty($_POST['passwordconfirm']) AND empty($_POST['passwordconfirm_md5'])))
{
eval('$errors[60] = "' . fetch_phrase('fieldmissing', PHRASETYPEID_ERROR) . '";');
}
under that add in :
// check for empty year
if (empty($_POST['year'])
{
eval('$errors[60] = "' . fetch_phrase('yearmissing', PHRASETYPEID_ERROR) . '";');
}
// check member is under 100 years old (ish) (some people put in 0000 into year)
if (($_POST['year'])<1910)
{
eval('$errors[60] = "' . fetch_phrase('yearmissing', PHRASETYPEID_ERROR) . '";');
}
Then go to Phrase Manager and add in : Make sure of the phrase type
Phrase Type : Front End Error Messages
Varname : yearmissing
Text : You have ommited the year from the registration process - this field is required on this website and may request verification.
and edit : enter_birth_date_controls
to something like
Adding your date of birth here will enable other forum visitors
will be able to see your birthday on the forum calendar and for
you to get birthday e-mails. This is a required Field for the site
and must be filled in with correct information.
and thats pretty much it - your done once you upload the register.php - all members will now need to fill in the year section - though they can still lie about their age , but nothing we can do about that !
Ive run this on vBulletin 3.0.6 , but i dont see any issues on any other versions - ill give a little support , but im not always on here so it wont be major stuff.
Open register.php and find (roughly line 240) :
// check for missing fields
if (($_POST['coppauser'] AND empty($_POST['parentemail'])) OR empty($_POST['username']) OR empty($_POST['email']) OR empty($_POST['emailconfirm']) OR (empty($_POST['password']) AND empty($_POST['password_md5'])) OR (empty($_POST['passwordconfirm']) AND empty($_POST['passwordconfirm_md5'])))
{
eval('$errors[60] = "' . fetch_phrase('fieldmissing', PHRASETYPEID_ERROR) . '";');
}
under that add in :
// check for empty year
if (empty($_POST['year'])
{
eval('$errors[60] = "' . fetch_phrase('yearmissing', PHRASETYPEID_ERROR) . '";');
}
// check member is under 100 years old (ish) (some people put in 0000 into year)
if (($_POST['year'])<1910)
{
eval('$errors[60] = "' . fetch_phrase('yearmissing', PHRASETYPEID_ERROR) . '";');
}
Then go to Phrase Manager and add in : Make sure of the phrase type
Phrase Type : Front End Error Messages
Varname : yearmissing
Text : You have ommited the year from the registration process - this field is required on this website and may request verification.
and edit : enter_birth_date_controls
to something like
Adding your date of birth here will enable other forum visitors
will be able to see your birthday on the forum calendar and for
you to get birthday e-mails. This is a required Field for the site
and must be filled in with correct information.
and thats pretty much it - your done once you upload the register.php - all members will now need to fill in the year section - though they can still lie about their age , but nothing we can do about that !