From 8c2e96dbc9a7f536f86c7e73d9add8d7901c58a2 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 15 Apr 2003 23:42:06 +0000 Subject: [PATCH] Enable/disable searching ... note that user searching is always enabled for admins at this time (for ACP functionality ... this could be pared down to only those functions requiring username input) git-svn-id: file:///svn/phpbb/trunk@3848 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/memberlist.php | 51 +++++++++++-------- .../templates/subSilver/memberlist_body.html | 2 +- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 4a37041a5e..137a7cdf4b 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -86,6 +86,11 @@ switch ($mode) // Display a listing of board admins, moderators break; + case 'contact': + $page_title = $user->lang['IM_USER']; + $template_html = 'memberlist_im.html'; + break; + case 'viewprofile': // Display a profile $page_title = sprintf($user->lang['VIEWING_PROFILE'], $row['username']); @@ -367,9 +372,10 @@ switch ($mode) $s_sort_dir .= ''; } - // Additional sorting options for user search + // Additional sorting options for user search ... if search is enabled, if not + // then only admins can make use of this (for ACP functionality) $where_sql = ''; - if ($mode == 'searchuser') + if ($mode == 'searchuser' && (!empty($config['load_search']) || $auth->acl_get('a_'))) { $find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '='); @@ -457,7 +463,7 @@ switch ($mode) $pagination_url = "memberlist.$phpEx$SID&mode=$mode"; // Some search user specific data - if ($mode == 'searchuser') + if ($mode == 'searchuser' && (!empty($config['load_search']) || $auth->acl_get('a_'))) { // Build a relevant pagination_url $global_var = (isset($_POST['submit'])) ? '_POST' : '_GET'; @@ -542,7 +548,7 @@ switch ($mode) 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start), 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $total_users), - 'U_FIND_MEMBER' => "memberlist.$phpEx$SID&mode=searchuser", + 'U_FIND_MEMBER' => (!empty($config['load_search']) || $auth->acl_get('a_')) ? "memberlist.$phpEx$SID&mode=searchuser" : '', 'U_SORT_USERNAME' => "memberlist.$phpEx$SID&sk=a&sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_FROM' => "memberlist.$phpEx$SID&sk=b&sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_JOINED' => "memberlist.$phpEx$SID&sk=c&sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), @@ -624,7 +630,7 @@ function show_profile($data) if (!empty($data['user_viewemail']) || $auth->acl_get('a_')) { $email_uri = (!empty($config['board_email_form'])) ? "memberlist.$phpEx$SID&mode=email&u=" . $user_id : 'mailto:' . $row['user_email']; - $email_img = '' . $user->img('icon_email', $user->lang['EMAIL']) . ''; + $email_img = '' . $user->img('btn_email', $user->lang['EMAIL']) . ''; $email = '' . $user->lang['EMAIL'] . ''; } else @@ -634,21 +640,22 @@ function show_profile($data) } $temp_url = "memberlist.$phpEx$SID&mode=viewprofile&u=$user_id"; - $profile_img = '' . $user->img('icon_profile', $user->lang['PROFILE']) . ''; + $profile_img = '' . $user->img('btn_profile', $user->lang['PROFILE']) . ''; $profile = '' . $user->lang['PROFILE'] . ''; $temp_url = "ucp.$phpEx$SID&mode=pm&action=send&u=$user_id"; - $pm_img = '' . $user->img('icon_pm', $user->lang['MESSAGE']) . ''; + $pm_img = '' . $user->img('btn_pm', $user->lang['MESSAGE']) . ''; $pm = '' . $user->lang['MESSAGE'] . ''; - $www_img = (!empty($data['user_website'])) ? '' . $user->img('icon_www', $user->lang['WWW']) . '' : ''; + $www_img = (!empty($data['user_website'])) ? '' . $user->img('btn_www', $user->lang['WWW']) . '' : ''; $www = (!empty($data['user_website'])) ? '' . $user->lang['WWW'] . '' : ''; - if (!empty($row['user_icq'])) + if (!empty($data['user_icq'])) { - $icq_status_img = ''; - $icq_img = '' . $user->img('icon_icq', $user->lang['ICQ']) . ''; - $icq = '' . $user->lang['ICQ'] . ''; + $temp_url = "memberlist.$phpEx$SID&mode=contact&action=icq&u=$user_id"; + $icq_status_img = ''; + $icq_img = '' . $user->img('btn_icq', $user->lang['ICQ']) . ''; + $icq = '' . $user->lang['ICQ'] . ''; } else { @@ -657,18 +664,20 @@ function show_profile($data) $icq = ''; } - $aim_img = (!empty($row['user_aim'])) ? '' . $user->img('icon_aim', $user->lang['AIM']) . '' : ''; - $aim = (!empty($row['user_aim'])) ? '' . $user->lang['AIM'] . '' : ''; + $temp_url = "memberlist.$phpEx$SID&mode=contact&action=aim&u=$user_id"; + $aim_img = (!empty($data['user_aim'])) ? '' . $user->img('btn_aim', $user->lang['AIM']) . '' : ''; + $aim = (!empty($data['user_aim'])) ? '' . $user->lang['AIM'] . '' : ''; - $temp_url = "ucp.$phpEx$SID&mode=viewprofile&u=$user_id"; - $msn_img = (!empty($data['user_msnm'])) ? '' . $user->img('icon_msnm', $user->lang['MSNM']) . '' : ''; - $msn = (!empty($data['user_msnm'])) ? '' . $user->lang['MSNM'] . '' : ''; + $temp_url = "memberlist.$phpEx$SID&mode=contact&action=msnm&u=$user_id"; + $msn_img = (!empty($data['user_msnm'])) ? '' . $user->img('btn_msnm', $user->lang['MSNM']) . '' : ''; + $msn = (!empty($data['user_msnm'])) ? '' . $user->lang['MSNM'] . '' : ''; - $yim_img = (!empty($data['user_yim'])) ? '' . $user->img('icon_yim', $user->lang['YIM']) . '' : ''; - $yim = (!empty($data['user_yim'])) ? '' . $user->lang['YIM'] . '' : ''; + $temp_url = 'http://edit.yahoo.com/config/send_webmesg?.target=' . $data['user_yim'] . '&.src=pg'; + $yim_img = (!empty($data['user_yim'])) ? '' . $user->img('btn_yim', $user->lang['YIM']) . '' : ''; + $yim = (!empty($data['user_yim'])) ? '' . $user->lang['YIM'] . '' : ''; $temp_url = "search.$phpEx$SID&search_author=" . urlencode($username) . "&showresults=posts"; - $search_img = '' . $user->img('icon_search', $user->lang['SEARCH']) . ''; + $search_img = '' . $user->img('btn_search', $user->lang['SEARCH']) . ''; $search = '' . $user->lang['SEARCH'] . ''; $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit']; @@ -679,7 +688,7 @@ function show_profile($data) 'RANK_TITLE' => $rank_title, 'SIGNATURE' => (!empty($data['user_sig'])) ? $data['user_sig'] : '', - 'ONLINE_IMG' => (intval($data['session_time']) >= time() - 300) ? $user->img('icon_online', $user->lang['USER_ONLINE']) : $user->img('icon_offline', $user->lang['USER_ONLINE']), + 'ONLINE_IMG' => (intval($data['session_time']) >= time() - 300) ? $user->img('btn_online', $user->lang['USER_ONLINE']) : $user->img('btn_offline', $user->lang['USER_ONLINE']), 'AVATAR_IMG' => $poster_avatar, 'RANK_IMG' => $rank_img, diff --git a/phpBB/templates/subSilver/memberlist_body.html b/phpBB/templates/subSilver/memberlist_body.html index 1c1af89f59..593298ba64 100644 --- a/phpBB/templates/subSilver/memberlist_body.html +++ b/phpBB/templates/subSilver/memberlist_body.html @@ -91,7 +91,7 @@ function marklist(status)
- +
{L_FIND_USERNAME}{L_FIND_USERNAME}