From a823205403f2dbbd907c03e59fd232552351d566 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Feb 2014 11:05:48 +0100 Subject: [PATCH 01/11] [ticket/12233] Allow profile fields to be contact fields Contact fields are displayed with in the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages PHPBB3-12233 --- phpBB/adm/style/acp_profile.html | 6 +++ phpBB/includes/acp/acp_profile.php | 26 +++++++--- phpBB/includes/db/schema_data.php | 3 ++ phpBB/install/schemas/firebird_schema.sql | 5 +- phpBB/install/schemas/mssql_schema.sql | 5 +- phpBB/install/schemas/mysql_40_schema.sql | 3 ++ phpBB/install/schemas/mysql_41_schema.sql | 3 ++ phpBB/install/schemas/oracle_schema.sql | 3 ++ phpBB/install/schemas/postgres_schema.sql | 3 ++ phpBB/install/schemas/sqlite_schema.sql | 5 +- phpBB/language/en/acp/profile.php | 4 ++ .../data/v310/profilefield_contact_field.php | 51 +++++++++++++++++++ phpBB/phpbb/profilefields/manager.php | 19 +++++++ .../prosilver/template/memberlist_view.html | 11 +++- .../template/ucp_pm_viewmessage.html | 11 +++- .../prosilver/template/viewtopic_body.html | 9 +++- .../subsilver2/template/memberlist_view.html | 10 ++++ .../subsilver2/template/viewtopic_body.html | 2 + 18 files changed, 166 insertions(+), 13 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 04e6d9f12b..64bc3df09b 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -79,6 +79,12 @@

{L_HIDE_PROFILE_FIELD_EXPLAIN}
checked="checked" />
+
+

{L_FIELD_IS_CONTACT_EXPLAIN}
+
checked="checked" />
+
+
+
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 3a5298fb58..4d316d84e4 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -386,6 +386,9 @@ class acp_profile 'field_show_on_pm' => 0, 'field_show_on_vt' => 0, 'field_show_on_ml' => 0, + 'field_is_contact' => 0, + 'field_contact_desc'=> '', + 'field_contact_url' => '', 'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)), 'lang_explain' => '', 'lang_default_value'=> '') @@ -396,7 +399,7 @@ class acp_profile // $exclude contains the data we gather in each step $exclude = array( - 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view'), + 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view', 'field_is_contact', 'field_contact_desc', 'field_contact_url'), 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'), 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options') ); @@ -411,21 +414,24 @@ class acp_profile 'field_show_on_ml', 'field_show_profile', 'field_hide', + 'field_is_contact', ); $options = $profile_field->prepare_options_form($exclude, $visibility_ary); $cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']); - $cp->vars['lang_name'] = utf8_normalize_nfc(request_var('lang_name', $field_row['lang_name'], true)); - $cp->vars['lang_explain'] = utf8_normalize_nfc(request_var('lang_explain', $field_row['lang_explain'], true)); - $cp->vars['lang_default_value'] = utf8_normalize_nfc(request_var('lang_default_value', $field_row['lang_default_value'], true)); + $cp->vars['lang_name'] = $request->variable('lang_name', $field_row['lang_name'], true); + $cp->vars['lang_explain'] = $request->variable('lang_explain', $field_row['lang_explain'], true); + $cp->vars['lang_default_value'] = $request->variable('lang_default_value', $field_row['lang_default_value'], true); + $cp->vars['field_contact_desc'] = $request->variable('field_contact_desc', $field_row['field_contact_desc'], true); + $cp->vars['field_contact_url'] = $request->variable('field_contact_url', $field_row['field_contact_url'], true); foreach ($visibility_ary as $val) { - $cp->vars[$val] = ($submit || $save) ? request_var($val, 0) : $field_row[$val]; + $cp->vars[$val] = ($submit || $save) ? $request->variable($val, 0) : $field_row[$val]; } - $cp->vars['field_no_view'] = request_var('field_no_view', (int) $field_row['field_no_view']); + $cp->vars['field_no_view'] = $request->variable('field_no_view', (int) $field_row['field_no_view']); // If the user has submitted a form with options (i.e. dropdown field) if ($options) @@ -626,6 +632,9 @@ class acp_profile 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false, 'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false, 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false, + 'S_FIELD_CONTACT' => $cp->vars['field_is_contact'], + 'FIELD_CONTACT_DESC'=> $cp->vars['field_contact_desc'], + 'FIELD_CONTACT_URL' => $cp->vars['field_contact_url'], 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']), 'FIELD_TYPE' => $profile_field->get_name(), @@ -886,7 +895,10 @@ class acp_profile 'field_show_on_ml' => $cp->vars['field_show_on_ml'], 'field_hide' => $cp->vars['field_hide'], 'field_show_profile' => $cp->vars['field_show_profile'], - 'field_no_view' => $cp->vars['field_no_view'] + 'field_no_view' => $cp->vars['field_no_view'], + 'field_is_contact' => $cp->vars['field_is_contact'], + 'field_contact_desc' => $cp->vars['field_contact_desc'], + 'field_contact_url' => $cp->vars['field_contact_url'], ); if ($action == 'create') diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index 0447895433..2c45e8d194 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -777,6 +777,9 @@ $schema_data['phpbb_profile_fields'] = array( 'field_no_view' => array('BOOL', 0), 'field_active' => array('BOOL', 0), 'field_order' => array('UINT', 0), + 'field_is_contact' => array('BOOL', 0), + 'field_contact_desc' => array('VCHAR', ''), + 'field_contact_url' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'field_id', 'KEYS' => array( diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 263ebb4490..ea7153b643 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -926,7 +926,10 @@ CREATE TABLE phpbb_profile_fields ( field_hide INTEGER DEFAULT 0 NOT NULL, field_no_view INTEGER DEFAULT 0 NOT NULL, field_active INTEGER DEFAULT 0 NOT NULL, - field_order INTEGER DEFAULT 0 NOT NULL + field_order INTEGER DEFAULT 0 NOT NULL, + field_is_contact INTEGER DEFAULT 0 NOT NULL, + field_contact_desc VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + field_contact_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 11309d67a5..1aa33508cc 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1132,7 +1132,10 @@ CREATE TABLE [phpbb_profile_fields] ( [field_hide] [int] DEFAULT (0) NOT NULL , [field_no_view] [int] DEFAULT (0) NOT NULL , [field_active] [int] DEFAULT (0) NOT NULL , - [field_order] [int] DEFAULT (0) NOT NULL + [field_order] [int] DEFAULT (0) NOT NULL , + [field_is_contact] [int] DEFAULT (0) NOT NULL , + [field_contact_desc] [varchar] (255) DEFAULT ('') NOT NULL , + [field_contact_url] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 16c26fac4a..37c5d14fab 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -664,6 +664,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_contact_desc varbinary(255) DEFAULT '' NOT NULL, + field_contact_url varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index b345e1f474..aa0cfd7c50 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -664,6 +664,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_contact_desc varchar(255) DEFAULT '' NOT NULL, + field_contact_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index b819ba2c59..19439ba788 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1236,6 +1236,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view number(1) DEFAULT '0' NOT NULL, field_active number(1) DEFAULT '0' NOT NULL, field_order number(8) DEFAULT '0' NOT NULL, + field_is_contact number(1) DEFAULT '0' NOT NULL, + field_contact_desc varchar2(255) DEFAULT '' , + field_contact_url varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id) ) / diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index be8af3c873..390bc0211d 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -872,6 +872,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0), field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0), field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0), + field_is_contact INT2 DEFAULT '0' NOT NULL CHECK (field_is_contact >= 0), + field_contact_desc varchar(255) DEFAULT '' NOT NULL, + field_contact_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id) ); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 717b242a57..df8396f04c 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -644,7 +644,10 @@ CREATE TABLE phpbb_profile_fields ( field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0', field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0', field_active INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_order INTEGER UNSIGNED NOT NULL DEFAULT '0' + field_order INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_is_contact INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_contact_desc varchar(255) NOT NULL DEFAULT '', + field_contact_url varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 726a9bac82..0ea95c35ba 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -82,6 +82,8 @@ $lang = array_merge($lang, array( 'EVERYTHING_OK' => 'Everything OK', 'FIELD_BOOL' => 'Boolean (Yes/No)', + 'FIELD_CONTACT_DESC' => 'Contact description', + 'FIELD_CONTACT_URL' => 'Contact link', 'FIELD_DATE' => 'Date', 'FIELD_DESCRIPTION' => 'Field description', 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.', @@ -90,6 +92,8 @@ $lang = array_merge($lang, array( 'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.', 'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.', 'FIELD_INT' => 'Numbers', + 'FIELD_IS_CONTACT' => 'Display field as a contact field', + 'FIELD_IS_CONTACT_EXPLAIN' => 'Contact fields are displayed with in the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages.', 'FIELD_LENGTH' => 'Length of input box', 'FIELD_NOT_FOUND' => 'Profile field not found.', 'FIELD_STRING' => 'Single text field', diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php new file mode 100644 index 0000000000..c7617813eb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php @@ -0,0 +1,51 @@ +db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_is_contact'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_on_memberlist', + ); + } + + public function update_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_is_contact' => array('BOOL', 0), + 'field_contact_desc' => array('VCHAR', ''), + 'field_contact_url' => array('VCHAR', ''), + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_is_contact', + 'field_contact_desc', + 'field_contact_url', + ), + ), + ); + } +} diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index ac2542a6d4..874d0a21e0 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -353,21 +353,40 @@ class manager continue; } + $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); + if (strpos($field_desc, '%s') !== false) + { + $field_desc = sprintf($field_desc, $value); + } + $contact_url = ''; + if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) + { + $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); + } + $tpl_fields['row'] += array( + 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident, 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, + 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url, + 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc, 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']), 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']), + 'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'], 'S_PROFILE_' . strtoupper($ident) => true, ); $tpl_fields['blockrow'][] = array( + 'PROFILE_FIELD_IDENT' => $ident, 'PROFILE_FIELD_VALUE' => $value, + 'PROFILE_FIELD_CONTACT' => $contact_url, + 'PROFILE_FIELD_DESC' => $field_desc, 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'], 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']), 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']), + 'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'], 'S_PROFILE_' . strtoupper($ident) => true, ); } diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 1c4b6be2d1..78aca39bdf 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -29,7 +29,11 @@
{L_USER_IS_INACTIVE}{L_COLON}
{USER_INACTIVE_REASON}
{L_AGE}{L_COLON}
{AGE}
{L_USERGROUPS}{L_COLON}
-
{custom_fields.PROFILE_FIELD_NAME}{L_COLON}
{custom_fields.PROFILE_FIELD_VALUE}
+ + +
{custom_fields.PROFILE_FIELD_NAME}{L_COLON}
{custom_fields.PROFILE_FIELD_VALUE}
+ +
 
