Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2005, 05:30 AM
ccplim ccplim is offline
 
Join Date: Feb 2005
Location: SG
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Birth year range during registration

Is there a way where we can restrict new member to enter the birth year range from something like 1900 to 2005 during registration?

I have some joker members who enter their birth year by entering 0000 or some funny number :disappointed:
Reply With Quote
  #2  
Old 05-03-2005, 11:21 AM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ccplim
Is there a way where we can restrict new member to enter the birth year range from something like 1900 to 2005 during registration?

I have some joker members who enter their birth year by entering 0000 or some funny number :disappointed:
If you open 'register.php' in your install directory './' you can change the regex to what you want to use! I would just use 19?? as there should not be anyone 5 years old trying to register on any forum!

Here is how to do this....

Open register.php

FIND THIS....

Code:
	if ($month == 0 OR !preg_match('#^\d{4}$#', $year))
	{
		eval(print_standard_error('select_valid_month_and_year'));
	}

REPLACE WITH...

Code:
	if ( $month == 0 OR ! preg_match ( "!^(19[0-9]{2}|200[0-5]{1})$!", $year ) )
	{
		eval ( print_standard_error ( 'select_valid_month_and_year' ) );
	}

Sonia
Reply With Quote
  #3  
Old 05-03-2005, 12:19 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this as well to make sure they dont put the age under and this also keeps the age unchangeable. (admins can change)

[vB 3.0.3] Force 18 and over at Registration Time.

Quote:
Originally Posted by why-not
If you open 'register.php' in your install directory './' you can change the regex to what you want to use! I would just use 19?? as there should not be anyone 5 years old trying to register on any forum!

Here is how to do this....Sonia
May I add this to my hack? so it restricts super old users?
Reply With Quote
  #4  
Old 05-03-2005, 01:17 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
Try this as well to make sure they dont put the age under and this also keeps the age unchangeable. (admins can change)

[vB 3.0.3] Force 18 and over at Registration Time.

May I add this to my hack? so it restricts super old users?
You know what I should have directed him or her to your mod, I just installed this for someone a few weeks ago and forgot about it. It does work great, thanks for tip again!!!

Sure you can add it if you like!!!

Take Care

Sonia
Reply With Quote
  #5  
Old 05-05-2005, 02:11 PM
ccplim ccplim is offline
 
Join Date: Feb 2005
Location: SG
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks to both T3MEDIA and Sonia. I shall give this a shot and see how it goes
Reply With Quote
Reply


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 12:36 PM.


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.07448 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (5)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_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