mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch '3.1.x'
Conflicts: phpBB/styles/subsilver2/template/memberlist_group.html
This commit is contained in:
commit
1316fe2084
3 changed files with 26 additions and 2 deletions
|
@ -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_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.',
|
'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.',
|
||||||
|
|
||||||
|
'MANAGE_GROUP' => 'Manage Group',
|
||||||
'MORE_THAN' => 'More than',
|
'MORE_THAN' => 'More than',
|
||||||
|
|
||||||
'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.',
|
'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.',
|
||||||
|
|
|
@ -1090,7 +1090,7 @@ switch ($mode)
|
||||||
if ($mode == 'group')
|
if ($mode == 'group')
|
||||||
{
|
{
|
||||||
// We JOIN here to save a query for determining membership for hidden groups. ;)
|
// 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
|
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)
|
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";
|
WHERE g.group_id = $group_id";
|
||||||
|
@ -1149,6 +1149,24 @@ switch ($mode)
|
||||||
$user_rank_data['img'] .= '<br />';
|
$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(
|
$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']),
|
'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' => $user_rank_data['img'],
|
||||||
'RANK_IMG_SRC' => $user_rank_data['img_src'],
|
'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';
|
$sql_select = ', ug.group_leader';
|
||||||
|
|
|
@ -14,7 +14,11 @@
|
||||||
|
|
||||||
<!-- IF S_SHOW_GROUP -->
|
<!-- IF S_SHOW_GROUP -->
|
||||||
<h2 class="group-title"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2>
|
<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>{GROUP_DESC} {GROUP_TYPE}</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF -->
|
<!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF -->
|
||||||
<!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
|
<!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue