aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/language/en/memberlist.php1
-rw-r--r--phpBB/memberlist.php23
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_group.html2
4 files changed, 27 insertions, 3 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 9604a5a21f..6be44587f5 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1088,7 +1088,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";
@@ -1147,6 +1147,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']),
@@ -1159,7 +1177,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&amp;mode=compose&amp;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&amp;mode=compose&amp;g=' . $group_id) : '',
+ 'U_MANAGE' => ($can_manage_group) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_groups&amp;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 e0215848d0..5fba59159c 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 -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html
index 4140c8cdbf..ff8c96c120 100644
--- a/phpBB/styles/subsilver2/template/memberlist_group.html
+++ b/phpBB/styles/subsilver2/template/memberlist_group.html
@@ -5,7 +5,7 @@
</tr>
<tr>
<td class="row1" width="20%"><b class="genmed">{L_GROUP_NAME}{L_COLON}</b></td>
- <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b></td>
+ <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b> <!-- IF U_MANAGE --><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a><!-- ENDIF --></td>
<!-- IF AVATAR_IMG or RANK_IMG or GROUP_RANK or U_PM -->
<td class="row1" width="33%" rowspan="2" align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<br /><!-- ENDIF --><!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --><!-- IF GROUP_RANK --><span class="gensmall">{GROUP_RANK}</span><br /><br /><!-- ENDIF --><!-- IF U_PM --><a href="{U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF --></td>
<!-- ENDIF -->