|
@@ -190,6 +190,15 @@ function template_reported_posts()
|
|
|
{
|
|
|
global $settings, $options, $context, $txt, $scripturl;
|
|
|
|
|
|
+ // Let them know the action was a success.
|
|
|
+ if (!empty($context['report_post_action']) && !empty($txt['report_action_'. $context['report_post_action']]))
|
|
|
+ {
|
|
|
+ echo '
|
|
|
+ <div class="infobox">
|
|
|
+ ', $txt['report_action_'. $context['report_post_action']], '
|
|
|
+ </div>';
|
|
|
+ }
|
|
|
+
|
|
|
echo '
|
|
|
<form id="reported_posts" action="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=closed' : '', ';start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '">
|
|
|
<div class="cat_bar">
|
|
@@ -206,6 +215,8 @@ function template_reported_posts()
|
|
|
$details_button = create_button('details.png', 'mc_reportedp_details', 'mc_reportedp_details', 'class="centericon"');
|
|
|
$ignore_button = create_button('ignore.png', 'mc_reportedp_ignore', 'mc_reportedp_ignore', 'class="centericon"');
|
|
|
$unignore_button = create_button('ignore.png', 'mc_reportedp_unignore', 'mc_reportedp_unignore', 'class="centericon"');
|
|
|
+ $ban_button = create_button('close.png', 'mc_reportedp_ban', 'mc_reportedp_ban', 'class="centericon"');
|
|
|
+ $delete_button = create_button('delete.png', 'mc_reportedp_delete', 'mc_reportedp_delete', 'class="centericon"');
|
|
|
|
|
|
foreach ($context['reports'] as $report)
|
|
|
{
|
|
@@ -213,7 +224,7 @@ function template_reported_posts()
|
|
|
<div class="generic_list_wrapper ', $report['alternate'] ? 'windowbg' : 'windowbg2', '">
|
|
|
<div class="content">
|
|
|
<h5>
|
|
|
- <strong><a href="', $report['topic_href'], '">', $report['subject'], '</a></strong> ', $txt['mc_reportedp_by'], ' <strong>', $report['author']['link'], '</strong>
|
|
|
+ <strong><a href="', $report['topic']['href'], '">', $report['subject'], '</a></strong> ', $txt['mc_reportedp_by'], ' <strong>', $report['author']['link'], '</strong>
|
|
|
</h5>
|
|
|
<div class="smalltext">
|
|
|
', $txt['mc_reportedp_last_reported'], ': ', $report['last_updated'], ' - ';
|
|
@@ -232,7 +243,19 @@ function template_reported_posts()
|
|
|
<ul class="quickbuttons">
|
|
|
<li><a href="', $report['report_href'], '">', $details_button, '</a></li>
|
|
|
<li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=closed' : '', ';ignore=', (int) !$report['ignore'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" ', !$report['ignore'] ? 'onclick="return confirm(\'' . $txt['mc_reportedp_ignore_confirm'] . '\');"' : '', '>', $report['ignore'] ? $unignore_button : $ignore_button, '</a></li>
|
|
|
- <li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=closed' : '', ';close=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a></li>
|
|
|
+ <li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=closed' : '', ';close=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a></li>';
|
|
|
+
|
|
|
+ // Delete message button.
|
|
|
+ if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])))
|
|
|
+ echo '
|
|
|
+ <li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'] ,'.0;msg=', $report['topic']['id_msg'] ,';modcenter;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'' , $txt['mc_reportedp_delete_confirm'] , '\');">', $delete_button, '</a></li>';
|
|
|
+
|
|
|
+ // Ban this user button.
|
|
|
+ if (!$report['closed'] && !empty($context['report_manage_bans']))
|
|
|
+ echo '
|
|
|
+ <li><a href="', $scripturl, '?action=admin;area=ban;sa=add', (!empty($report['author']['id']) ? ';u='. $report['author']['id'] : ';msg='. $report['topic']['id_msg']) ,';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>';
|
|
|
+
|
|
|
+ echo '
|
|
|
<li>', !$context['view_closed'] ? '<input type="checkbox" name="close[]" value="' . $report['id'] . '" class="input_check" />' : '', '</li>
|
|
|
</ul>
|
|
|
</div>
|