', $txt['moderation_center'], '

', $txt['hello_guest'], ' ', $context['user']['name'], '!

', $txt['mc_description'], '

'; $alternate = true; // 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() : '', '
'; if (!$alternate) echo '
'; $alternate = !$alternate; } echo '
'; } function template_latest_news() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['help'], ' ', $txt['mc_latest_news'], '

', $txt['mc_cannot_connect_sm'], '
'; // This requires a lot of javascript... // @todo Put this in it's own file!! echo ' '; } // Show all the group requests the user can see. function template_group_requests_block() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['mc_group_requests'], '

'; } // A block to show the current top reported posts. function template_reported_posts_block() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['mc_recent_reports'], '

'; } function template_watched_users() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['mc_watched_users'], '

'; } // Little section for making... notes. function template_notes() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['mc_notes'], '

'; if (!empty($context['notes'])) { echo '
    '; // Cycle through the notes. foreach ($context['notes'] as $note) echo '
  • ', $note['author']['link'], ': ', $note['text'], '
  • '; echo '
', $txt['pages'], ': ', $context['page_index'], '
'; } echo '

'; } function template_reported_posts() { global $settings, $options, $context, $txt, $scripturl; echo '

', $context['view_closed'] ? $txt['mc_reportedp_closed'] : $txt['mc_reportedp_active'], '

', $txt['pages'], ': ', $context['page_index'], '
'; // Make the buttons. $close_button = create_button('close.gif', $context['view_closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', $context['view_closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', 'align="middle"'); $details_button = create_button('details.gif', 'mc_reportedp_details', 'mc_reportedp_details', 'align="middle"'); $ignore_button = create_button('ignore.gif', 'mc_reportedp_ignore', 'mc_reportedp_ignore', 'align="middle"'); $unignore_button = create_button('ignore.gif', 'mc_reportedp_unignore', 'mc_reportedp_unignore', 'align="middle"'); foreach ($context['reports'] as $report) { echo '
', $report['subject'], ' ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], '

« ', $txt['mc_reportedp_last_reported'], ': ', $report['last_updated'], ' »
'; // Prepare the comments... $comments = array(); foreach ($report['comments'] as $comment) $comments[$comment['member']['id']] = $comment['member']['link']; echo ' « ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' »

', $report['body'], '
'; } // Were none found? if (empty($context['reports'])) echo '

', $txt['mc_reportedp_none_found'], '

'; echo '
', $txt['pages'], ': ', $context['page_index'], '
', !$context['view_closed'] ? '' : '', '

'; } // Show a list of all the unapproved posts function template_unapproved_posts() { global $settings, $options, $context, $txt, $scripturl; // Just a big table of it all really... echo '

', $txt['mc_unapproved_posts'], '

'; // Make up some buttons $approve_button = create_button('approve.gif', 'approve', 'approve', 'align="middle"'); $remove_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"'); // No posts? if (empty($context['unapproved_items'])) echo '

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

'; else echo '
'; foreach ($context['unapproved_items'] as $item) { echo '

', $item['counter'], '  ', $item['category']['name'], ' / ', $item['board']['name'], ' / ', $item['subject'], ' ', $txt['mc_unapproved_by'], ' ', $item['poster']['link'], ' ', $txt['on'], ': ', $item['time'], '

', $item['body'], '
', $approve_button, ''; if ($item['can_delete']) echo ' ', $context['menu_separator'], ' ', $remove_button, ''; echo ' '; echo '
'; } echo '
'; if (!empty($context['unapproved_items'])) echo '
'; echo '

'; } // List all attachments awaiting approval. function template_unapproved_attachments() { global $settings, $options, $context, $txt, $scripturl; // Show all the attachments still oustanding. echo '

', $txt['mc_unapproved_attachments'], '

'; // The ever popular approve button, with the massively unpopular delete. $approve_button = create_button('approve.gif', 'approve', 'approve', 'align="middle"'); $remove_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"'); // None awaiting? if (empty($context['unapproved_items'])) echo '

