';
}
function template_by_board()
{
global $context, $scripturl, $txt, $modSettings;
echo '
';
}
// Edit permission profiles (predefined).
function template_edit_profiles()
{
global $context, $scripturl, $txt, $modSettings;
echo '
';
}
function template_modify_group()
{
global $context, $scripturl, $txt, $modSettings;
// Cannot be edited?
if (!$context['profile']['can_modify'])
{
echo '
';
}
// The way of looking at permissions.
function template_modify_group_display($type)
{
global $context, $settings, $scripturl, $txt, $modSettings;
$permission_type = &$context['permissions'][$type];
$disable_field = $context['profile']['can_modify'] ? '' : 'disabled ';
echo '
';
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 '
', $permission['show_help'] ? '' : '', '
', $permission['name'], '
';
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 '
';
}
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, $settings, $scripturl, $txt, $modSettings;
echo '