'; // Show all the blocks they want to see. foreach ($context['mod_blocks'] as $block) { $block_function = 'template_' . $block; echo '
', function_exists($block_function) ? $block_function() : '', '
'; } echo ' '; } /** * Show all the group requests the user can see. */ function template_group_requests_block() { global $context, $txt, $scripturl; echo '

', $txt['mc_group_requests'], '

'; } /** * A list of watched users */ function template_watched_users() { global $context, $txt, $scripturl; echo '

', $txt['mc_watched_users'], '

'; } /** * A list of reported posts */ function template_reported_posts_block() { global $context, $txt, $scripturl; echo '

', $txt['mc_recent_reports'], '

'; } /** * A list of reported users */ function template_reported_users_block() { global $context, $txt, $scripturl; echo '

', $txt['mc_recent_user_reports'], '

'; } /** * Little section for making... notes. */ function template_notes() { global $context, $txt, $scripturl; // Let them know the action was a success. if (!empty($context['report_post_action'])) echo '
', $txt['report_action_' . $context['report_post_action']], '
'; echo '

', $txt['mc_notes'], '

'; if (!empty($context['notes'])) { echo '
    '; // Cycle through the notes. foreach ($context['notes'] as $note) echo '
  • ', ($note['can_delete'] ? '' : ''), $note['time'], ' ', $note['author']['link'], ': ', $note['text'], '
  • '; echo '
'; } echo '
'; } /** * Show a list of all the unapproved posts */ function template_unapproved_posts() { global $options, $context, $txt, $scripturl; // Just a big table of it all really... echo '

', $txt['mc_unapproved_posts'], '

'; // No posts? if (empty($context['unapproved_items'])) { echo '

', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '

'; } else { echo '
'; if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) echo '
'; echo '
'; } foreach ($context['unapproved_items'] as $item) { // The buttons $quickbuttons = array( 'approve' => array( 'label' => $txt['approve'], 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], 'icon' => 'approve', ), 'delete' => array( 'label' => $txt['remove'], 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], 'icon' => 'remove_button', 'show' => $item['can_delete'] ), 'quickmod' => array( 'class' => 'inline_mod_check', 'content' => '', 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 ), ); echo '
#', $item['counter'], '
', $item['category']['link'], ' / ', $item['board']['link'], ' / ', $item['link'], '
', sprintf(str_replace('
', ' ', $txt['last_post_topic']), $item['time'], '' . $item['poster']['link'] . ''), '
', $item['body'], '
', template_quickbuttons($quickbuttons, 'unapproved_posts'), '
'; } echo '
'; if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) echo '
'; if (!empty($context['unapproved_items'])) echo ' '; echo '
'; } /** * Callback function for showing a watched users post in the table. * * @param array $post An array of data about the post. * @return string An array of HTML for showing the post info. */ function template_user_watch_post_callback($post) { global $scripturl, $context, $txt, $delete_button; // We'll have a delete and a checkbox please bob. // @todo Discuss this with the team and rewrite if required. $quickbuttons = array( 'delete' => array( 'label' => $txt['remove_message'], 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', 'class' => 'you_sure', 'icon' => 'remove_button', 'show' => $post['can_delete'] ), 'quickmod' => array( 'class' => 'inline_mod_check', 'content' => '', 'show' => $post['can_delete'] ) ); $output_html = '
' . $post['subject'] . ' ' . $txt['mc_reportedp_by'] . ' ' . $post['author_link'] . '

' . $txt['mc_watched_users_posted'] . ': ' . $post['poster_time'] . '
' . $post['body'] . '
'; $output_html .= template_quickbuttons($quickbuttons, 'user_watch_post', 'return'); return $output_html; } /** * The moderation settings page. */ function template_moderation_settings() { global $context, $txt, $scripturl; echo '
'; echo '
', $txt['mc_no_settings'], '
'; echo '
'; } /** * Show a notice sent to a user. */ function template_show_notice() { global $txt, $settings, $context, $modSettings; // We do all the HTML for this one! echo ' ', $context['page_title'], ' ', template_css(), '

', $txt['show_notice'], '

', $txt['show_notice_subject'], ': ', $context['notice_subject'], '

', $txt['show_notice_text'], ':
', $context['notice_body'], '
'; } /** * Add or edit a warning template. */ function template_warn_template() { global $context, $txt, $scripturl; echo '

', $context['page_title'], '

', $txt['mc_warning_template_desc'], '
:
:
', $txt['mc_warning_template_body_desc'], '
'; if ($context['template_data']['can_edit_personal']) echo '

', $txt['mc_warning_template_personal_desc'], '

'; echo '
'; } ?>