';
}
/**
* THe page that shows which permissions profile applies to each board
*/
function template_by_board()
{
global $context, $scripturl, $txt;
echo '
';
}
/**
* Edit permission profiles (predefined).
*/
function template_edit_profiles()
{
global $context, $scripturl, $txt;
echo '
';
}
/**
* Modify a group's permissions
*/
function template_modify_group()
{
global $context, $scripturl, $txt, $modSettings;
// Cannot be edited?
if (!$context['profile']['can_modify'])
echo '
';
else
echo '
';
echo '
';
}
/**
* The way of looking at permissions.
*
* @param string $type The permissions type
*/
function template_modify_group_display($type)
{
global $context, $scripturl, $txt, $modSettings;
$permission_type = &$context['permissions'][$type];
$disable_field = $context['profile']['can_modify'] ? '' : 'disabled ';
foreach ($permission_type['columns'] as $column)
{
echo '
';
foreach ($column as $permissionGroup)
{
if (empty($permissionGroup['permissions']))
continue;
// Are we likely to have something in this group to display or is it all hidden?
$has_display_content = false;
if (!$permissionGroup['hidden'])
{
// Before we go any further check we are going to have some data to print otherwise we just have a silly heading.
foreach ($permissionGroup['permissions'] as $permission)
if (!$permission['hidden'])
$has_display_content = true;
if ($has_display_content)
{
echo '
', $permissionGroup['name'], '
';
if ($context['group']['id'] != -1)
echo '
', $txt['permissions_option_own'], '
', $txt['permissions_option_any'], '
';
echo '
';
}
}
foreach ($permissionGroup['permissions'] as $permission)
{
if (!$permission['hidden'] && !$permissionGroup['hidden'])
{
echo '
';
if ($permission['has_own_any'])
{
// Guests can't do their own thing.
if ($context['group']['id'] != -1)
{
if (empty($modSettings['permission_enable_deny']))
echo '
';
else
{
echo '
';
}
echo '
';
}
echo '
';
}
/**
* A form for displaying inline permissions, such as on a settings page.
*/
function template_inline_permissions()
{
global $context, $txt, $modSettings;
// This looks really weird, but it keeps things nested properly...
echo '
', $txt['avatar_select_permission'], '
';
}
/**
* Edit post moderation permissions.
*/
function template_postmod_permissions()
{
global $context, $scripturl, $txt, $modSettings;
echo '