{L_REMOVE_FRIEND}
@@ -64,6 +68,11 @@
{L_AIM}{L_COLON}
{L_SEND_AIM_MESSAGE}{USER_AIM}
{L_ICQ}{L_COLON}
{L_SEND_ICQ_MESSAGE}{USER_ICQ}
{L_JABBER}{L_COLON}
{L_SEND_JABBER_MESSAGE}
{L_JABBER}{L_COLON}
{USER_JABBER}
+ + +
{custom_fields.PROFILE_FIELD_NAME}{L_COLON}
{custom_fields.PROFILE_FIELD_DESC}
+ +
{PROFILE_FIELD1_NAME}{L_COLON}
{PROFILE_FIELD1_VALUE}
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 3623489ccf..1aebec7887 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -27,7 +27,9 @@ -
{custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_VALUE}
+ +
{custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_VALUE}
+ @@ -35,6 +37,7 @@
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index d5c45e1dfe..15150ce023 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -137,7 +137,9 @@ -
{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE}
+ +
{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE}
+ @@ -153,6 +155,11 @@
  • {L_YIM}
  • {L_AIM}
  • {L_JABBER}
  • + + +
  • {postrow.custom_fields.PROFILE_FIELD_NAME}
  • + + diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 40d61dddd9..31b274d96f 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -138,6 +138,14 @@ {L_JABBER}{L_COLON} {JABBER_IMG}{USER_JABBER_IMG} + + + + {custom_fields.PROFILE_FIELD_NAME}{L_COLON} + {custom_fields.PROFILE_FIELD_VALUE} + + + @@ -164,10 +172,12 @@ + {custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_VALUE} + diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 9ba71d78bc..251983761c 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -210,7 +210,9 @@ +
    {postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE} + From 43040dd6a4d288c05ac4387f5f3eb1bc2a0e5b5d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Feb 2014 15:08:15 +0100 Subject: [PATCH 02/11] [ticket/12233] Add images back to subsilver2 PHPBB3-12233 --- phpBB/styles/subsilver2/template/memberlist_view.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 31b274d96f..052c4ac0e3 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -142,7 +142,7 @@ {custom_fields.PROFILE_FIELD_NAME}{L_COLON} - {custom_fields.PROFILE_FIELD_VALUE} + {custom_fields.PROFILE_FIELD_DESC} From f2c208fa7f6f7eef9853f8ae86d493c015ee5976 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Feb 2014 15:13:46 +0100 Subject: [PATCH 03/11] [ticket/12233] Update schema file PHPBB3-12233 --- phpBB/install/schemas/schema_data.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 2aff81a6a5..f2cd4e6314 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -788,9 +788,9 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); # Add default profile fields -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1); -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2); -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3, 0, '', ''); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); From 76409388afcd6389b5a29bc54b49faaf6bc4b4a5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Feb 2014 15:11:17 +0100 Subject: [PATCH 04/11] [ticket/12234] Replace ICQ with custom profile field PHPBB3-12234 --- phpBB/adm/style/acp_users_profile.html | 4 -- phpBB/develop/benchmark.php | 5 +- phpBB/includes/acp/acp_users.php | 6 --- phpBB/includes/db/schema_data.php | 2 +- phpBB/includes/ucp/ucp_pm_viewmessage.php | 1 - phpBB/includes/ucp/ucp_profile.php | 6 --- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/firebird_schema.sql | 4 +- phpBB/install/schemas/mssql_schema.sql | 4 +- phpBB/install/schemas/mysql_40_schema.sql | 2 +- phpBB/install/schemas/mysql_41_schema.sql | 2 +- phpBB/install/schemas/oracle_schema.sql | 2 +- phpBB/install/schemas/postgres_schema.sql | 2 +- phpBB/install/schemas/schema_data.sql | 5 +- phpBB/install/schemas/sqlite_schema.sql | 2 +- phpBB/language/en/acp/styles.php | 1 - phpBB/language/en/common.php | 4 -- phpBB/language/en/memberlist.php | 1 - phpBB/language/en/ucp.php | 1 - phpBB/memberlist.php | 16 ++---- .../migration/data/v310/profilefield_icq.php | 50 +++++++++++++++++++ .../data/v310/profilefield_icq_cleanup.php | 47 +++++++++++++++++ .../prosilver/template/memberlist_im.html | 20 +------- .../prosilver/template/memberlist_search.html | 4 -- .../prosilver/template/memberlist_view.html | 1 - .../template/ucp_pm_viewmessage.html | 3 +- .../template/ucp_profile_profile_info.html | 4 -- .../prosilver/template/viewtopic_body.html | 3 +- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/buttons.css | 2 + phpBB/styles/prosilver/theme/colours.css | 1 + phpBB/styles/prosilver/theme/imageset.css | 2 +- .../subsilver2/template/memberlist_im.html | 2 +- .../template/memberlist_search.html | 3 +- .../subsilver2/template/memberlist_view.html | 4 -- .../template/ucp_profile_profile_info.html | 4 -- .../styles/subsilver2/theme/en/stylesheet.css | 2 +- phpBB/styles/subsilver2/theme/stylesheet.css | 2 +- phpBB/viewtopic.php | 16 ------ tests/auth/provider_apache_test.php | 1 - 40 files changed, 128 insertions(+), 117 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_icq.php create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index f4a3c06e67..39cc5da24d 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -2,10 +2,6 @@
    {L_USER_PROFILE} -
    -
    -
    -
    diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d5eaed3bc7..0be483e234 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -366,7 +366,6 @@ function make_user($username) $password = md5("benchpass"); $email = "nobody@localhost"; - $icq = "12345678"; $website = "http://www.phpbb.com"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; @@ -419,8 +418,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) - VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_website, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) + VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$website', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 87582dcedb..634cd093f1 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1360,7 +1360,6 @@ class acp_users $user_row['iso_lang_id'] = $row['lang_id']; $data = array( - 'icq' => request_var('icq', $user_row['user_icq']), 'aim' => request_var('aim', $user_row['user_aim']), 'msn' => request_var('msn', $user_row['user_msnm']), 'yim' => request_var('yim', $user_row['user_yim']), @@ -1385,9 +1384,6 @@ class acp_users if ($submit) { $error = validate_data($data, array( - 'icq' => array( - array('string', true, 3, 15), - array('match', true, '#^[0-9]+$#i')), 'aim' => array('string', true, 3, 255), 'msn' => array('string', true, 5, 255), 'jabber' => array( @@ -1418,7 +1414,6 @@ class acp_users if (!sizeof($error)) { $sql_ary = array( - 'user_icq' => $data['icq'], 'user_aim' => $data['aim'], 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], @@ -1467,7 +1462,6 @@ class acp_users unset($now); $template->assign_vars(array( - 'ICQ' => $data['icq'], 'YIM' => $data['yim'], 'AIM' => $data['aim'], 'MSN' => $data['msn'], diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index 2c45e8d194..c8e405cd0f 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -794,6 +794,7 @@ $schema_data['phpbb_profile_fields_data'] = array( 'pf_phpbb_location' => array('VCHAR', ''), 'pf_phpbb_interests' => array('TEXT_UNI', ''), 'pf_phpbb_occupation' => array('TEXT_UNI', ''), + 'pf_phpbb_icq' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'user_id', ); @@ -1172,7 +1173,6 @@ $schema_data['phpbb_users'] = array( 'user_sig' => array('MTEXT_UNI', ''), 'user_sig_bbcode_uid' => array('VCHAR:8', ''), 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''), - 'user_icq' => array('VCHAR:15', ''), 'user_aim' => array('VCHAR_UNI', ''), 'user_yim' => array('VCHAR_UNI', ''), 'user_msnm' => array('VCHAR_UNI', ''), diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index e513b8ade2..b25ae32ad9 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -210,7 +210,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '', 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '', - 'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/' . urlencode($user_info['user_icq']) . '/' : '', 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '', 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '', diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8def48b1b4..8e87c537cc 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -264,7 +264,6 @@ class ucp_profile $cp_data = $cp_error = array(); $data = array( - 'icq' => request_var('icq', $user->data['user_icq']), 'aim' => request_var('aim', $user->data['user_aim']), 'msn' => request_var('msn', $user->data['user_msnm']), 'yim' => request_var('yim', $user->data['user_yim']), @@ -292,9 +291,6 @@ class ucp_profile if ($submit) { $validate_array = array( - 'icq' => array( - array('string', true, 3, 15), - array('match', true, '#^[0-9]+$#i')), 'aim' => array('string', true, 3, 255), 'msn' => array('string', true, 5, 255), 'jabber' => array( @@ -343,7 +339,6 @@ class ucp_profile } $sql_ary = array( - 'user_icq' => $data['icq'], 'user_aim' => $data['aim'], 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], @@ -411,7 +406,6 @@ class ucp_profile $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
    ', $error) : '', - 'ICQ' => $data['icq'], 'YIM' => $data['yim'], 'AIM' => $data['aim'], 'MSN' => $data['msn'], diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 94f685fa2f..207ea2aa59 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -911,7 +911,6 @@ if (!$get_info) array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), - array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), array('user_rank', 'users.user_rank', 'intval'), array('user_permissions', '', ''), @@ -963,6 +962,7 @@ if (!$get_info) array('pf_phpbb_occupation', 'users.user_occ', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), 'where' => 'users.user_id <> -1', ), diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index ea7153b643..d0cab35dc8 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -953,7 +953,8 @@ CREATE TABLE phpbb_profile_fields_data ( user_id INTEGER DEFAULT 0 NOT NULL, pf_phpbb_location VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL + pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, + pf_phpbb_icq VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; @@ -1425,7 +1426,6 @@ CREATE TABLE phpbb_users ( user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL, user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 1aa33508cc..b017362315 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1160,7 +1160,8 @@ CREATE TABLE [phpbb_profile_fields_data] ( [user_id] [int] DEFAULT (0) NOT NULL , [pf_phpbb_location] [varchar] (255) DEFAULT ('') NOT NULL , [pf_phpbb_interests] [varchar] (4000) DEFAULT ('') NOT NULL , - [pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL + [pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL , + [pf_phpbb_icq] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1741,7 +1742,6 @@ CREATE TABLE [phpbb_users] ( [user_sig] [text] DEFAULT ('') NOT NULL , [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , [user_aim] [varchar] (255) DEFAULT ('') NOT NULL , [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 37c5d14fab..9d0ee88b1a 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -679,6 +679,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varbinary(255) DEFAULT '' NOT NULL, pf_phpbb_interests blob NOT NULL, pf_phpbb_occupation blob NOT NULL, + pf_phpbb_icq varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -1034,7 +1035,6 @@ CREATE TABLE phpbb_users ( user_sig mediumblob NOT NULL, user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - user_icq varbinary(15) DEFAULT '' NOT NULL, user_aim blob NOT NULL, user_yim blob NOT NULL, user_msnm blob NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index aa0cfd7c50..ad7609d651 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -679,6 +679,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, pf_phpbb_interests text NOT NULL, pf_phpbb_occupation text NOT NULL, + pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -1034,7 +1035,6 @@ CREATE TABLE phpbb_users ( user_sig mediumtext NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, user_aim varchar(255) DEFAULT '' NOT NULL, user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 19439ba788..9797c6d784 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1272,6 +1272,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar2(255) DEFAULT '' , pf_phpbb_interests clob DEFAULT '' , pf_phpbb_occupation clob DEFAULT '' , + pf_phpbb_icq varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) ) / @@ -1858,7 +1859,6 @@ CREATE TABLE phpbb_users ( user_sig clob DEFAULT '' , user_sig_bbcode_uid varchar2(8) DEFAULT '' , user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , - user_icq varchar2(15) DEFAULT '' , user_aim varchar2(765) DEFAULT '' , user_yim varchar2(765) DEFAULT '' , user_msnm varchar2(765) DEFAULT '' , diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 390bc0211d..88323a5695 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -889,6 +889,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL, pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL, + pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -1306,7 +1307,6 @@ CREATE TABLE phpbb_users ( user_sig TEXT DEFAULT '' NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, user_aim varchar(255) DEFAULT '' NOT NULL, user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index f2cd4e6314..49c61b8c2f 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', 0); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', 0); # -- username: Admin password: admin (change this or remove it once everything is working!) -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', ''); # -- Groups INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); @@ -791,6 +791,7 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 4, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/'); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index df8396f04c..c0241be6cf 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -659,6 +659,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) NOT NULL DEFAULT '', pf_phpbb_interests text(65535) NOT NULL DEFAULT '', pf_phpbb_occupation text(65535) NOT NULL DEFAULT '', + pf_phpbb_icq varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (user_id) ); @@ -1005,7 +1006,6 @@ CREATE TABLE phpbb_users ( user_sig mediumtext(16777215) NOT NULL DEFAULT '', user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - user_icq varchar(15) NOT NULL DEFAULT '', user_aim varchar(255) NOT NULL DEFAULT '', user_yim varchar(255) NOT NULL DEFAULT '', user_msnm varchar(255) NOT NULL DEFAULT '', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index e7954ff148..0fac0a020b 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -184,7 +184,6 @@ $lang = array_merge($lang, array( 'IMG_ICON_CONTACT_AIM' => 'AIM', 'IMG_ICON_CONTACT_EMAIL' => 'Send email', - 'IMG_ICON_CONTACT_ICQ' => 'ICQ', 'IMG_ICON_CONTACT_JABBER' => 'Jabber', 'IMG_ICON_CONTACT_MSNM' => 'WLM', 'IMG_ICON_CONTACT_PM' => 'Send message', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 896d2ef811..9586d25ed3 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -319,7 +319,6 @@ $lang = array_merge($lang, array( 'HOME' => 'Home', 'ICQ' => 'ICQ', - 'ICQ_STATUS' => 'ICQ status', 'IF' => 'If', 'IMAGE' => 'Image', 'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.', @@ -683,7 +682,6 @@ $lang = array_merge($lang, array( 'TOO_LONG_AIM' => 'The screenname you entered is too long.', 'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.', 'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.', - 'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.', 'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.', 'TOO_LONG_MSN' => 'The WLM name you entered is too long.', 'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.', @@ -701,7 +699,6 @@ $lang = array_merge($lang, array( 'TOO_SHORT_AIM' => 'The screenname you entered is too short.', 'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.', 'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.', - 'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.', 'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.', 'TOO_SHORT_MSN' => 'The WLM name you entered is too short.', 'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.', @@ -826,7 +823,6 @@ $lang = array_merge($lang, array( 'WRONG_PASSWORD' => 'You entered an incorrect password.', 'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.', - 'WRONG_DATA_ICQ' => 'The number you entered is not a valid ICQ number.', 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.', 'WRONG_DATA_LANG' => 'The language you specified is not valid.', 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 8162f195eb..cfd1dacc45 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -74,7 +74,6 @@ $lang = array_merge($lang, array( 'IM_AIM' => 'Please note that you need AOL Instant Messenger installed to use this.', 'IM_AIM_EXPRESS' => 'AIM Express', 'IM_DOWNLOAD_APP' => 'Download application', - 'IM_ICQ' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.', 'IM_MESSAGE' => 'Your message', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 6f392d6efe..1520af9ef8 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -492,7 +492,6 @@ $lang = array_merge($lang, array( 'UCP_COPPA_BEFORE' => 'Before %s', 'UCP_COPPA_ON_AFTER' => 'On or after %s', 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.', - 'UCP_ICQ' => 'ICQ number', 'UCP_JABBER' => 'Jabber address', 'UCP_LOGIN_LINK' => 'Set up an external account association', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e927429810..bdd5bc2c23 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -651,7 +651,6 @@ switch ($mode) 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), - 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), @@ -998,8 +997,8 @@ switch ($mode) $pagination = $phpbb_container->get('pagination'); // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); if ($auth->acl_get('a_user')) { @@ -1042,7 +1041,7 @@ switch ($mode) $select_single = request_var('select_single', false); // Search URL parameters, if any of these are in the URL we do a search - $search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); + $search_params = array('username', 'email', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); // We validate form and field here, only id/class allowed $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; @@ -1051,7 +1050,6 @@ switch ($mode) { $username = request_var('username', '', true); $email = strtolower(request_var('email', '')); - $icq = request_var('icq', ''); $aim = request_var('aim', ''); $yahoo = request_var('yahoo', ''); $msn = request_var('msn', ''); @@ -1095,7 +1093,6 @@ switch ($mode) $sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : ''; $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : ''; - $sql_where .= ($icq) ? ' AND u.user_icq ' . $db->sql_like_expression(str_replace('*', $db->any_char, $icq)) . ' ' : ''; $sql_where .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : ''; $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : ''; $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; @@ -1327,7 +1324,6 @@ switch ($mode) 'select_single' => array('select_single', $select_single), 'username' => array('username', '', true), 'email' => array('email', ''), - 'icq' => array('icq', ''), 'aim' => array('aim', ''), 'yahoo' => array('yahoo', ''), 'msn' => array('msn', ''), @@ -1459,7 +1455,6 @@ switch ($mode) $template->assign_vars(array( 'USERNAME' => $username, 'EMAIL' => $email, - 'ICQ' => $icq, 'AIM' => $aim, 'YAHOO' => $yahoo, 'MSNM' => $msn, @@ -1639,7 +1634,6 @@ switch ($mode) 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), - 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), @@ -1653,7 +1647,6 @@ switch ($mode) 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_WEBSITE' => $sort_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_ICQ' => $sort_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), @@ -1767,7 +1760,6 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, 'RANK_IMG' => $rank_img, 'RANK_IMG_SRC' => $rank_img_src, - 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '' : '', 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false, @@ -1779,13 +1771,11 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'U_EMAIL' => $email, 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '', - 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/' . urlencode($data['user_icq']) . '/' : '', 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', - 'USER_ICQ' => $data['user_icq'], 'USER_AIM' => $data['user_aim'], 'USER_YIM' => $data['user_yim'], 'USER_MSN' => $data['user_msnm'], diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php new file mode 100644 index 0000000000..0b8344333a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php @@ -0,0 +1,50 @@ + 'phpbb_icq', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_icq', + 'field_length' => '20', + 'field_minlen' => '3', + 'field_maxlen' => '15', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '[0-9]+', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'SEND_ICQ_MESSAGE', + 'field_contact_url' => 'https://www.icq.com/people/%s/', + ); + + protected $user_column_name = 'user_icq'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php new file mode 100644 index 0000000000..c073b191a1 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php @@ -0,0 +1,47 @@ +db_tools->sql_column_exists($this->table_prefix . 'users', 'user_icq'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_icq', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_icq', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_icq' => array('VCHAR:20', ''), + ), + ), + ); + } +} diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 8e7842e631..0764c7ec01 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -13,27 +13,9 @@
    -
    {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
    +
    {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
     
    -
    -
    - - - - -
     
    diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 0b04d0087c..7452d14de1 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -17,10 +17,6 @@
    -
    -
    -
    -
    diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 78aca39bdf..d5b7c67a85 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -66,7 +66,6 @@
    {L_MSNM}{L_COLON}
    {L_SEND_MSNM_MESSAGE}{USER_MSN}
    {L_YIM}{L_COLON}
    {L_SEND_YIM_MESSAGE}{USER_YIM}
    {L_AIM}{L_COLON}
    {L_SEND_AIM_MESSAGE}{USER_AIM}
    -
    {L_ICQ}{L_COLON}
    {L_SEND_ICQ_MESSAGE}{USER_ICQ}
    {L_JABBER}{L_COLON}
    {L_SEND_JABBER_MESSAGE}
    {L_JABBER}{L_COLON}
    {USER_JABBER}
    diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 1aebec7887..a5e3b307fc 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -34,7 +34,7 @@ - +
      @@ -42,7 +42,6 @@
    • {L_WEBSITE}
    • {L_MSNM}
    • -
    • {L_ICQ}
    • {L_YIM}
    • {L_AIM}
    • {L_JABBER}
    • diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 03b8aa0a14..ca568894fb 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -10,10 +10,6 @@

      {ERROR}

      -
      -
      -
      -
      diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 15150ce023..d877583313 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -144,14 +144,13 @@ - +
      • {L_PRIVATE_MESSAGE}
      • {L_WEBSITE}
      • {L_MSNM}
      • -
      • {L_ICQ}
      • {L_YIM}
      • {L_AIM}
      • {L_JABBER}
      • diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 57d9a33c12..486ac74896 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -849,7 +849,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { padding-right: 11px; padding-left: 0; } -.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { +.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { padding-right: 20px; padding-left: 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 89fdcd85a8..ad24c1c72d 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -242,6 +242,7 @@ ul.profile-icons.responsive a.responsive-menu-link:before { .web-icon, .web-icon a { background: none top left no-repeat; } .msnm-icon, .msnm-icon a { background: none top left no-repeat; } .icq-icon, .icq-icon a { background: none top left no-repeat; } +.phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; } .jabber-icon, .jabber-icon a { background: none top left no-repeat; } .pm-icon, .pm-icon a { background: none top left no-repeat; } .quote-icon, .quote-icon a { background: none top left no-repeat; } @@ -260,6 +261,7 @@ ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; } ul.profile-icons li.web-icon { width: 20px; height: 20px; } ul.profile-icons li.msnm-icon { width: 20px; height: 20px; } ul.profile-icons li.icq-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_icq-icon { width: 20px; height: 20px; } ul.profile-icons li.jabber-icon { width: 20px; height: 20px; } ul.profile-icons li.pm-icon { width: 28px; height: 20px; } ul.profile-icons li.quote-icon { width: 54px; height: 20px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 1d4c657a14..3b7789c8da 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -744,6 +744,7 @@ a.sendemail { .web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); } .msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } .icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } +.phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } .jabber-icon, .jabber-icon a { background-image: url("./images/icon_contact_jabber.gif"); } .pm-icon, .pm-icon a { background-image: url("./en/icon_contact_pm.gif"); } .quote-icon, .quote-icon a { background-image: url("./en/icon_post_quote.gif"); } diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css index 7aa19df06e..c604729cdf 100644 --- a/phpBB/styles/prosilver/theme/imageset.css +++ b/phpBB/styles/prosilver/theme/imageset.css @@ -270,7 +270,7 @@ span.imageset { padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.icon_contact_icq, .imageset.phpbb_icq-icon { background-image: url("./images/icon_contact_icq.gif"); padding-left: 20px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index da1ad661c3..35b1e6bdcb 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -14,7 +14,7 @@ {L_IM_RECIPIENT}{L_COLON} - {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG} + {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG} diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index 484bbd85e8..a0d46bf670 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -76,8 +76,7 @@ {L_USERNAME}{L_COLON} - {L_ICQ}{L_COLON} - +   diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 052c4ac0e3..4a81482c18 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -130,10 +130,6 @@ {L_AIM}{L_COLON} {AIM_IMG}{USER_AIM} - - {L_ICQ}{L_COLON} - {ICQ_IMG}{USER_ICQ} - {L_JABBER}{L_COLON} {JABBER_IMG}{USER_JABBER_IMG} diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html index a565cac5ce..6f91d8029b 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -12,10 +12,6 @@ {L_PROFILE_INFO_NOTICE} - - {L_UCP_ICQ}{L_COLON} - - {L_UCP_AIM}{L_COLON} diff --git a/phpBB/styles/subsilver2/theme/en/stylesheet.css b/phpBB/styles/subsilver2/theme/en/stylesheet.css index 563492d4fc..06332f082a 100644 --- a/phpBB/styles/subsilver2/theme/en/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/en/stylesheet.css @@ -9,7 +9,7 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.phpbb_icq-icon, .imageset.icon_contact_icq { background-image: url("./icon_contact_icq.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index da99051329..9deccd4420 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -1023,7 +1023,7 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.phpbb_icq-icon, .imageset.icon_contact_icq { background-image: url("./en/icon_contact_icq.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index e02052a14d..061973c34b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -621,7 +621,6 @@ $template->assign_vars(array( 'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'), 'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'), 'WWW_IMG' => $user->img('icon_contact_www', 'VISIT_WEBSITE'), - 'ICQ_IMG' => $user->img('icon_contact_icq', 'ICQ'), 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'), 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'), 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'), @@ -1118,8 +1117,6 @@ while ($row = $db->sql_fetchrow($result)) 'pm' => '', 'email' => '', 'www' => '', - 'icq_status_img' => '', - 'icq' => '', 'aim' => '', 'msn' => '', 'yim' => '', @@ -1224,17 +1221,6 @@ while ($row = $db->sql_fetchrow($result)) $user_cache[$poster_id]['email'] = ''; } - if (!empty($row['user_icq'])) - { - $user_cache[$poster_id]['icq'] = 'http://www.icq.com/people/' . urlencode($row['user_icq']) . '/'; - $user_cache[$poster_id]['icq_status_img'] = ''; - } - else - { - $user_cache[$poster_id]['icq_status_img'] = ''; - $user_cache[$poster_id]['icq'] = ''; - } - if ($config['allow_birthdays'] && !empty($row['user_birthday'])) { list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday'])); @@ -1632,7 +1618,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '', 'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '', 'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '', - 'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'], 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false), @@ -1646,7 +1631,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', 'U_EMAIL' => $user_cache[$poster_id]['email'], 'U_WWW' => $user_cache[$poster_id]['www'], - 'U_ICQ' => $user_cache[$poster_id]['icq'], 'U_AIM' => $user_cache[$poster_id]['aim'], 'U_MSN' => $user_cache[$poster_id]['msn'], 'U_YIM' => $user_cache[$poster_id]['yim'], diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index ac5377f2f6..bdf9259ddd 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -193,7 +193,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case 'user_sig' => '', 'user_sig_bbcode_uid' => '', 'user_sig_bbcode_bitfield' => '', - 'user_icq' => '', 'user_aim' => '', 'user_yim' => '', 'user_msnm' => '', From a2f2629e2a5038aca372cc3e55c408a99b6ca6fc Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 11 Feb 2014 23:02:54 +0100 Subject: [PATCH 05/11] [ticket/12187] Add URL type for profile fields PHPBB3-12187 --- phpBB/adm/style/profilefields/url.html | 3 + phpBB/config/profilefields.yml | 9 ++ phpBB/language/en/acp/profile.php | 1 + phpBB/language/en/ucp.php | 1 + phpBB/phpbb/profilefields/type/type_int.php | 2 +- .../phpbb/profilefields/type/type_string.php | 2 +- phpBB/phpbb/profilefields/type/type_url.php | 83 +++++++++++++++++++ .../prosilver/template/profilefields/url.html | 3 + .../template/profilefields/url.html | 3 + 9 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 phpBB/adm/style/profilefields/url.html create mode 100644 phpBB/phpbb/profilefields/type/type_url.php create mode 100644 phpBB/styles/prosilver/template/profilefields/url.html create mode 100644 phpBB/styles/subsilver2/template/profilefields/url.html diff --git a/phpBB/adm/style/profilefields/url.html b/phpBB/adm/style/profilefields/url.html new file mode 100644 index 0000000000..8dd3a90de1 --- /dev/null +++ b/phpBB/adm/style/profilefields/url.html @@ -0,0 +1,3 @@ + + + diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml index 5a861a4b56..d12a1f8a37 100644 --- a/phpBB/config/profilefields.yml +++ b/phpBB/config/profilefields.yml @@ -80,3 +80,12 @@ services: - @user tags: - { name: profilefield.type } + + profilefields.type.url: + class: phpbb\profilefields\type\type_url + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 0ea95c35ba..93162daa45 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -100,6 +100,7 @@ $lang = array_merge($lang, array( 'FIELD_TEXT' => 'Textarea', 'FIELD_TYPE' => 'Field type', 'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.', + 'FIELD_URL' => 'URL (Link)', 'FIELD_VALIDATION' => 'Field validation', 'FIRST_OPTION' => 'First option', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 1520af9ef8..6970319397 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -209,6 +209,7 @@ $lang = array_merge($lang, array( 'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.', 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.', 'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.', + 'FIELD_INVALID_URL' => 'The field “%s” has an invalid url.', 'FIELD_INVALID_VALUE' => 'The field “%s” has an invalid value.', 'FOE_MESSAGE' => 'Message from foe', diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php index 267f522d5d..c98c863e13 100644 --- a/phpBB/phpbb/profilefields/type/type_int.php +++ b/phpBB/phpbb/profilefields/type/type_int.php @@ -61,7 +61,7 @@ class type_int extends type_base 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => ''), 1 => array('TITLE' => $this->user->lang['MIN_FIELD_NUMBER'], 'FIELD' => ''), 2 => array('TITLE' => $this->user->lang['MAX_FIELD_NUMBER'], 'FIELD' => ''), - 3 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => ''), + 3 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => ''), ); return $options; diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php index 9d241c49ef..9dada592eb 100644 --- a/phpBB/phpbb/profilefields/type/type_string.php +++ b/phpBB/phpbb/profilefields/type/type_string.php @@ -109,7 +109,7 @@ class type_string extends type_string_common $default_value = $profile_row['lang_default_value']; $profile_row['field_value'] = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value, true) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]); - $this->template->assign_block_vars('string', array_change_key_case($profile_row, CASE_UPPER)); + $this->template->assign_block_vars($this->get_name_short(), array_change_key_case($profile_row, CASE_UPPER)); } /** diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php new file mode 100644 index 0000000000..08f976cf4b --- /dev/null +++ b/phpBB/phpbb/profilefields/type/type_url.php @@ -0,0 +1,83 @@ + array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => ''), + 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => ''), + 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => ''), + ); + + return $options; + } + + /** + * {@inheritDoc} + */ + public function get_default_option_values() + { + return array( + 'field_length' => 40, + 'field_minlen' => 0, + 'field_maxlen' => 200, + 'field_validation' => '', + 'field_novalue' => '', + 'field_default_value' => '', + ); + } + + /** + * {@inheritDoc} + */ + public function get_profile_value($field_value, $field_data) + { + if (!$field_value && !$field_data['field_show_novalue']) + { + return null; + } + + return $field_value; + } + + /** + * {@inheritDoc} + */ + public function validate_profile_field(&$field_value, $field_data) + { + $field_value = trim($field_value); + + if ($field_value === '' && !$field_data['field_required']) + { + return false; + } + + if (!preg_match('#^' . get_preg_expression('url') . '$#i', $field_value)) + { + return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name'])); + } + + return false; + } +} diff --git a/phpBB/styles/prosilver/template/profilefields/url.html b/phpBB/styles/prosilver/template/profilefields/url.html new file mode 100644 index 0000000000..8dd3a90de1 --- /dev/null +++ b/phpBB/styles/prosilver/template/profilefields/url.html @@ -0,0 +1,3 @@ + + + diff --git a/phpBB/styles/subsilver2/template/profilefields/url.html b/phpBB/styles/subsilver2/template/profilefields/url.html new file mode 100644 index 0000000000..42805aa98d --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/url.html @@ -0,0 +1,3 @@ + + + From e750d71f840e0c2e8fe802c5cc593c0630746291 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 3 Mar 2014 12:38:55 +0100 Subject: [PATCH 06/11] [ticket/12187] Convert website field data to custom profile field PHPBB3-12187 --- phpBB/includes/db/schema_data.php | 1 + phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/firebird_schema.sql | 3 +- phpBB/install/schemas/mssql_schema.sql | 5 +- phpBB/install/schemas/mysql_40_schema.sql | 1 + phpBB/install/schemas/mysql_41_schema.sql | 1 + phpBB/install/schemas/oracle_schema.sql | 1 + phpBB/install/schemas/postgres_schema.sql | 1 + phpBB/install/schemas/sqlite_schema.sql | 1 + .../data/v310/profilefield_website.php | 52 +++++++++++++++++++ 10 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_website.php diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index c8e405cd0f..e330f76742 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -795,6 +795,7 @@ $schema_data['phpbb_profile_fields_data'] = array( 'pf_phpbb_interests' => array('TEXT_UNI', ''), 'pf_phpbb_occupation' => array('TEXT_UNI', ''), 'pf_phpbb_icq' => array('VCHAR', ''), + 'pf_phpbb_website' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'user_id', ); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 207ea2aa59..d5f7b266d4 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -906,7 +906,6 @@ if (!$get_info) array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), - array('user_website', 'users.user_website', 'validate_website'), array('user_jabber', '', ''), array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), @@ -963,6 +962,7 @@ if (!$get_info) array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_website', 'users.user_website', 'validate_website'), 'where' => 'users.user_id <> -1', ), diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index d0cab35dc8..62ba2fa6e6 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -954,7 +954,8 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - pf_phpbb_icq VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL + pf_phpbb_icq VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_website VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index b017362315..7eb5a549de 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1135,7 +1135,7 @@ CREATE TABLE [phpbb_profile_fields] ( [field_order] [int] DEFAULT (0) NOT NULL , [field_is_contact] [int] DEFAULT (0) NOT NULL , [field_contact_desc] [varchar] (255) DEFAULT ('') NOT NULL , - [field_contact_url] [varchar] (255) DEFAULT ('') NOT NULL + [field_contact_url] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1161,7 +1161,8 @@ CREATE TABLE [phpbb_profile_fields_data] ( [pf_phpbb_location] [varchar] (255) DEFAULT ('') NOT NULL , [pf_phpbb_interests] [varchar] (4000) DEFAULT ('') NOT NULL , [pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL , - [pf_phpbb_icq] [varchar] (255) DEFAULT ('') NOT NULL + [pf_phpbb_icq] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_website] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 9d0ee88b1a..31b8184f75 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -680,6 +680,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_interests blob NOT NULL, pf_phpbb_occupation blob NOT NULL, pf_phpbb_icq varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_website varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index ad7609d651..ba9293ae4a 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -680,6 +680,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_interests text NOT NULL, pf_phpbb_occupation text NOT NULL, pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 9797c6d784..e023f2c735 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1273,6 +1273,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_interests clob DEFAULT '' , pf_phpbb_occupation clob DEFAULT '' , pf_phpbb_icq varchar2(255) DEFAULT '' , + pf_phpbb_website varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) ) / diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 88323a5695..814403ed3e 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -890,6 +890,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL, pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL, pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index c0241be6cf..d6d2c5c348 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -660,6 +660,7 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_interests text(65535) NOT NULL DEFAULT '', pf_phpbb_occupation text(65535) NOT NULL DEFAULT '', pf_phpbb_icq varchar(255) NOT NULL DEFAULT '', + pf_phpbb_website varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (user_id) ); diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php new file mode 100644 index 0000000000..818b66d2e4 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php @@ -0,0 +1,52 @@ + 'phpbb_website', + 'field_type' => 'profilefields.type.url', + 'field_ident' => 'phpbb_website', + 'field_length' => '40', + 'field_minlen' => '12', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 1, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'VISIT_WEBSITE', + 'field_contact_url' => '%s', + ); + + protected $user_column_name = 'user_website'; +} From 5b1fbfb2f2c901b89bb1163503b0468e11bbc307 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 3 Mar 2014 20:01:19 +0100 Subject: [PATCH 07/11] [ticket/12187] Remove user_website functionality PHPBB3-12187 --- phpBB/adm/style/acp_prune_users.html | 4 ---- phpBB/adm/style/acp_users_profile.html | 4 ---- phpBB/develop/benchmark.php | 5 ++--- phpBB/includes/acp/acp_prune.php | 2 -- phpBB/includes/acp/acp_users.php | 6 ------ phpBB/includes/ucp/ucp_pm_viewmessage.php | 1 - phpBB/includes/ucp/ucp_profile.php | 6 ------ phpBB/install/schemas/schema_data.sql | 5 +++-- phpBB/language/en/acp/styles.php | 1 - phpBB/language/en/common.php | 3 --- phpBB/language/en/memberlist.php | 2 -- phpBB/language/en/viewtopic.php | 1 - phpBB/memberlist.php | 9 ++------- .../prosilver/template/memberlist_body.html | 19 +++---------------- .../prosilver/template/memberlist_view.html | 1 - .../template/ucp_pm_viewmessage.html | 3 +-- .../template/ucp_profile_profile_info.html | 4 ---- .../prosilver/template/viewtopic_body.html | 3 +-- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/buttons.css | 2 ++ phpBB/styles/prosilver/theme/colours.css | 1 + phpBB/styles/prosilver/theme/imageset.css | 2 +- .../subsilver2/template/memberlist_body.html | 2 -- .../subsilver2/template/memberlist_view.html | 4 ---- .../template/ucp_profile_profile_info.html | 4 ---- .../styles/subsilver2/theme/en/stylesheet.css | 2 +- phpBB/styles/subsilver2/theme/stylesheet.css | 2 +- phpBB/viewtopic.php | 4 ---- tests/auth/provider_apache_test.php | 1 - 29 files changed, 19 insertions(+), 86 deletions(-) diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 2bbb03a834..30ddd1c29e 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -18,10 +18,6 @@
      -
      -
      -
      -

      {L_JOINED_EXPLAIN}
      diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index 39cc5da24d..18af7c8d7f 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -18,10 +18,6 @@
      -
      -
      -
      -

      {L_BIRTHDAY_EXPLAIN}
      {L_DAY}{L_COLON} {L_MONTH}{L_COLON} {L_YEAR}{L_COLON}
      diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index 0be483e234..d985b073f9 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -366,7 +366,6 @@ function make_user($username) $password = md5("benchpass"); $email = "nobody@localhost"; - $website = "http://www.phpbb.com"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; $avatar_filename = ""; @@ -418,8 +417,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_website, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) - VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$website', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) + VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index 5d9080b55b..0f9ca9bab3 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -388,7 +388,6 @@ class acp_prune { $username = request_var('username', '', true); $email = request_var('email', ''); - $website = request_var('website', ''); $active_select = request_var('active_select', 'lt'); $count_select = request_var('count_select', 'eq'); @@ -438,7 +437,6 @@ class acp_prune $where_sql = ''; $where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : ''; $where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : ''; - $where_sql .= ($website) ? ' AND user_website ' . $db->sql_like_expression(str_replace('*', $db->any_char, $website)) . ' ' : ''; $where_sql .= $joined_sql; $where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : ''; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 634cd093f1..67f3267240 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1364,7 +1364,6 @@ class acp_users 'msn' => request_var('msn', $user_row['user_msnm']), 'yim' => request_var('yim', $user_row['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)), - 'website' => request_var('website', $user_row['user_website']), 'bday_day' => 0, 'bday_month' => 0, 'bday_year' => 0, @@ -1390,9 +1389,6 @@ class acp_users array('string', true, 5, 255), array('jabber')), 'yim' => array('string', true, 5, 255), - 'website' => array( - array('string', true, 12, 255), - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), 'bday_day' => array('num', true, 1, 31), 'bday_month' => array('num', true, 1, 12), 'bday_year' => array('num', true, 1901, gmdate('Y', time())), @@ -1418,7 +1414,6 @@ class acp_users 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], - 'user_website' => $data['website'], 'user_birthday' => $data['user_birthday'], ); @@ -1466,7 +1461,6 @@ class acp_users 'AIM' => $data['aim'], 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], - 'WEBSITE' => $data['website'], 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options, 'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options, diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b25ae32ad9..e4bc4629ac 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -209,7 +209,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'MESSAGE_ID' => $message_row['msg_id'], 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '', - 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '', 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '', 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '', diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8e87c537cc..dc75dbb241 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -268,7 +268,6 @@ class ucp_profile 'msn' => request_var('msn', $user->data['user_msnm']), 'yim' => request_var('yim', $user->data['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)), - 'website' => request_var('website', $user->data['user_website']), ); if ($config['allow_birthdays']) @@ -297,9 +296,6 @@ class ucp_profile array('string', true, 5, 255), array('jabber')), 'yim' => array('string', true, 5, 255), - 'website' => array( - array('string', true, 12, 255), - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), ); if ($config['allow_birthdays']) @@ -343,7 +339,6 @@ class ucp_profile 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], - 'user_website' => $data['website'], 'user_notify_type' => $data['notify'], ); @@ -410,7 +405,6 @@ class ucp_profile 'AIM' => $data['aim'], 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], - 'WEBSITE' => $data['website'], )); // Get additional profile fields and assign them to the template block var 'profile_fields' diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 49c61b8c2f..b0959d12e7 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', 0); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', 0); # -- username: Admin password: admin (change this or remove it once everything is working!) -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', ''); # -- Groups INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); @@ -792,6 +792,7 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3, 0, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 4, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 5, 1, 'VISIT_WEBSITE', '%s'); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 0fac0a020b..093abbd3fa 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -188,7 +188,6 @@ $lang = array_merge($lang, array( 'IMG_ICON_CONTACT_MSNM' => 'WLM', 'IMG_ICON_CONTACT_PM' => 'Send message', 'IMG_ICON_CONTACT_YAHOO' => 'YIM', - 'IMG_ICON_CONTACT_WWW' => 'Website', 'IMG_ICON_POST_DELETE' => 'Delete post', 'IMG_ICON_POST_EDIT' => 'Edit post', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 9586d25ed3..529d556dbe 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -689,7 +689,6 @@ $lang = array_merge($lang, array( 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.', 'TOO_LONG_EMAIL' => 'The email address you entered is too long.', - 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.', 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.', 'TOO_MANY_VOTE_OPTIONS' => 'You have tried to vote for too many options.', @@ -706,7 +705,6 @@ $lang = array_merge($lang, array( 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.', 'TOO_SHORT_EMAIL' => 'The email address you entered is too short.', - 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.', 'TOO_SMALL' => 'The value you entered is too small.', @@ -825,7 +823,6 @@ $lang = array_merge($lang, array( 'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.', 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.', 'WRONG_DATA_LANG' => 'The language you specified is not valid.', - 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.', 'WROTE' => 'wrote', 'YEAR' => 'Year', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index cfd1dacc45..a7ded62648 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -143,6 +143,4 @@ $lang = array_merge($lang, array( 'VIEWING_PROFILE' => 'Viewing profile - %s', 'VISITED' => 'Last visited', - - 'WWW' => 'Website', )); diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 424cb9da3e..b566f4b5c0 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -118,7 +118,6 @@ $lang = array_merge($lang, array( 2 => '%d posts', ), 'VIEW_UNREAD_POST' => 'First unread post', - 'VISIT_WEBSITE' => 'WWW', 'VOTE_SUBMITTED' => 'Your vote has been cast.', 'VOTE_CONVERTED' => 'Changing votes is not supported for converted polls.', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index bdd5bc2c23..f1ee622445 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -650,7 +650,6 @@ switch ($mode) 'AVATAR_IMG' => $poster_avatar, 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), - 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), @@ -997,8 +996,8 @@ switch ($mode) $pagination = $phpbb_container->get('pagination'); // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); if ($auth->acl_get('a_user')) { @@ -1633,7 +1632,6 @@ switch ($mode) 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']), 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), - 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), @@ -1646,7 +1644,6 @@ switch ($mode) 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_WEBSITE' => $sort_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), @@ -1769,8 +1766,6 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', 'U_EMAIL' => $email, - 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', - 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '', 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index c155d431fa..511c7b22c0 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -60,10 +60,7 @@ {L_RANK}{L_GROUP_LEADER}{L_USERNAME} {L_POSTS} - - {L_WEBSITE} - {L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME} - + {L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME} {L_JOINED} {L_LAST_ACTIVE} @@ -94,10 +91,7 @@ {L_RANK}{L_GROUP_MEMBERS}{L_USERNAME} {L_POSTS} - - {L_WEBSITE} - {L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME} - + {L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME} {L_JOINED} {L_LAST_ACTIVE} @@ -117,14 +111,7 @@ {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
      {L_SELECT} ] {memberrow.POSTS}{memberrow.POSTS} - - - -
      {memberrow.custom_fields.PROFILE_FIELD_VALUE}
      - -   - - +
      {memberrow.custom_fields.PROFILE_FIELD_VALUE}
        {memberrow.JOINED} {memberrow.VISITED}  diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index d5b7c67a85..e552ee0792 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -61,7 +61,6 @@
      {L_EMAIL_ADDRESS}{L_COLON}
      {L_SEND_EMAIL_USER} {USERNAME}
      -
      {L_WEBSITE}{L_COLON}
      {U_WWW}
      {L_PM}{L_COLON}
      {L_SEND_PRIVATE_MESSAGE}
      {L_MSNM}{L_COLON}
      {L_SEND_MSNM_MESSAGE}{USER_MSN}
      {L_YIM}{L_COLON}
      {L_SEND_YIM_MESSAGE}{USER_YIM}
      diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index a5e3b307fc..9bace77436 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -34,13 +34,12 @@ - +
      • {L_PRIVATE_MESSAGE}
      • -
      • {L_WEBSITE}
      • {L_MSNM}
      • {L_YIM}
      • {L_AIM}
      • diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index ca568894fb..7957038597 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -26,10 +26,6 @@
      -
      -
      -
      -

      {L_BIRTHDAY_EXPLAIN}
      diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index d877583313..b495551683 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -144,12 +144,11 @@ - +
      • {L_PRIVATE_MESSAGE}
      • -
      • {L_WEBSITE}
      • {L_MSNM}
      • {L_YIM}
      • {L_AIM}
      • diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 486ac74896..18c1ebec25 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -849,7 +849,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { padding-right: 11px; padding-left: 0; } -.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { +.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.phpbb_website-icon, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { padding-right: 20px; padding-left: 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index ad24c1c72d..d55b8c205c 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -240,6 +240,7 @@ ul.profile-icons.responsive a.responsive-menu-link:before { .aim-icon, .aim-icon a { background: none top left no-repeat; } .yahoo-icon, .yahoo-icon a { background: none top left no-repeat; } .web-icon, .web-icon a { background: none top left no-repeat; } +.phpbb_website-icon, .phpbb_website-icon a { background: none top left no-repeat; } .msnm-icon, .msnm-icon a { background: none top left no-repeat; } .icq-icon, .icq-icon a { background: none top left no-repeat; } .phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; } @@ -259,6 +260,7 @@ ul.profile-icons li.email-icon { width: 20px; height: 20px; } ul.profile-icons li.aim-icon { width: 20px; height: 20px; } ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; } ul.profile-icons li.web-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_website-icon { width: 20px; height: 20px; } ul.profile-icons li.msnm-icon { width: 20px; height: 20px; } ul.profile-icons li.icq-icon { width: 20px; height: 20px; } ul.profile-icons li.phpbb_icq-icon { width: 20px; height: 20px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 3b7789c8da..260e85cc8e 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -742,6 +742,7 @@ a.sendemail { .aim-icon, .aim-icon a { background-image: url("./images/icon_contact_aim.gif"); } .yahoo-icon, .yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); } .web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); } +.phpbb_website-icon, .phpbb_website-icon a { background-image: url("./images/icon_contact_www.gif"); } .msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } .icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } .phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css index c604729cdf..7193c88fb6 100644 --- a/phpBB/styles/prosilver/theme/imageset.css +++ b/phpBB/styles/prosilver/theme/imageset.css @@ -285,7 +285,7 @@ span.imageset { padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.icon_contact_www, .imageset.phpbb_website-icon { background-image: url("./images/icon_contact_www.gif"); padding-left: 20px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index 7c4d301de7..ecfb4b69c5 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -45,7 +45,6 @@ {L_RANK} {L_SEND_MESSAGE} {L_EMAIL} - {L_WEBSITE} {L_MARK} @@ -72,7 +71,6 @@ {memberrow.RANK_IMG}{memberrow.RANK_TITLE}  {PM_IMG}   {EMAIL_IMG}  -  {WWW_IMG}   {memberrow.PROFILE_FIELD1_VALUE} diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 4a81482c18..064fdc5dec 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -156,10 +156,6 @@ {AGE} - - {L_WEBSITE}{L_COLON} - {U_WWW} - diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html index 6f91d8029b..e270542231 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -28,10 +28,6 @@ {L_UCP_JABBER}{L_COLON} - - {L_WEBSITE}{L_COLON} - - {L_BIRTHDAY}{L_COLON}
        {L_BIRTHDAY_EXPLAIN} diff --git a/phpBB/styles/subsilver2/theme/en/stylesheet.css b/phpBB/styles/subsilver2/theme/en/stylesheet.css index 06332f082a..e39a13ae18 100644 --- a/phpBB/styles/subsilver2/theme/en/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/en/stylesheet.css @@ -34,7 +34,7 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.phpbb_website-icon, .imageset.icon_contact_www { background-image: url("./icon_contact_www.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index 9deccd4420..94c6abeada 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -1048,7 +1048,7 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.phpbb_website-icon, .imageset.icon_contact_www { background-image: url("./en/icon_contact_www.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 061973c34b..422227f172 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -620,7 +620,6 @@ $template->assign_vars(array( 'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'), 'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'), 'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'), - 'WWW_IMG' => $user->img('icon_contact_www', 'VISIT_WEBSITE'), 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'), 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'), 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'), @@ -1116,7 +1115,6 @@ while ($row = $db->sql_fetchrow($result)) 'profile' => '', 'pm' => '', 'email' => '', - 'www' => '', 'aim' => '', 'msn' => '', 'yim' => '', @@ -1183,7 +1181,6 @@ while ($row = $db->sql_fetchrow($result)) 'online' => false, 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"), - 'www' => $row['user_website'], 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '', @@ -1630,7 +1627,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_SEARCH' => $user_cache[$poster_id]['search'], 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', 'U_EMAIL' => $user_cache[$poster_id]['email'], - 'U_WWW' => $user_cache[$poster_id]['www'], 'U_AIM' => $user_cache[$poster_id]['aim'], 'U_MSN' => $user_cache[$poster_id]['msn'], 'U_YIM' => $user_cache[$poster_id]['yim'], diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index bdf9259ddd..51b2ba5ec9 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -197,7 +197,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case 'user_yim' => '', 'user_msnm' => '', 'user_jabber' => '', - 'user_website' => '', 'user_actkey' => '', 'user_newpasswd' => '', 'user_form_salt' => '', From a3627a9ff767631121c70a00ca17d99a3533ad31 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 08:25:36 +0100 Subject: [PATCH 08/11] [ticket/12187] Remove user_website field PHPBB3-12187 --- phpBB/includes/db/schema_data.php | 1 - phpBB/install/schemas/firebird_schema.sql | 1 - phpBB/install/schemas/mssql_schema.sql | 1 - phpBB/install/schemas/mysql_40_schema.sql | 1 - phpBB/install/schemas/mysql_41_schema.sql | 1 - phpBB/install/schemas/oracle_schema.sql | 1 - phpBB/install/schemas/postgres_schema.sql | 1 - phpBB/install/schemas/sqlite_schema.sql | 1 - .../v310/profilefield_website_cleanup.php | 47 +++++++++++++++++++ 9 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index e330f76742..c054bd8117 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -1178,7 +1178,6 @@ $schema_data['phpbb_users'] = array( 'user_yim' => array('VCHAR_UNI', ''), 'user_msnm' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''), - 'user_website' => array('VCHAR_UNI:200', ''), 'user_form_salt' => array('VCHAR_UNI:32', ''), 'user_new' => array('BOOL', 1), 'user_reminded' => array('TINT:4', 0), diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 62ba2fa6e6..d74774fa09 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1431,7 +1431,6 @@ CREATE TABLE phpbb_users ( user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_new INTEGER DEFAULT 1 NOT NULL, user_reminded INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 7eb5a549de..1840bd6aef 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1747,7 +1747,6 @@ CREATE TABLE [phpbb_users] ( [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , - [user_website] [varchar] (200) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , [user_new] [int] DEFAULT (1) NOT NULL , [user_reminded] [int] DEFAULT (0) NOT NULL , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 31b8184f75..42c794fc16 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -1040,7 +1040,6 @@ CREATE TABLE phpbb_users ( user_yim blob NOT NULL, user_msnm blob NOT NULL, user_jabber blob NOT NULL, - user_website blob NOT NULL, user_form_salt varbinary(96) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index ba9293ae4a..3c160f830b 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -1040,7 +1040,6 @@ CREATE TABLE phpbb_users ( user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index e023f2c735..257c70a696 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1864,7 +1864,6 @@ CREATE TABLE phpbb_users ( user_yim varchar2(765) DEFAULT '' , user_msnm varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , - user_website varchar2(600) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' , user_new number(1) DEFAULT '1' NOT NULL, user_reminded number(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 814403ed3e..614968a953 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1312,7 +1312,6 @@ CREATE TABLE phpbb_users ( user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0), user_reminded INT2 DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index d6d2c5c348..cbcca318d3 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -1011,7 +1011,6 @@ CREATE TABLE phpbb_users ( user_yim varchar(255) NOT NULL DEFAULT '', user_msnm varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', - user_website varchar(200) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '', user_new INTEGER UNSIGNED NOT NULL DEFAULT '1', user_reminded tinyint(4) NOT NULL DEFAULT '0', diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php new file mode 100644 index 0000000000..9a4d724347 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php @@ -0,0 +1,47 @@ +db_tools->sql_column_exists($this->table_prefix . 'users', 'user_website'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_website', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_website', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_website' => array('VCHAR_UNI:200', ''), + ), + ), + ); + } +} From c650078904e41c9dd468b329131ace2fcbd8d1f9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 08:47:47 +0100 Subject: [PATCH 09/11] [ticket/12187] Split generate_profile_fields_template() into 2 methods Removing the mode switch that wraps the content of the method PHPBB3-12187 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 4 +- phpBB/memberlist.php | 8 +- phpBB/phpbb/profilefields/manager.php | 204 +++++++++++----------- phpBB/viewtopic.php | 4 +- 4 files changed, 110 insertions(+), 110 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index e4bc4629ac..feea01dbfa 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -63,7 +63,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { $cp = $phpbb_container->get('profilefields.manager'); - $profile_fields = $cp->generate_profile_fields_template('grab', $author_id); + $profile_fields = $cp->grab_profile_fields_data($author_id); } // Assign TO/BCC Addresses to template @@ -173,7 +173,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) if (isset($profile_fields[$author_id])) { - $cp_row = $cp->generate_profile_fields_template('show', false, $profile_fields[$author_id]); + $cp_row = $cp->generate_profile_fields_template_data($profile_fields[$author_id]); } } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index f1ee622445..a05a0999dc 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -618,8 +618,8 @@ switch ($mode) if ($config['load_cpf_viewprofile']) { $cp = $phpbb_container->get('profilefields.manager'); - $profile_fields = $cp->generate_profile_fields_template('grab', $user_id); - $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user_id]) : array(); + $profile_fields = $cp->grab_profile_fields_data($user_id); + $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array(); } // If the user has m_approve permission or a_user permission, then list then display unapproved posts @@ -1560,7 +1560,7 @@ switch ($mode) if ($config['load_cpf_memberlist']) { // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_list); + $profile_fields_cache = $cp->grab_profile_fields_data($user_list); // Filter the fields we don't want to show foreach ($profile_fields_cache as $user_id => $user_profile_fields) @@ -1592,7 +1592,7 @@ switch ($mode) $cp_row = array(); if ($config['load_cpf_memberlist']) { - $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array(); + $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id]) : array(); } $memberrow = array_merge(show_profile($row), array( diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 874d0a21e0..8b4a3917f2 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -278,125 +278,125 @@ class manager } /** - * Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled) - * This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template + * Grab the user specific profile fields data + * + * @param int|array $user_ids Single user id or an array of ids + * @return array Users profile fields data */ - public function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false) + public function grab_profile_fields_data($user_ids = 0) { - if ($mode == 'grab') + if (!is_array($user_ids)) { - if (!is_array($user_id)) + $user_ids = array($user_ids); + } + + if (!sizeof($this->profile_cache)) + { + $this->build_cache(); + } + + if (!sizeof($user_ids)) + { + return array(); + } + + $sql = 'SELECT * + FROM ' . $this->fields_data_table . ' + WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids)); + $result = $this->db->sql_query($sql); + + $field_data = array(); + while ($row = $this->db->sql_fetchrow($result)) + { + $field_data[$row['user_id']] = $row; + } + $this->db->sql_freeresult($result); + + $user_fields = array(); + + // Go through the fields in correct order + foreach (array_keys($this->profile_cache) as $used_ident) + { + foreach ($field_data as $user_id => $row) { - $user_id = array($user_id); + $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident]; + $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; } - if (!sizeof($this->profile_cache)) + foreach ($user_ids as $user_id) { - $this->build_cache(); - } - - if (!sizeof($user_id)) - { - return array(); - } - - $sql = 'SELECT * - FROM ' . $this->fields_data_table . ' - WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_id)); - $result = $this->db->sql_query($sql); - - $field_data = array(); - while ($row = $this->db->sql_fetchrow($result)) - { - $field_data[$row['user_id']] = $row; - } - $this->db->sql_freeresult($result); - - $user_fields = array(); - - $user_ids = $user_id; - - // Go through the fields in correct order - foreach (array_keys($this->profile_cache) as $used_ident) - { - foreach ($field_data as $user_id => $row) + if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue']) { - $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident]; + $user_fields[$user_id][$used_ident]['value'] = ''; $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; } - - foreach ($user_ids as $user_id) - { - if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue']) - { - $user_fields[$user_id][$used_ident]['value'] = ''; - $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; - } - } } - - return $user_fields; } - else if ($mode == 'show') - { - // $profile_row == $user_fields[$row['user_id']]; - $tpl_fields = array(); - $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); - foreach ($profile_row as $ident => $ident_ary) + return $user_fields; + } + + /** + * Assign the user's profile fields data to the template + * + * @param array $profile_row Array with users profile field data + * @return array + */ + public function generate_profile_fields_template_data($profile_row) + { + // $profile_row == $user_fields[$row['user_id']]; + $tpl_fields = array(); + $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); + + foreach ($profile_row as $ident => $ident_ary) + { + $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; + $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']); + + if ($value === null) { - $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; - $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']); - - if ($value === null) - { - continue; - } - - $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); - if (strpos($field_desc, '%s') !== false) - { - $field_desc = sprintf($field_desc, $value); - } - $contact_url = ''; - if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) - { - $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); - } - - $tpl_fields['row'] += array( - 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident, - 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, - 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url, - 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc, - 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], - 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']), - 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']), - - 'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'], - 'S_PROFILE_' . strtoupper($ident) => true, - ); - - $tpl_fields['blockrow'][] = array( - 'PROFILE_FIELD_IDENT' => $ident, - 'PROFILE_FIELD_VALUE' => $value, - 'PROFILE_FIELD_CONTACT' => $contact_url, - 'PROFILE_FIELD_DESC' => $field_desc, - 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'], - 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']), - 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']), - - 'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'], - 'S_PROFILE_' . strtoupper($ident) => true, - ); + continue; } - return $tpl_fields; - } - else - { - trigger_error('Wrong mode for custom profile', E_USER_ERROR); + $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); + if (strpos($field_desc, '%s') !== false) + { + $field_desc = sprintf($field_desc, $value); + } + $contact_url = ''; + if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) + { + $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); + } + + $tpl_fields['row'] += array( + 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident, + 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, + 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url, + 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc, + 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], + 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']), + 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']), + + 'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'], + 'S_PROFILE_' . strtoupper($ident) => true, + ); + + $tpl_fields['blockrow'][] = array( + 'PROFILE_FIELD_IDENT' => $ident, + 'PROFILE_FIELD_VALUE' => $value, + 'PROFILE_FIELD_CONTACT' => $contact_url, + 'PROFILE_FIELD_DESC' => $field_desc, + 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'], + 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']), + 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']), + + 'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'], + 'S_PROFILE_' . strtoupper($ident) => true, + ); } + + return $tpl_fields; } /** diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 422227f172..25f577937e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1248,7 +1248,7 @@ if ($config['load_cpf_viewtopic']) $cp = $phpbb_container->get('profilefields.manager'); // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache); + $profile_fields_tmp = $cp->grab_profile_fields_data($id_cache); // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs. $profile_fields_cache = array(); @@ -1558,7 +1558,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // if ($config['load_cpf_viewtopic']) { - $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$poster_id]) : array(); + $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$poster_id]) : array(); } $post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false; From 03ef39c1f18584b331b5ddbd59e94848b8d3cd17 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 09:10:57 +0100 Subject: [PATCH 10/11] [ticket/12187] Do not make clickable when using as contact field PHPBB3-12187 --- phpBB/memberlist.php | 2 +- phpBB/phpbb/profilefields/manager.php | 35 +++++++++++-------- phpBB/phpbb/profilefields/type/type_base.php | 8 +++++ .../profilefields/type/type_interface.php | 11 ++++++ .../profilefields/type/type_string_common.php | 13 +++++++ phpBB/phpbb/profilefields/type/type_url.php | 13 ------- 6 files changed, 54 insertions(+), 28 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index a05a0999dc..7d64ad8125 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1592,7 +1592,7 @@ switch ($mode) $cp_row = array(); if ($config['load_cpf_memberlist']) { - $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id]) : array(); + $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array(); } $memberrow = array_merge(show_profile($row), array( diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 8b4a3917f2..a4626bc5de 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -337,12 +337,14 @@ class manager } /** - * Assign the user's profile fields data to the template - * - * @param array $profile_row Array with users profile field data - * @return array - */ - public function generate_profile_fields_template_data($profile_row) + * Assign the user's profile fields data to the template + * + * @param array $profile_row Array with users profile field data + * @param bool $use_contact_fields Should we display contact fields as such? + * This requires special treatments (links should not be parsed in the values, and more) + * @return array + */ + public function generate_profile_fields_template_data($profile_row, $use_contact_fields = true) { // $profile_row == $user_fields[$row['user_id']]; $tpl_fields = array(); @@ -358,15 +360,20 @@ class manager continue; } - $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); - if (strpos($field_desc, '%s') !== false) + $field_desc = $contact_url = ''; + if ($use_contact_fields) { - $field_desc = sprintf($field_desc, $value); - } - $contact_url = ''; - if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) - { - $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); + $value = $profile_field->get_profile_contact_value($ident_ary['value'], $ident_ary['data']); + $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); + if (strpos($field_desc, '%s') !== false) + { + $field_desc = sprintf($field_desc, $value); + } + $contact_url = ''; + if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) + { + $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); + } } $tpl_fields['row'] += array( diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php index 9c363a7b4e..a96196674d 100644 --- a/phpBB/phpbb/profilefields/type/type_base.php +++ b/phpBB/phpbb/profilefields/type/type_base.php @@ -84,6 +84,14 @@ abstract class type_base implements type_interface return isset($this->user->lang[$field_name]) ? $this->user->lang[$field_name] : $field_name; } + /** + * {@inheritDoc} + */ + public function get_profile_contact_value($field_value, $field_data) + { + return $this->get_profile_value($field_value, $field_data); + } + /** * {@inheritDoc} */ diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php index 94f6882524..a1c3d879c8 100644 --- a/phpBB/phpbb/profilefields/type/type_interface.php +++ b/phpBB/phpbb/profilefields/type/type_interface.php @@ -89,6 +89,17 @@ interface type_interface */ public function get_profile_value($field_value, $field_data); + /** + * Get Profile Value for display + * + * When displaying a contact field, we don't want to have links already parsed and more + * + * @param mixed $field_value Field value as stored in the database + * @param array $field_data Array with requirements of the field + * @return mixed Field value to display + */ + public function get_profile_contact_value($field_value, $field_data); + /** * Generate the input field for display * diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index f00a7e6a08..d5fb8f4b97 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -102,6 +102,19 @@ abstract class type_string_common extends type_base return $field_value; } + /** + * {@inheritDoc} + */ + public function get_profile_contact_value($field_value, $field_data) + { + if (!$field_value && !$field_data['field_show_novalue']) + { + return null; + } + + return $field_value; + } + /** * {@inheritDoc} */ diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php index 08f976cf4b..b1523b9355 100644 --- a/phpBB/phpbb/profilefields/type/type_url.php +++ b/phpBB/phpbb/profilefields/type/type_url.php @@ -48,19 +48,6 @@ class type_url extends type_string ); } - /** - * {@inheritDoc} - */ - public function get_profile_value($field_value, $field_data) - { - if (!$field_value && !$field_data['field_show_novalue']) - { - return null; - } - - return $field_value; - } - /** * {@inheritDoc} */ From 83a7e632b9b21fed88a3dbea679580d0740664f7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2014 10:19:08 +0100 Subject: [PATCH 11/11] [ticket/12235] Convert WLM to custom profile field PHPBB3-12235 --- phpBB/adm/style/acp_users_profile.html | 4 - phpBB/develop/benchmark.php | 5 +- phpBB/includes/acp/acp_users.php | 4 - phpBB/includes/db/schema_data.php | 2 +- phpBB/includes/ucp/ucp_pm_viewmessage.php | 1 - phpBB/includes/ucp/ucp_profile.php | 4 - phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/schema_data.sql | 5 +- phpBB/language/en/acp/styles.php | 1 - phpBB/language/en/common.php | 4 +- phpBB/language/en/memberlist.php | 4 - phpBB/language/en/ucp.php | 1 - phpBB/memberlist.php | 22 +---- .../migration/data/v310/profilefield_wlm.php | 51 ++++++++++++ .../data/v310/profilefield_wlm_cleanup.php | 47 +++++++++++ phpBB/styles/prosilver/template/forum_fn.js | 58 ------------- .../prosilver/template/memberlist_im.html | 14 +--- .../prosilver/template/memberlist_search.html | 4 - .../prosilver/template/memberlist_view.html | 8 +- .../template/ucp_pm_viewmessage.html | 9 +- .../template/ucp_profile_profile_info.html | 4 - .../prosilver/template/viewtopic_body.html | 9 +- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/buttons.css | 2 + phpBB/styles/prosilver/theme/colours.css | 1 + phpBB/styles/prosilver/theme/imageset.css | 2 +- .../subsilver2/template/memberlist_im.html | 83 +------------------ .../template/memberlist_search.html | 7 +- .../subsilver2/template/memberlist_view.html | 10 +-- .../template/ucp_profile_profile_info.html | 4 - .../styles/subsilver2/theme/en/stylesheet.css | 2 +- phpBB/styles/subsilver2/theme/stylesheet.css | 2 +- phpBB/viewtopic.php | 4 - tests/auth/provider_apache_test.php | 1 - 34 files changed, 144 insertions(+), 239 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php create mode 100644 phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index 18af7c8d7f..84d5df8c14 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -6,10 +6,6 @@
      -
      -
      -
      -
      diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d985b073f9..db3b8bc508 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -372,7 +372,6 @@ function make_user($username) $viewemail = 0; $aim = 0; $yim = 0; - $msn = 0; $attachsig = 1; $allowsmilies = 1; $allowhtml = 1; @@ -417,8 +416,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) - VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) + VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 67f3267240..e5c82d0ca2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1361,7 +1361,6 @@ class acp_users $data = array( 'aim' => request_var('aim', $user_row['user_aim']), - 'msn' => request_var('msn', $user_row['user_msnm']), 'yim' => request_var('yim', $user_row['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)), 'bday_day' => 0, @@ -1384,7 +1383,6 @@ class acp_users { $error = validate_data($data, array( 'aim' => array('string', true, 3, 255), - 'msn' => array('string', true, 5, 255), 'jabber' => array( array('string', true, 5, 255), array('jabber')), @@ -1411,7 +1409,6 @@ class acp_users { $sql_ary = array( 'user_aim' => $data['aim'], - 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], 'user_birthday' => $data['user_birthday'], @@ -1459,7 +1456,6 @@ class acp_users $template->assign_vars(array( 'YIM' => $data['yim'], 'AIM' => $data['aim'], - 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options, diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index c054bd8117..04a4ce0d9c 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -795,6 +795,7 @@ $schema_data['phpbb_profile_fields_data'] = array( 'pf_phpbb_interests' => array('TEXT_UNI', ''), 'pf_phpbb_occupation' => array('TEXT_UNI', ''), 'pf_phpbb_icq' => array('VCHAR', ''), + 'pf_phpbb_wlm' => array('VCHAR', ''), 'pf_phpbb_website' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'user_id', @@ -1176,7 +1177,6 @@ $schema_data['phpbb_users'] = array( 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''), 'user_aim' => array('VCHAR_UNI', ''), 'user_yim' => array('VCHAR_UNI', ''), - 'user_msnm' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''), 'user_form_salt' => array('VCHAR_UNI:32', ''), 'user_new' => array('BOOL', 1), diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index feea01dbfa..594415ffc0 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -211,7 +211,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '', 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '', 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '', - 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '', 'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '', 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index dc75dbb241..9821ad8485 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -265,7 +265,6 @@ class ucp_profile $data = array( 'aim' => request_var('aim', $user->data['user_aim']), - 'msn' => request_var('msn', $user->data['user_msnm']), 'yim' => request_var('yim', $user->data['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)), ); @@ -291,7 +290,6 @@ class ucp_profile { $validate_array = array( 'aim' => array('string', true, 3, 255), - 'msn' => array('string', true, 5, 255), 'jabber' => array( array('string', true, 5, 255), array('jabber')), @@ -336,7 +334,6 @@ class ucp_profile $sql_ary = array( 'user_aim' => $data['aim'], - 'user_msnm' => $data['msn'], 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], 'user_notify_type' => $data['notify'], @@ -403,7 +400,6 @@ class ucp_profile 'YIM' => $data['yim'], 'AIM' => $data['aim'], - 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], )); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index d5f7b266d4..f3d1e969f1 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -907,7 +907,6 @@ if (!$get_info) array('user_inactive_time', '', 'phpbb_inactive_time'), array('user_jabber', '', ''), - array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), array('user_rank', 'users.user_rank', 'intval'), @@ -962,6 +961,7 @@ if (!$get_info) array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_wlm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_website', 'users.user_website', 'validate_website'), 'where' => 'users.user_id <> -1', diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index b0959d12e7..9e9f185f57 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', 0); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', 0); # -- username: Admin password: admin (change this or remove it once everything is working!) -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', ''); # -- Groups INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); @@ -793,6 +793,7 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3, 0, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 4, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/'); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 5, 1, 'VISIT_WEBSITE', '%s'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_wlm', 'profilefields.type.string', 'phpbb_wlm', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 6, 1, '', ''); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 093abbd3fa..eef669220a 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -185,7 +185,6 @@ $lang = array_merge($lang, array( 'IMG_ICON_CONTACT_AIM' => 'AIM', 'IMG_ICON_CONTACT_EMAIL' => 'Send email', 'IMG_ICON_CONTACT_JABBER' => 'Jabber', - 'IMG_ICON_CONTACT_MSNM' => 'WLM', 'IMG_ICON_CONTACT_PM' => 'Send message', 'IMG_ICON_CONTACT_YAHOO' => 'YIM', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 529d556dbe..23a274bf01 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -400,7 +400,6 @@ $lang = array_merge($lang, array( 'MODERATORS' => 'Moderators', 'MONTH' => 'Month', 'MOVE' => 'Move', - 'MSNM' => 'WLM', 'NA' => 'N/A', 'NEWEST_USER' => 'Our newest member %s', @@ -683,7 +682,6 @@ $lang = array_merge($lang, array( 'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.', 'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.', 'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.', - 'TOO_LONG_MSN' => 'The WLM name you entered is too long.', 'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.', 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', @@ -699,7 +697,6 @@ $lang = array_merge($lang, array( 'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.', 'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.', 'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.', - 'TOO_SHORT_MSN' => 'The WLM name you entered is too short.', 'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.', 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', @@ -818,6 +815,7 @@ $lang = array_merge($lang, array( 'WEBSITE' => 'Website', 'WHOIS' => 'Whois', 'WHO_IS_ONLINE' => 'Who is online', + 'WLM' => 'WLM', 'WRONG_PASSWORD' => 'You entered an incorrect password.', 'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index a7ded62648..e641236420 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -77,9 +77,6 @@ $lang = array_merge($lang, array( 'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.', 'IM_MESSAGE' => 'Your message', - 'IM_MSNM' => 'Please note that you need Windows Live Messenger installed to use this.', - 'IM_MSNM_BROWSER' => 'Your browser does not support this.', - 'IM_MSNM_CONNECT' => 'WLM is not connected.\nYou have to connect to WLM to continue.', 'IM_NAME' => 'Your Name', 'IM_NO_DATA' => 'There is no suitable contact information for this user.', 'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.', @@ -122,7 +119,6 @@ $lang = array_merge($lang, array( 'SEND_IM' => 'Instant messaging', 'SEND_JABBER_MESSAGE' => 'Send Jabber message', 'SEND_MESSAGE' => 'Message', - 'SEND_MSNM_MESSAGE' => 'Send WLM message', 'SEND_YIM_MESSAGE' => 'Send YIM message', 'SORT_EMAIL' => 'Email', 'SORT_LAST_ACTIVE' => 'Last active', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 6970319397..3797162375 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -503,7 +503,6 @@ $lang = array_merge($lang, array( 'UCP_MAIN_FRONT' => 'Front page', 'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions', - 'UCP_MSNM' => 'Windows Live Messenger', 'UCP_NO_ATTACHMENTS' => 'You have posted no files.', 'UCP_NOTIFICATION_LIST' => 'Manage notifications', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 7d64ad8125..37d53087d5 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -312,13 +312,6 @@ switch ($mode) $s_action = ''; break; - case 'msnm': - $lang = 'MSNM'; - $sql_field = 'user_msnm'; - $s_select = 'S_SEND_MSNM'; - $s_action = ''; - break; - case 'jabber': $lang = 'JABBER'; $sql_field = 'user_jabber'; @@ -651,7 +644,6 @@ switch ($mode) 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), - 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), @@ -996,8 +988,8 @@ switch ($mode) $pagination = $phpbb_container->get('pagination'); // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'h' => $user->lang['AIM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'h' => 'u.user_aim', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); if ($auth->acl_get('a_user')) { @@ -1040,7 +1032,7 @@ switch ($mode) $select_single = request_var('select_single', false); // Search URL parameters, if any of these are in the URL we do a search - $search_params = array('username', 'email', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); + $search_params = array('username', 'email', 'aim', 'yahoo', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); // We validate form and field here, only id/class allowed $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; @@ -1051,7 +1043,6 @@ switch ($mode) $email = strtolower(request_var('email', '')); $aim = request_var('aim', ''); $yahoo = request_var('yahoo', ''); - $msn = request_var('msn', ''); $jabber = request_var('jabber', ''); $search_group_id = request_var('search_group_id', 0); @@ -1094,7 +1085,6 @@ switch ($mode) $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : ''; $sql_where .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : ''; $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : ''; - $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : ''; $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : ''; @@ -1325,7 +1315,6 @@ switch ($mode) 'email' => array('email', ''), 'aim' => array('aim', ''), 'yahoo' => array('yahoo', ''), - 'msn' => array('msn', ''), 'jabber' => array('jabber', ''), 'search_group_id' => array('search_group_id', 0), 'joined_select' => array('joined_select', 'lt'), @@ -1456,7 +1445,6 @@ switch ($mode) 'EMAIL' => $email, 'AIM' => $aim, 'YAHOO' => $yahoo, - 'MSNM' => $msn, 'JABBER' => $jabber, 'JOINED' => implode('-', $joined), 'ACTIVE' => implode('-', $active), @@ -1633,7 +1621,6 @@ switch ($mode) 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), - 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), @@ -1645,7 +1632,6 @@ switch ($mode) 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '', 'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), @@ -1768,12 +1754,10 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'U_EMAIL' => $email, 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', - 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', 'USER_AIM' => $data['user_aim'], 'USER_YIM' => $data['user_yim'], - 'USER_MSN' => $data['user_msnm'], 'USER_JABBER' => $data['user_jabber'], 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '', diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php new file mode 100644 index 0000000000..8a42f1fea1 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php @@ -0,0 +1,51 @@ + 'phpbb_wlm', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_wlm', + 'field_length' => '40', + 'field_minlen' => '5', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '.*', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 0, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => '', + 'field_contact_url' => '', + ); + + protected $user_column_name = 'user_msnm'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php new file mode 100644 index 0000000000..ac03287121 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php @@ -0,0 +1,47 @@ +db_tools->sql_column_exists($this->table_prefix . 'users', 'user_msnm'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_wlm', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_msnm', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_msnm' => array('VCHAR_UNI', ''), + ), + ), + ); + } +} diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 495df2871d..408c9b9b8c 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -305,64 +305,6 @@ function apply_onkeypress_event() { jQuery(document).ready(apply_onkeypress_event); -/** -* Run MSN action -*/ -function msn_action(action, address) -{ - // Does the browser support the MSNM object? - var app = document.getElementById('objMessengerApp'); - - if (!app || !app.MyStatus) { - var lang = $('form[data-lang-im-msnm-browser]'); - if (lang.length) { - alert(lang.attr('data-lang-im-msnm-browser')); - } - return false; - } - - // Is MSNM connected? - if (app.MyStatus == 1) { - var lang = $('form[data-lang-im-msnm-connect]'); - if (lang.length) { - alert(lang.attr('data-lang-im-msnm-connect')); - } - return false; - } - - // Do stuff - try { - switch (action) { - case 'add': - app.AddContact(0, address); - break; - - case 'im': - app.InstantMessage(address); - break; - } - } - catch (e) { - return; - } -} - -/** -* Add to your contact list -*/ -function add_contact(address) -{ - msn_action('add', address); -} - -/** -* Write IM to contact -*/ -function im_contact(address) -{ - msn_action('im', address); -} - /** * Functions for user search popup */ diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 0764c7ec01..9c63a6c35c 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -1,9 +1,8 @@ -

      {L_SEND_IM}

      -
      +
      @@ -13,7 +12,7 @@
      -
      {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
      +
      {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
      @@ -25,15 +24,6 @@
      - -
      -
       
      -
      -
      {L_IM_ADD_CONTACT}
      -
      {L_IM_SEND_MESSAGE}
      -
      - -
      diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 7452d14de1..b07eab04c1 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -25,10 +25,6 @@
      -
      -
      -
      -
      diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index e552ee0792..3b9eea347d 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -62,13 +62,17 @@
      {L_EMAIL_ADDRESS}{L_COLON}
      {L_SEND_EMAIL_USER} {USERNAME}
      {L_PM}{L_COLON}
      {L_SEND_PRIVATE_MESSAGE}
      -
      {L_MSNM}{L_COLON}
      {L_SEND_MSNM_MESSAGE}{USER_MSN}
      {L_YIM}{L_COLON}
      {L_SEND_YIM_MESSAGE}{USER_YIM}
      {L_AIM}{L_COLON}
      {L_SEND_AIM_MESSAGE}{USER_AIM}
      {L_JABBER}{L_COLON}
      {L_SEND_JABBER_MESSAGE}
      {L_JABBER}{L_COLON}
      {USER_JABBER}
      -
      {custom_fields.PROFILE_FIELD_NAME}{L_COLON}
      {custom_fields.PROFILE_FIELD_DESC}
      +
      {custom_fields.PROFILE_FIELD_NAME}{L_COLON}
      + +
      {custom_fields.PROFILE_FIELD_DESC}
      + +
      {custom_fields.PROFILE_FIELD_VALUE}
      + diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 9bace77436..f895af90bd 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -34,19 +34,22 @@ - +
      -
      -
      -
      -
      diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index b495551683..a09d044bc1 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -144,18 +144,21 @@ - +
      diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 18c1ebec25..0b8030b6b3 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -849,7 +849,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { padding-right: 11px; padding-left: 0; } -.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.phpbb_website-icon, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { +.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.phpbb_wlm-icon, .rtl .imageset.icon_contact_www, .rtl .imageset.phpbb_website-icon, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { padding-right: 20px; padding-left: 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index d55b8c205c..66355503a7 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -242,6 +242,7 @@ ul.profile-icons.responsive a.responsive-menu-link:before { .web-icon, .web-icon a { background: none top left no-repeat; } .phpbb_website-icon, .phpbb_website-icon a { background: none top left no-repeat; } .msnm-icon, .msnm-icon a { background: none top left no-repeat; } +.phpbb_wlm-icon, .phpbb_wlm-icon a { background: none top left no-repeat; } .icq-icon, .icq-icon a { background: none top left no-repeat; } .phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; } .jabber-icon, .jabber-icon a { background: none top left no-repeat; } @@ -262,6 +263,7 @@ ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; } ul.profile-icons li.web-icon { width: 20px; height: 20px; } ul.profile-icons li.phpbb_website-icon { width: 20px; height: 20px; } ul.profile-icons li.msnm-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_wlm-icon { width: 20px; height: 20px; } ul.profile-icons li.icq-icon { width: 20px; height: 20px; } ul.profile-icons li.phpbb_icq-icon { width: 20px; height: 20px; } ul.profile-icons li.jabber-icon { width: 20px; height: 20px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 260e85cc8e..adaf507bd5 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -744,6 +744,7 @@ a.sendemail { .web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); } .phpbb_website-icon, .phpbb_website-icon a { background-image: url("./images/icon_contact_www.gif"); } .msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } +.phpbb_wlm-icon, .phpbb_wlm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } .icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } .phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } .jabber-icon, .jabber-icon a { background-image: url("./images/icon_contact_jabber.gif"); } diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css index 7193c88fb6..9482a01f12 100644 --- a/phpBB/styles/prosilver/theme/imageset.css +++ b/phpBB/styles/prosilver/theme/imageset.css @@ -280,7 +280,7 @@ span.imageset { padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./images/icon_contact_msnm.gif"); padding-left: 20px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index 35b1e6bdcb..0fcd139ae1 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -2,8 +2,6 @@
      - - @@ -14,7 +12,7 @@ - + @@ -26,85 +24,6 @@ - - - - - - - - - diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index a0d46bf670..251230b643 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -94,16 +94,13 @@ - + - - - - + diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 064fdc5dec..9c84fedd89 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -118,10 +118,6 @@ - - - - @@ -138,7 +134,11 @@ - + + + + + diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html index e270542231..877c9fe1ab 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -16,10 +16,6 @@ - - - - diff --git a/phpBB/styles/subsilver2/theme/en/stylesheet.css b/phpBB/styles/subsilver2/theme/en/stylesheet.css index e39a13ae18..449fe7bec5 100644 --- a/phpBB/styles/subsilver2/theme/en/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/en/stylesheet.css @@ -19,7 +19,7 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./icon_contact_msnm.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index 94c6abeada..936625a0cf 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -1033,7 +1033,7 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./en/icon_contact_msnm.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 25f577937e..6c30f0dc05 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -621,7 +621,6 @@ $template->assign_vars(array( 'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'), 'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'), 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'), - 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'), 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'), 'JABBER_IMG' => $user->img('icon_contact_jabber', 'JABBER') , 'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_POST'), @@ -1116,7 +1115,6 @@ while ($row = $db->sql_fetchrow($result)) 'pm' => '', 'email' => '', 'aim' => '', - 'msn' => '', 'yim' => '', 'jabber' => '', 'search' => '', @@ -1182,7 +1180,6 @@ while ($row = $db->sql_fetchrow($result)) 'online' => false, 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"), 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', - 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '', 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&sr=posts") : '', @@ -1628,7 +1625,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', 'U_EMAIL' => $user_cache[$poster_id]['email'], 'U_AIM' => $user_cache[$poster_id]['aim'], - 'U_MSN' => $user_cache[$poster_id]['msn'], 'U_YIM' => $user_cache[$poster_id]['yim'], 'U_JABBER' => $user_cache[$poster_id]['jabber'], diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index 51b2ba5ec9..84abd41bca 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -195,7 +195,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case 'user_sig_bbcode_bitfield' => '', 'user_aim' => '', 'user_yim' => '', - 'user_msnm' => '', 'user_jabber' => '', 'user_actkey' => '', 'user_newpasswd' => '',
      {L_IM_RECIPIENT}{L_COLON} {USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}{USERNAME} [ {IM_CONTACT} ] {PRESENCE_IMG}
      - - - - {L_IM_ADD_CONTACT}
      {L_IM_SEND_MESSAGE} -
       
      {L_IM_MESSAGE}{L_COLON} {L_YIM}{L_COLON}
      {L_LAST_ACTIVE}{L_COLON}  {L_MSNM}{L_COLON}
      {L_POSTS}{L_COLON} {PM_IMG}
      {L_MSNM}{L_COLON} {MSN_IMG}{USER_MSN}
      {L_YIM}{L_COLON} {YIM_IMG}{USER_YIM}
      {custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_DESC}{custom_fields.PROFILE_FIELD_DESC}{custom_fields.PROFILE_FIELD_VALUE}
      {L_UCP_AIM}{L_COLON}
      {L_UCP_MSNM}{L_COLON}
      {L_UCP_YIM}{L_COLON}