Adding Website as required field at registration

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
3motronik
Registered User
Posts: 20
Joined: Tue Feb 17, 2009 8:01 pm
Contact:

Adding Website as required field at registration

Post by 3motronik »

Hello!
I would like to know:
How to include the field website in the record?

Something similar to these topics
http://www.phpbb.com/community/viewtopi ... 6&t=598049
http://www.phpbb.com/community/viewtopi ... &t=1228485

or in this MOD's

http://www.phpbb.com/community/viewtopi ... &t=1309175
http://www.phpbb.com/community/viewtopi ... &t=1268815


apologize for not writing well
I do not speak English

but please help

Greetings
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: Adding Website as required field at registration

Post by mtrs »

I modified the codes by DavidIQ, replaced location => website and user_from => user_website

http://www.phpbb.com/community/viewtopi ... 5#p7286585
DavidIQ wrote:You'll need to make code changes.

in includes/ucp/ucp_register.php
Find:

Code: Select all

			'tz'				=> request_var('tz', (float) $timezone),
Add after:

Code: Select all

			'website'				=> utf8_normalize_nfc(request_var('website', '', true)),
Find:

Code: Select all

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

Code: Select all

//Replace false to true to make it optional
				'website'			=> array('string', false, 2, 255),
Find:

Code: Select all

					'user_inactive_time'	=> $user_inactive_time,
Add after:

Code: Select all

					'user_website'				=> $data['website'],
Find:

Code: Select all

			'EMAIL_CONFIRM'		=> $data['email_confirm'],
Add after:

Code: Select all

			'WEBSITE'			=> $data['website'],
Then in includes/functions_user.php
Find:

Code: Select all

		'user_type'			=> $user_row['user_type'],
Add after:

Code: Select all

		'user_website'			=> (isset($user_row['user_website'])) ? $user_row['user_website'] : '',
And FINALLY in styles/prosilver/template/ucp_register.html
Find:

Code: Select all

	<dl>
		<dt><label for="tz">{L_TIMEZONE}:</label></dt>
		<dd><select name="tz" id="tz" class="autowidth">{S_TZ_OPTIONS}</select></dd>
	</dl>
Add after:

Code: Select all

	<dl>
		<dt><label for="tz">{L_WEBSITE}:</label></dt>
		<dd><input type="text" name="website" id="website" maxlength="255" value="{website}" class="inputbox autowidth" /></dd>
	</dl>
You can also try this mod, http://www.phpbb.com/community/viewtopi ... &t=1485095 which controls all of the default profile fields.
I abandoned all of my mods.
User avatar
3motronik
Registered User
Posts: 20
Joined: Tue Feb 17, 2009 8:01 pm
Contact:

Re: Adding Website as required field at registration

Post by 3motronik »

Thank you very much Friend

I decide by the MOD


Is it possible to include gender?
of This mod

http://www.phpbb.com/community/viewtopi ... 9&t=736135

Any ideas?
Locked

Return to “[3.0.x] Support Forum”