Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions phpBB/install/convertors/convert_phpbb20.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,6 @@
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')),
array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_website', 'users.user_website', 'validate_website'),

'where' => 'users.user_id <> -1',
Expand Down
3 changes: 0 additions & 3 deletions phpBB/install/schemas/schema_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,8 @@ 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_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 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_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 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_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 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, 0, 6, 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_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'ymsgr:sendim?%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_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'https://facebook.com/%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_twitter', 'profilefields.type.string', 'phpbb_twitter', '20', '1', '15', '', '', '[\w_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 10, 1, 'VIEW_TWITTER_PROFILE', 'https://x.com/%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_skype', 'profilefields.type.string', 'phpbb_skype', '20', '6', '32', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 11, 1, 'VIEW_SKYPE_PROFILE', 'skype:%s?userinfo');
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_youtube', 'profilefields.type.string', 'phpbb_youtube', '20', '3', '60', '', '', '(@[a-zA-Z0-9_.-]{3,30}|c/[a-zA-Z][\w\.,\-_]+|(channel|user)/[a-zA-Z][\w\.,\-_]+)', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 12, 1, 'VIEW_YOUTUBE_PROFILE', 'https://youtube.com/%s');

# User Notification Options (for first user)
Expand Down
3 changes: 0 additions & 3 deletions phpBB/language/en/memberlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@
'SELECT_SORT_METHOD' => 'Select sort method',
'SENDER_EMAIL_ADDRESS' => 'Your email address',
'SENDER_NAME' => 'Your name',
'SEND_ICQ_MESSAGE' => 'Send ICQ message',
'SEND_IM' => 'Instant messaging',
'SEND_JABBER_MESSAGE' => 'Send Jabber message',
'SEND_MESSAGE' => 'Message',
'SEND_YIM_MESSAGE' => 'Send YIM message',
'SORT_EMAIL' => 'Email',
'SORT_LAST_ACTIVE' => 'Last active',
'SORT_POST_COUNT' => 'Post count',
Expand All @@ -147,7 +145,6 @@

'VIEWING_PROFILE' => 'Viewing profile - %s',
'VIEW_FACEBOOK_PROFILE' => 'View Facebook Profile',
'VIEW_SKYPE_PROFILE' => 'View Skype Profile',
'VIEW_TWITTER_PROFILE' => 'View X Profile',
'VIEW_YOUTUBE_PROFILE' => 'View YouTube Profile',
));
234 changes: 234 additions & 0 deletions phpBB/phpbb/db/migration/data/v33x/remove_defunct_profilefields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/

namespace phpbb\db\migration\data\v33x;

class remove_defunct_profilefields extends \phpbb\db\migration\migration
{
/**
* Default profile fields of instant messaging services that no longer exist:
* ICQ was shut down in 2024, Skype in 2025 and Yahoo Messenger in 2018.
*
* @return array Field data of the removed fields, keyed by field name
*/
protected function get_removed_fields(): array
{
return [
'phpbb_icq' => [
'field_name' => '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_on_ml' => 1,
'field_show_profile' => 1,
'field_hide' => 0,
'field_no_view' => 0,
'field_active' => 0,
'field_is_contact' => 1,
'field_contact_desc' => 'SEND_ICQ_MESSAGE',
'field_contact_url' => 'https://www.icq.com/people/%s/',
],
'phpbb_yahoo' => [
'field_name' => 'phpbb_yahoo',
'field_type' => 'profilefields.type.string',
'field_ident' => 'phpbb_yahoo',
'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' => 1,
'field_show_profile' => 1,
'field_hide' => 0,
'field_no_view' => 0,
'field_active' => 0,
'field_is_contact' => 1,
'field_contact_desc' => 'SEND_YIM_MESSAGE',
'field_contact_url' => 'ymsgr:sendim?%s',
],
'phpbb_skype' => [
'field_name' => 'phpbb_skype',
'field_type' => 'profilefields.type.string',
'field_ident' => 'phpbb_skype',
'field_length' => '20',
'field_minlen' => '6',
'field_maxlen' => '32',
'field_novalue' => '',
'field_default_value' => '',
'field_validation' => '[a-zA-Z][\w\.,\-_]+',
'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' => 'VIEW_SKYPE_PROFILE',
'field_contact_url' => 'skype:%s?userinfo',
],
];
}

public function effectively_installed()
{
foreach ($this->get_removed_fields() as $field_name => $field_data)
{
if ($this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields_data', 'pf_' . $field_name))
{
return false;
}
}

return true;
}

public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v3317',
];
}

public function update_schema()
{
return [
'drop_columns' => [
$this->table_prefix . 'profile_fields_data' => [
'pf_phpbb_icq',
'pf_phpbb_yahoo',
'pf_phpbb_skype',
],
],
];
}

