From c5b4d0afb765a15ea6afa5559b6de1a367c12c2c Mon Sep 17 00:00:00 2001 From: PayBas Date: Mon, 7 Jul 2014 08:59:38 +0200 Subject: [PATCH 1/4] [ticket/12804] Hide Jabber from UCP & member search when disabled PHPBB3-12804 --- phpBB/includes/ucp/ucp_profile.php | 5 +++-- phpBB/memberlist.php | 1 + .../prosilver/template/memberlist_search.html | 18 ++++++++++-------- .../template/ucp_profile_profile_info.html | 2 ++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 5ba5f1e830..6940f18345 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -393,8 +393,9 @@ class ucp_profile } $template->assign_vars(array( - 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', - 'JABBER' => $data['jabber'], + 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', + 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, + 'JABBER' => $data['jabber'], )); // Get additional profile fields and assign them to the template block var 'profile_fields' diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 02051bf0df..6337a5e633 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1286,6 +1286,7 @@ switch ($mode) 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false, 'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false, + 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false, 'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)), 'S_FORM_NAME' => $form, diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 4c14baf2b6..4fba966151 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -29,18 +29,20 @@
+
-
-
-
-
-
-
-
-
+ +
+
+
+
+
+
+
+
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index c0bf681f47..986bc92298 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -20,10 +20,12 @@ +
+
for="{profile_fields.FIELD_ID}">{profile_fields.LANG_NAME}{L_COLON} * From fbc07d3b14faf345c3bcd79204b32085e6260fb5 Mon Sep 17 00:00:00 2001 From: PayBas Date: Mon, 7 Jul 2014 11:21:48 +0200 Subject: [PATCH 2/4] [ticket/12804] Hide jabber for subSilver2 as well PHPBB3-12804 --- phpBB/styles/subsilver2/template/memberlist_search.html | 8 ++++++-- phpBB/styles/subsilver2/template/memberlist_view.html | 2 ++ .../subsilver2/template/ucp_profile_profile_info.html | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index aa6b61fe22..12dd10be2e 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -104,8 +104,12 @@ {L_GROUP}{L_COLON} - {L_JABBER}{L_COLON} - + + {L_JABBER}{L_COLON} + + +   + {L_SORT_BY}{L_COLON} diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 550643ff03..00c627f62e 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -121,10 +121,12 @@ {PM_IMG} + {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 bf0aa8f899..2d0140a15d 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -12,10 +12,12 @@ {L_PROFILE_INFO_NOTICE} + {L_UCP_JABBER}{L_COLON} + {L_BIRTHDAY}{L_COLON}
{L_BIRTHDAY_EXPLAIN} From 0a286e044b3d7b71edea5f79213e6c008db66986 Mon Sep 17 00:00:00 2001 From: PayBas Date: Mon, 7 Jul 2014 11:25:33 +0200 Subject: [PATCH 3/4] [ticket/12804] Dont use ternary form PHPBB3-12804 --- phpBB/includes/ucp/ucp_profile.php | 2 +- phpBB/memberlist.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 6940f18345..a315b167d7 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -394,7 +394,7 @@ class ucp_profile $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', - 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, + 'S_JABBER_ENABLED' => $config['jab_enable'], 'JABBER' => $data['jabber'], )); diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 6337a5e633..80917a7f76 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1286,7 +1286,7 @@ switch ($mode) 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false, 'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false, - 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, + 'S_JABBER_ENABLED' => $config['jab_enable'], 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false, 'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)), 'S_FORM_NAME' => $form, From bdfca39e071d74fff39d92ca9cb4c03ef05b0ba8 Mon Sep 17 00:00:00 2001 From: PayBas Date: Tue, 8 Jul 2014 00:42:01 +0200 Subject: [PATCH 4/4] [ticket/12804] Disable jabber from memberlist sort options PHPBB3-12804 --- phpBB/memberlist.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 80917a7f76..4f4dcb1b41 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -829,8 +829,14 @@ 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'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts'); + + if ($config['jab_enable']) + { + $sort_key_text['k'] = $user->lang['JABBER']; + $sort_key_sql['k'] = 'u.user_jabber'; + } if ($auth->acl_get('a_user')) {