diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/language/en/memberlist.php | 1 | ||||
-rw-r--r-- | phpBB/memberlist.php | 23 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/memberlist_body.html | 4 |
3 files changed, 26 insertions, 2 deletions
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 5605f8f4b5..c7b2bf55d1 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -101,6 +101,7 @@ $lang = array_merge($lang, array( 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.', 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.', + 'MANAGE_GROUP' => 'Manage Group', 'MORE_THAN' => 'More than', 'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c7762d4cef..c23a409ae7 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1090,7 +1090,7 @@ switch ($mode) if ($mode == 'group') { // We JOIN here to save a query for determining membership for hidden groups. ;) - $sql = 'SELECT g.*, ug.user_id + $sql = 'SELECT g.*, ug.user_id, ug.group_leader FROM ' . GROUPS_TABLE . ' g LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id'] . " AND ug.group_id = $group_id) WHERE g.group_id = $group_id"; @@ -1149,6 +1149,24 @@ switch ($mode) $user_rank_data['img'] .= '<br />'; } } + // include modules for manage groups link display or not + // need to ensure the module is active + $can_manage_group = false; + if ($user->data['is_registered'] && $group_row['group_leader']) + { + if (!class_exists('p_master')) + { + include($phpbb_root_path . 'includes/functions_module.' . $phpEx); + } + $module = new p_master; + $module->list_modules('ucp'); + + if ($module->is_active('ucp_groups', 'manage')) + { + $can_manage_group = true; + } + unset($module); + } $template->assign_vars(array( 'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']), @@ -1161,7 +1179,8 @@ switch ($mode) 'RANK_IMG' => $user_rank_data['img'], 'RANK_IMG_SRC' => $user_rank_data['img_src'], - 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '',) + 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '', + 'U_MANAGE' => ($can_manage_group) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_groups&mode=manage') : false,) ); $sql_select = ', ug.group_leader'; diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index c7f9340207..997147f492 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -14,7 +14,11 @@ <!-- IF S_SHOW_GROUP --> <h2 class="group-title"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2> + <!-- IF U_MANAGE --> + <p class="right responsive-center manage rightside"><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a></p> + <!-- ENDIF --> <p>{GROUP_DESC} {GROUP_TYPE}</p> + <p> <!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF --> <!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --> |