public function revert_schema()
{
return [
'add_columns' => [
$this->table_prefix . 'profile_fields_data' => [
'pf_phpbb_icq' => ['VCHAR', ''],
'pf_phpbb_yahoo' => ['VCHAR', ''],
'pf_phpbb_skype' => ['VCHAR', ''],
],
],
];
}

public function update_data()
{
return [
['custom', [[$this, 'delete_custom_profile_field_data']]],
];
}

public function revert_data()
{
return [
['custom', [[$this, 'create_custom_fields']]],
];
}

public function delete_custom_profile_field_data()
{
foreach ($this->get_removed_fields() as $field_name => $field_data)
{
$sql = 'SELECT field_id
FROM ' . PROFILE_FIELDS_TABLE . "
WHERE field_name = '" . $this->db->sql_escape($field_name) . "'";
$result = $this->db->sql_query($sql);
$field_id = (int) $this->db->sql_fetchfield('field_id');
$this->db->sql_freeresult($result);

if (!$field_id)
{
continue;
}

$sql = 'DELETE FROM ' . PROFILE_FIELDS_TABLE . '
WHERE field_id = ' . (int) $field_id;
$this->db->sql_query($sql);

$sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . '
WHERE field_id = ' . (int) $field_id;
$this->db->sql_query($sql);

$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE field_id = ' . (int) $field_id;
$this->db->sql_query($sql);
}
}

public function create_custom_fields()
{
$sql = 'SELECT MAX(field_order) as max_field_order
FROM ' . PROFILE_FIELDS_TABLE;
$result = $this->db->sql_query($sql);
$max_field_order = (int) $this->db->sql_fetchfield('max_field_order');
$this->db->sql_freeresult($result);

$lang_ids = [];
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE;
$result = $this->db->sql_query($sql);
while ($lang_id = (int) $this->db->sql_fetchfield('lang_id'))
{
$lang_ids[] = $lang_id;
}
$this->db->sql_freeresult($result);

$insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, PROFILE_LANG_TABLE);

foreach ($this->get_removed_fields() as $field_name => $field_data)
{
$field_data['field_order'] = ++$max_field_order;

$sql = 'INSERT INTO ' . PROFILE_FIELDS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $field_data);
$this->db->sql_query($sql);
$field_id = (int) $this->db->sql_nextid();

foreach ($lang_ids as $lang_id)
{
$insert_buffer->insert([
'field_id' => (int) $field_id,
'lang_id' => (int) $lang_id,
'lang_name' => strtoupper(substr($field_name, 6)),
'lang_explain' => '',
'lang_default_value' => '',
]);
}
}

$insert_buffer->flush();
}
}
3 changes: 0 additions & 3 deletions phpBB/styles/prosilver/theme/colours.css
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,12 @@ Colours and backgrounds for buttons.css
.pm-icon { background-position: 0 0; }
.email-icon { background-position: -21px 0; }
.jabber-icon { background-position: -80px 0; }
.phpbb_icq-icon { background-position: -61px 0 ; }
.phpbb_wlm-icon { background-position: -182px 0; }
.phpbb_aol-icon { background-position: -244px 0; }
.phpbb_website-icon { background-position: -40px 0; }
.phpbb_youtube-icon { background-position: -98px 0; }
.phpbb_facebook-icon { background-position: -119px 0; }
.phpbb_skype-icon { background-position: -161px 0; }
.phpbb_twitter-icon { background-position: -202px 0; }
.phpbb_yahoo-icon { background-position: -224px 0; }

/* Forum icons & Topic icons */
.global_read { background-image: url("./images/announce_read.gif"); }
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/ucp_profile_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function test_submitting_profile_info()
$form = $crawler->selectButton('Submit')->form(array(
'pf_phpbb_facebook' => 'phpbb',
'pf_phpbb_location' => 'Bertie´s Empire',
'pf_phpbb_skype' => 'phpbb.skype.account',
'pf_phpbb_twitter' => 'phpbb_twitter',
'pf_phpbb_youtube' => 'user/phpbb.youtube',
));
Expand All @@ -41,7 +40,6 @@ public function test_submitting_profile_info()

$this->assertEquals('phpbb', $form->get('pf_phpbb_facebook')->getValue());
$this->assertEquals('Bertie´s Empire', $form->get('pf_phpbb_location')->getValue());
$this->assertEquals('phpbb.skype.account', $form->get('pf_phpbb_skype')->getValue());
$this->assertEquals('phpbb_twitter', $form->get('pf_phpbb_twitter')->getValue());
$this->assertEquals('user/phpbb.youtube', $form->get('pf_phpbb_youtube')->getValue());

Expand Down
Loading
Loading