mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-21 07:51:33 +02:00
[ticket/12234] Replace ICQ with custom profile field
PHPBB3-12234
This commit is contained in:
@@ -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'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&img=5" width="18" height="18" />' : '',
|
||||
'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'],
|
||||
|
Reference in New Issue
Block a user