Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$report_email_yes = ( $new['report_email'] ) ? 'checked="checked"' : '';
$report_email_no = ( !$new['report_email'] ) ? 'checked="checked"' : '';
#
#-----[ FIND ]------------------------------------------
#
"L_RESET" => $lang['Reset'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_REPORT_EMAIL' => $lang['Report_email'],
'REPORT_EMAIL_YES' => $report_email_yes,
'REPORT_EMAIL_NO' => $report_email_no,
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
if( $userdata['session_logged_in'] )
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// report post
//
if ( isset($HTTP_GET_VARS['report']) || isset($HTTP_POST_VARS['report']) )
{
include($phpbb_root_path . 'includes/functions_report.'.$phpEx);
$comments = ( !empty($HTTP_POST_VARS['comments']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['comments'])) : '';
if ( empty($comments) )
{
// show form to add comments about topic
$page_title = $lang['Report_post'] . ' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'report_post.tpl')
);
$template->assign_vars(array(
'TOPIC_TITLE' => $topic_title,
'POST_ID' => $post_id,
'U_VIEW_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?' . POST_TOPIC_URL . '=' . $topic_id),
'L_REPORT_POST' => $lang['Report_post'],
'L_COMMENTS' => $lang['Comments'],
'L_SUBMIT' => $lang['Submit'],
'S_ACTION' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?report=true&' . POST_POST_URL . '=' . $post_id))
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
exit;
}
else
{
if ( !report_flood() )
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
// insert the report
insert_report($post_id, $comments);
// email the report if need to
if ( $board_config['report_email'] )
{
email_report($forum_id, $post_id, $topic_title, $comments);
}
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$message = $lang['Post_reported'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
}
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('postrow', array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if ( $userdata['session_logged_in'] )
{
$report_img = '<a href="' . append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?report=true&' . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '"><img src="' . $images['icon_report'] . '" border="0" width="20" height="20" alt="' . $lang['Report_post'] . '" title="' . $lang['Report_post'] . '" /></a>';
}
else
{
$report_img = '';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
'REPORT_IMG' => $report_img,
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . $phpbb_root_path . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path . 'includes/functions_report.'.$phpEx);
$report_link = ( $userdata['user_level'] >= ADMIN ) ? ' <a href="' . append_sid($phpbb_root_path . 'viewpost_reports.'.$phpEx) . '">' . sprintf($lang['Post_reports_cp'], reports_count()) . '</a> ' : '';
#
#-----[ FIND ]------------------------------------------
#
'ADMIN_LINK' => $admin_link)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$admin_link
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
$report_link .
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] = 'A Critical Error Occurred';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Report Post
//
$lang['Post_reports_cp'] = 'There are %s new Reported Post(s)';
$lang['Closed'] = 'Closed';
$lang['Close'] = 'Close';
$lang['Open'] = 'Open';
$lang['All'] = 'All';
$lang['Display'] = 'Display only';
$lang['Report_post'] = 'Report Post';
$lang['Comments'] = 'Comments';
$lang['Reporter'] = 'Reporter';
$lang['Status'] = 'Status';
$lang['Select_one'] = 'Select One';
$lang['Opt_in'] = 'Opt in to recieve emails when a report is submitted';
$lang['Opt_out'] = 'Opt out so you don\'t recieve emails when a report is submitted';
$lang['Post_reported'] = 'Post report submitted successfully.';
$lang['Close_success'] = 'Reports were Opened/Closed successfully.';
$lang['Opt_success'] = 'You have opt out/in successfully.';
$lang['Delete_success'] = 'Reports were deleted successfully.';
$lang['Click_return_reports'] = 'Click %shere%s to return to the Report Posts control panel.';
$lang['Report_email'] = 'Send Email when Post Reported';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES} <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_REPORT_EMAIL}</td>
<td class="row2"><input type="radio" name="report_email" value="1" {REPORT_EMAIL_YES} /> {L_YES} <input type="radio" name="report_email" value="0" {REPORT_EMAIL_NO} /> {L_NO}</td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['voting_graphic'][4] = "$current_template_images/voting_bar.gif";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$images['icon_report'] = "$current_template_images/icon_report.gif";
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.IP_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
{postrow.REPORT_IMG}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM