mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-22 16:22:58 +02:00
[ticket/12236] Move AOL Instant Messanger field to custom profile field
PHPBB3-12236
This commit is contained in:
@@ -305,13 +305,6 @@ switch ($mode)
|
||||
$presence_img = '';
|
||||
switch ($action)
|
||||
{
|
||||
case 'aim':
|
||||
$lang = 'AIM';
|
||||
$sql_field = 'user_aim';
|
||||
$s_select = 'S_SEND_AIM';
|
||||
$s_action = '';
|
||||
break;
|
||||
|
||||
case 'jabber':
|
||||
$lang = 'JABBER';
|
||||
$sql_field = 'user_jabber';
|
||||
@@ -395,9 +388,6 @@ switch ($mode)
|
||||
'IM_CONTACT' => $row[$sql_field],
|
||||
'A_IM_CONTACT' => addslashes($row[$sql_field]),
|
||||
|
||||
'U_AIM_CONTACT' => ($action == 'aim') ? 'aim:addbuddy?screenname=' . urlencode($row[$sql_field]) : '',
|
||||
'U_AIM_MESSAGE' => ($action == 'aim') ? 'aim:goim?screenname=' . urlencode($row[$sql_field]) . '&message=' . urlencode($config['sitename']) : '',
|
||||
|
||||
'USERNAME' => $row['username'],
|
||||
'CONTACT_NAME' => $row[$sql_field],
|
||||
'SITENAME' => $config['sitename'],
|
||||
@@ -643,7 +633,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']),
|
||||
'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
|
||||
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
@@ -987,8 +976,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'], 'k' => $user->lang['JABBER']);
|
||||
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'h' => 'u.user_aim', 'k' => 'u.user_jabber');
|
||||
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'k' => $user->lang['JABBER']);
|
||||
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber');
|
||||
|
||||
if ($auth->acl_get('a_user'))
|
||||
{
|
||||
@@ -1031,7 +1020,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', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
|
||||
$search_params = array('username', 'email', '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;
|
||||
@@ -1040,7 +1029,6 @@ switch ($mode)
|
||||
{
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$aim = request_var('aim', '');
|
||||
$jabber = request_var('jabber', '');
|
||||
$search_group_id = request_var('search_group_id', 0);
|
||||
|
||||
@@ -1081,7 +1069,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 .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : '';
|
||||
$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 . ' ' : '';
|
||||
|
||||
@@ -1310,7 +1297,6 @@ switch ($mode)
|
||||
'select_single' => array('select_single', $select_single),
|
||||
'username' => array('username', '', true),
|
||||
'email' => array('email', ''),
|
||||
'aim' => array('aim', ''),
|
||||
'jabber' => array('jabber', ''),
|
||||
'search_group_id' => array('search_group_id', 0),
|
||||
'joined_select' => array('joined_select', 'lt'),
|
||||
@@ -1439,7 +1425,6 @@ switch ($mode)
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
'EMAIL' => $email,
|
||||
'AIM' => $aim,
|
||||
'JABBER' => $jabber,
|
||||
'JOINED' => implode('-', $joined),
|
||||
'ACTIVE' => implode('-', $active),
|
||||
@@ -1615,7 +1600,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']),
|
||||
'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
|
||||
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
@@ -1625,7 +1609,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_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $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'),
|
||||
'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
@@ -1745,10 +1728,8 @@ 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_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&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_JABBER' => $data['user_jabber'],
|
||||
'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
|
||||
|
||||
|
Reference in New Issue
Block a user