Birthday on Registration

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Petter89
Registered User
Posts: 11
Joined: Sat Jan 20, 2007 11:14 am

Re: Birthday on Registration

Post by Petter89 » Tue Jan 20, 2009 12:06 pm

DavidIQ wrote:The edit to includes/functions_user.php is what takes care of that namely:
Find:

Code: Select all

	// These are the additional vars able to be specified
	$additional_vars = array(
Add before:

Code: Select all

	if ($config['allow_birthdays'] && !empty($user_row['user_birthday']))
	{
		$sql_ary['user_birthday'] = $user_row['user_birthday'];
	}
However if $data['user_birthday'] is empty here in includes/ucp/ucp_register.php:

Code: Select all

				if ($config['allow_birthdays'])
				{
					$user_row['user_birthday'] = $data['user_birthday'];
				}
then the birthdate will not be stored.
It's still not working. This is what my files look like:

functions_user.php:

Code: Select all

	
	if ($config['allow_birthdays'] && !empty($user_row['user_birthday']))
	{
		$sql_ary['user_birthday'] = $user_row['user_birthday'];
	}

	// These are the additional vars able to be specified
	$additional_vars = array(
		'user_permissions'	=> '',
		'user_timezone'		=> $config['board_timezone'],
		'user_dateformat'	=> $config['default_dateformat'],
		'user_lang'			=> $config['default_lang'],
		'user_style'		=> (int) $config['default_style'],
		'user_actkey'		=> '',
		'user_ip'			=> '',
		'user_regdate'		=> time(),
		'user_passchg'		=> time(),
		'user_options'		=> 895,
ucp_register.php:

Code: Select all

if ($config['allow_birthdays'])
		{
			$data['bday_day'] = $data['bday_month'] = $data['bday_year'] = 0;
			$data['bday_day'] = request_var('bday_day', $data['bday_day']);
			$data['bday_month'] = request_var('bday_month', $data['bday_month']);
			$data['bday_year'] = request_var('bday_year', $data['bday_year']);
			$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
		}

		// Check and initialize some variables if needed
		if ($submit)
		{
			$error = validate_data($data, array(
				'username'			=> array(
					array('string', false, $config['min_name_chars'], $config['max_name_chars']),
					array('username', '')),
				'new_password'		=> array(
					array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
					array('password')),
				'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
				'email'				=> array(
					array('string', false, 6, 60),
					array('email')),
				'email_confirm'		=> array('string', false, 6, 60),
				'confirm_code'		=> array('string', !$config['enable_confirm'], 5, 8),
				'tz'				=> array('num', false, -14, 14),
				'lang'				=> array('match', false, '#^[a-z_\-]{2,}$#i'),
				'user_birthday' 	=> array('date', false),
			));
Allow birthdays is set to yes in the adminpanel. Any suggestions?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Tue Jan 20, 2009 2:15 pm

Paste both file's entire contents...let me see what you got.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Birthday on Registration

Post by bob_raid » Wed Jan 21, 2009 1:36 am

Thank you very much by the way can I check with you can I make
the year as optional during registration?

Thanks in advance.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Wed Jan 21, 2009 2:31 am

Still waiting for your ucp_register.php file. You've only posted a part of it.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: Birthday on Registration

Post by Richazey » Fri Jan 23, 2009 7:12 pm

I had a new member join today and he filled out his birthday on registration but it odes not record it on either in the ucp or acp?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Fri Jan 23, 2009 7:46 pm

DavidIQ wrote:This part makes it required during registration:

Code: Select all

'user_birthday' 	=> array('date', false),
However...users can then go in and remove it from their profile. If this is what you want to prevent then change this in includes/ucp/ucp_profile.php:

Code: Select all

'user_birthday' => array('date', true),
to this:

Code: Select all

'user_birthday' => array('date', false),
Whenever a user tries to edit their profile they will be required to have their birthday. Remember to purge your cache after doing this change.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: Birthday on Registration

Post by Richazey » Fri Jan 23, 2009 8:24 pm

Yeah I've done that what I mean is when someone registers and enters their dob the forum is not storing it, ive just registerd a test account and the birthday has not saved?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Fri Jan 23, 2009 9:13 pm

What version phpBB are you running? Also it would be handy if you'd post the contents of includes/functions_user.php and includes/ucp/ucp_register.php
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: Birthday on Registration

Post by Richazey » Sun Jan 25, 2009 8:21 pm

phpbb 3.0.4

and the files are attached

thanks
Attachments
functions_user.txt
(90.05 KiB) Downloaded 52 times
ucp_register.txt
(21.04 KiB) Downloaded 57 times

GPaah
Registered User
Posts: 1
Joined: Thu Feb 12, 2009 11:35 pm

Re: Birthday on Registration

Post by GPaah » Thu Feb 12, 2009 11:46 pm

Hey, it's a nice MOD, but it's not works in 100% for me.
I can't set "show birthday" and "Show congratulation greetings" in the profile settings. And if you can help me with that i wonder if i can have them automatic activated. And can i as administrator look the members age even if they have hide?

Thanks / GPaah

User avatar
antonza
Registered User
Posts: 41
Joined: Mon Dec 29, 2008 9:58 am
Location: Johannesburg,ZA
Contact:

Re: Birthday on Registration

Post by antonza » Sat Feb 14, 2009 5:09 pm

Hi all

Everything is all set, but yet when I go to the registration page I can not see to enter my b-day, yet when i try to register I get the error:

The entered birthday is not a valid date.

But I don't see where to enter my b-day in registration.

http://www.proteasport.co.za

Version: 3.0.4
We are ready for the World, is the World ready for Us?
Football World Cup 2010 - South Africa

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Sat Feb 14, 2009 8:59 pm

You didn't do the template changes to your AeroGlass style.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
antonza
Registered User
Posts: 41
Joined: Mon Dec 29, 2008 9:58 am
Location: Johannesburg,ZA
Contact:

Re: Birthday on Registration

Post by antonza » Sun Feb 15, 2009 1:11 pm

Thnx, feel like like a real twat......... :oops:
We are ready for the World, is the World ready for Us?
Football World Cup 2010 - South Africa

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17050
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Birthday on Registration

Post by DavidIQ » Sun Feb 15, 2009 1:41 pm

antonza wrote:Thnx, feel like like a real twat......... :oops:
Don't sweat it ;)
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

abhishek1711
Registered User
Posts: 528
Joined: Tue Apr 17, 2007 6:08 am
Location: India
Contact:

Re: Birthday on Registration

Post by abhishek1711 » Mon Feb 16, 2009 3:50 pm

getting this error


Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/content/a/b/h/abhishek1711/html/forum/includes/ucp/ucp_register.php on line 600

Locked

Return to “[3.0.x] MOD Database Releases”