', $txt['mc_unapproved_attachments_none_found'], '

'; else echo '
'; foreach ($context['unapproved_items'] as $item) { echo ' '; } if (!empty($context['unapproved_items'])) echo '
', $txt['mc_unapproved_attach_name'], ' ', $txt['mc_unapproved_attach_size'], ' ', $txt['mc_unapproved_attach_poster'], ' ', $txt['date'], '
', $item['filename'], ' ', $item['size'], $txt['kilobyte'], ' ', $item['poster']['link'], ' ', $item['time'], '
', $txt['in'], ' ', $item['message']['subject'], '
'; echo '
'; if (!empty($context['unapproved_items'])) echo '
'; echo '

'; } function template_viewmodreport() { global $context, $scripturl, $txt; echo '

', sprintf($txt['mc_viewmodreport'], $context['report']['message_link'], $context['report']['author']['link']), '

', sprintf($txt['mc_modreport_summary'], $context['report']['num_reports'], $context['report']['last_updated']), ' '; // Make the buttons. $close_button = create_button('close.gif', $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', 'align="middle"'); $ignore_button = create_button('ignore.gif', 'mc_reportedp_ignore', 'mc_reportedp_ignore', 'align="middle"'); $unignore_button = create_button('ignore.gif', 'mc_reportedp_unignore', 'mc_reportedp_unignore', 'align="middle"'); echo ' ', $context['report']['ignore'] ? $unignore_button : $ignore_button, ' ', $close_button, '

', $context['report']['body'], '

', $txt['mc_modreport_whoreported_title'], '

'; foreach ($context['report']['comments'] as $comment) echo '

', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '

', $comment['message'], '

'; echo '

', $txt['mc_modreport_mod_comments'], '

'; if (empty($context['report']['mod_comments'])) echo '

', $txt['mc_modreport_no_mod_comment'], '

'; foreach ($context['report']['mod_comments'] as $comment) echo '

', $comment['member']['link'], ': ', $comment['message'], ' (', $comment['time'], ')

'; echo '

'; $alt = false; template_show_list('moderation_actions_list'); if (!empty($context['entries'])) { echo '

', $txt['mc_modreport_modactions'], '

'; foreach ($context['entries'] as $entry) { echo ' '; } echo '
', $txt['modlog_action'], ' ', $txt['modlog_date'], ' ', $txt['modlog_member'], ' ', $txt['modlog_position'], ' ', $txt['modlog_ip'], '
', $entry['action'], ' ', $entry['time'], ' ', $entry['moderator']['link'], ' ', $entry['position'], ' ', $entry['ip'], '
'; foreach ($entry['extra'] as $key => $value) echo ' ', $key, ': ', $value; echo '
'; } echo '

'; } // Callback function for showing a watched users post in the table. function template_user_watch_post_callback($post) { global $scripturl, $context, $txt, $delete_button; // We'll have a delete please bob. if (empty($delete_button)) $delete_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"'); $output_html = '
' . $post['subject'] . ' ' . $txt['mc_reportedp_by'] . ' ' . $post['author_link'] . '
'; if ($post['can_delete']) $output_html .= ' ' . $delete_button . ' '; $output_html .= '

« ' . $txt['mc_watched_users_posted'] . ': ' . $post['poster_time'] . ' »

' . $post['body']; return $output_html; } // Moderation settings function template_moderation_settings() { global $settings, $options, $context, $txt, $scripturl; echo '

', $txt['mc_prefs_title'], '

', $txt['mc_prefs_desc'], '
', $txt['mc_prefs_homepage'], ':
'; foreach ($context['homepage_blocks'] as $k => $v) echo '
'; echo '
'; // If they can moderate boards they have more options! if ($context['can_moderate_boards']) { echo '
:
:
'; } if ($context['can_moderate_approvals']) { echo '
:
'; } echo '

'; } // Show a notice sent to a user. function template_show_notice() { global $txt, $settings, $options, $context; // We do all the HTML for this one! echo ' ', $context['page_title'], '

', $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, $settings, $options, $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 '

'; } ?>