vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Birth year range during registration (https://vborg.vbsupport.ru/showthread.php?t=80867)

ccplim 05-02-2005 05:30 AM

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:

why-not 05-03-2005 11:21 AM

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

T3MEDIA 05-03-2005 12:19 PM

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?

why-not 05-03-2005 01:17 PM

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

ccplim 05-05-2005 02:11 PM

Thanks to both T3MEDIA and Sonia. I shall give this a shot and see how it goes :)


All times are GMT. The time now is 11:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01291 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete