Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Require Age for new members Details »»
Require Age for new members
Version: 1.00, by DjTaz DjTaz is offline
Developer Last Online: Oct 2011 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 01-13-2006 Last Update: Never Installs: 1
Template Edits
Code Changes Is in Beta Stage  
No support by the author.

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

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) :
Code:
// 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 :
Code:
// 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
Code:
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
Code:
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 !

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-14-2006, 03:49 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!

/me clicks on install
Reply With Quote
  #3  
Old 01-14-2006, 09:28 PM
DjTaz DjTaz is offline
 
Join Date: Apr 2003
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aftermath - i see ur boards version says 3.5 .. can you let me know if it works on 3.5 as well please ? I havent tested it on that.

Also make sure that the REQUIRE BIRTHDAY is ticked in the VB Admin - Vbulletin Options - Registration Options.

*fingers crossed*
Reply With Quote
  #4  
Old 02-22-2006, 08:21 AM
DjTaz DjTaz is offline
 
Join Date: Apr 2003
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok just added a little bit to make sure sign ups dont put in 0000 into the year
Reply With Quote
  #5  
Old 03-27-2006, 02:01 PM
djtheropy djtheropy is offline
 
Join Date: Jul 2005
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have tried getting this to work on my 3.5.4 but it appears the way the code is written between the 2 versions is set out differently

here is how 3.5.x checks for missing fields
Quote:
// check for missing fields
if (empty($vbulletin->GPC['username'])
OR empty($vbulletin->GPC['email'])
OR empty($vbulletin->GPC['emailconfirm'])
OR ($vbulletin->GPC['coppauser'] AND empty($vbulletin->GPC['parentemail']))
OR (empty($vbulletin->GPC['password']) AND empty($vbulletin->GPC['password_md5']))
OR (empty($vbulletin->GPC['passwordconfirm']) AND empty($vbulletin->GPC['passwordconfirm_md5']))
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03777 seconds
  • Memory Usage 2,240KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete