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.
bob_raid
Registered User
Posts: 166
Joined: Thu Jan 17, 2008 12:53 am

Re: Birthday on Registration

Post by bob_raid » Sun Jan 11, 2009 2:13 am

May I know how can I change this "Setting a year will list your age when it is your birthday."

As I would like to insert more words.

Thank in advance.

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

Re: Birthday on Registration

Post by DavidIQ » Sun Jan 11, 2009 2:26 am

Look for the following in language/en/ucp.php:

Code: Select all

	'BIRTHDAY_EXPLAIN'			=> 'Setting a year will list your age when it is your birthday.',
Change to your heart's content.
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 » Sun Jan 11, 2009 2:30 am

DavidIQ wrote:Well...it's a little unconventional but you can try this in the instructions:

In includes/ucp/ucp_register.php

Find:

Code: Select all

				'lang'				=> array('match', false, '#^[a-z_\-]{2,}$#i'),
Add after:

Code: Select all

				'bday_day'				=> array('num', false),
				'bday_month'			=> array('num', false),
You'll need to remove this line added by the mod:

Code: Select all

				'user_birthday' 	=> array('date', false),
Let me know if it works as I have not tested this...
No changes after the above amendment.

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

Re: Birthday on Registration

Post by bob_raid » Sun Jan 11, 2009 2:34 am

Or is there anyway to leave the year blank during registration? For example
in UCP profile if user leave the year entry blank it will not show their age.

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

Re: Birthday on Registration

Post by DavidIQ » Sun Jan 11, 2009 2:37 am

What does your ucp_register.php file look like? Use the code tags.
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 » Sun Jan 11, 2009 2:39 am

Code: Select all

// 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'),
				'bday_day'            => array('num', false),
				'bday_month'         => array('num', false),
			));
			if (!check_form_key('ucp_register'))
			{
				$error[] = $user->lang['FORM_INVALID'];
			}

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

Re: Birthday on Registration

Post by DavidIQ » Sun Jan 11, 2009 2:55 am

Try purging your cache.
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 » Sun Jan 11, 2009 5:33 am

Thank you, oic the year still will be there but can be ignore during registration.

At 1st I thought the mod will not show the year during registration. Therefore I didn't
try to register it myself. Only after I test after the mod that is when I realise it can be
ignore. :lol:

Thanks for your effort :)

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

Re: Birthday on Registration

Post by bob_raid » Sun Jan 11, 2009 5:43 am

I try to register by leaving the birthday field empty & it still can proceed for register.

Is there anyway to make the date & month a require field before user allow to register?

Petter89
Registered User
Posts: 11
Joined: Sat Jan 20, 2007 11:14 am

Re: Birthday on Registration

Post by Petter89 » Mon Jan 19, 2009 1:26 pm

I love this mod, but it's just not working for me.
I've installed everything, it looks like it works 100%, no errors or anything. But when I register with a user and enter the birthday it simply won't add the birthday to the database. I have to go into the UCP and enter it there manually, so I'm basically back to square 1.

Any help?

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

Re: Birthday on Registration

Post by DavidIQ » Mon Jan 19, 2009 2:26 pm

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.
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 » Mon Jan 19, 2009 9:55 pm

The mod is there and working great but how do i get it to work so its a required field as some members have registered and not filled it in??

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

Re: Birthday on Registration

Post by DavidIQ » Mon Jan 19, 2009 10:27 pm

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.

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

Re: Birthday on Registration

Post by bob_raid » Tue Jan 20, 2009 1:33 am

I had tried but user are still able to register without entering the birthday?

Or was it because I miss something on the registration part?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
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 5:56 am

You might have missed this edit to includes/ucp/ucp_register.php:
Find:

Code: Select all

				'lang'				=> array('match', false, '#^[a-z_\-]{2,}$#i'),
Add after:

Code: Select all

				'user_birthday' 	=> array('date', false),
Remember to purge your cache.
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.

Locked

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