Browse Source

removing fields on Register.php
and apparently I didn't commit the changes on Profile-Modify so lets do it now :P

Signed-off-by: Suki <[email protected]>

Suki 11 years ago
parent
commit
5854cf897b
2 changed files with 1 additions and 72 deletions
  1. 1 62
      Sources/Profile-Modify.php
  2. 0 10
      Sources/Register.php

+ 1 - 62
Sources/Profile-Modify.php

@@ -73,21 +73,6 @@ function loadProfileFields($force_reload = false)
 	*/
 
 	$profile_fields = array(
-		'aim' => array(
-			'type' => 'text',
-			'label' => $txt['aim'],
-			'subtext' => $txt['your_aim'],
-			'size' => 24,
-			'value' => strtr(empty($cur_profile['aim']) ? '' : $cur_profile['aim'], '+', ' '),
-			'permission' => 'profile_extra',
-			'input_validate' => create_function('&$value', '
-				$value = strtr($value, \' \', \'+\');
-				if (strlen($value) > 32)
-					return \'aim_too_long\';
-
-				return true;
-			'),
-		),
 		'avatar_choice' => array(
 			'type' => 'callback',
 			'callback_func' => 'avatar_select',
@@ -211,13 +196,6 @@ function loadProfileFields($force_reload = false)
 				return $isValid;
 			'),
 		),
-		'gender' => array(
-			'type' => 'select',
-			'cast_type' => 'int',
-			'options' => 'return array(0 => \'\', 1 => $txt[\'male\'], 2 => $txt[\'female\']);',
-			'label' => $txt['gender'],
-			'permission' => 'profile_extra',
-		),
 		'hide_email' => array(
 			'type' => 'check',
 			'value' => empty($cur_profile['hide_email']) ? true : false,
@@ -229,21 +207,6 @@ function loadProfileFields($force_reload = false)
 				return true;
 			'),
 		),
-		'icq' => array(
-			'type' => 'text',
-			'label' => $txt['icq'],
-			'subtext' => $txt['your_icq'],
-			'size' => 24,
-			'permission' => 'profile_extra',
-			// Need to make sure ICQ doesn't equal 0.
-			'input_validate' => create_function('&$value', '
-				if (empty($value))
-					$value = \'\';
-				else
-					$value = (int) $value;
-				return true;
-			'),
-		),
 		// Selecting group membership is a complicated one so we treat it separate!
 		'id_group' => array(
 			'type' => 'callback',
@@ -338,13 +301,6 @@ function loadProfileFields($force_reload = false)
 				}
 			'),
 		),
-		'location' => array(
-			'type' => 'text',
-			'label' => $txt['location'],
-			'log_change' => true,
-			'size' => 50,
-			'permission' => 'profile_other',
-		),
 		// The username is not always editable - so adjust it as such.
 		'member_name' => array(
 			'type' => allowedTo('admin_forum') && isset($_GET['changeusername']) ? 'text' : 'label',
@@ -378,13 +334,6 @@ function loadProfileFields($force_reload = false)
 				return false;
 			'),
 		),
-		'skype' => array(
-			'type' => 'text',
-			'label' => $txt['skype'],
-			'subtext' => $txt['skype_username'],
-			'size' => 24,
-			'permission' => 'profile_extra',
-		),
 		'passwrd1' => array(
 			'type' => 'password',
 			'label' => ucwords($txt['choose_pass']),
@@ -679,14 +628,6 @@ function loadProfileFields($force_reload = false)
 			'),
 			'link_with' => 'website',
 		),
-		'yim' => array(
-			'type' => 'text',
-			'label' => $txt['yim'],
-			'subtext' => $txt['your_yim'],
-			'size' => 24,
-			'input_attr' => array('maxlength="32"'),
-			'permission' => 'profile_extra',
-		),
 	);
 
 	call_integration_hook('integrate_load_profile_fields', array(&$profile_fields));
@@ -1680,9 +1621,7 @@ function forumProfile($memID)
 	setupProfileContext(
 		array(
 			'avatar_choice', 'hr', 'personal_text', 'hr',
-			'bday1', 'location', 'gender', 'hr',
-			'icq', 'aim', 'yim', 'skype', 'hr',
-			'usertitle', 'signature', 'hr',
+			'bday1', 'usertitle', 'signature', 'hr',
 			'karma_good', 'hr',
 			'website_title', 'website_url',
 		)

+ 0 - 10
Sources/Register.php

@@ -325,16 +325,6 @@ function Register2($verifiedOpenID = false)
 	{
 		$reg_fields = explode(',', $modSettings['registration_fields']);
 
-		// Easy string fields first.
-		foreach (array('skype', 'aim', 'yim', 'location') as $field)
-			if (in_array($field, $reg_fields))
-				$possible_strings[] = $field;
-
-		// Then the easy numeric fields.
-		foreach (array('icq', 'gender') as $field)
-			if (in_array($field, $reg_fields))
-				$possible_ints[] = $field;
-
 		// Website is a little different
 		if (in_array('website', $reg_fields))
 			$possible_strings += array('website_url', 'website_title');