Come per l'altra richiesta ti allego file originali screenshot e riporto di seguito l'install
Il comando si trovava integrato con il bbcode code, ma sinceramente se si potesse utilizzare un nuovo bbcode sarebbe meglio.
dopo avere confermato
ammetto che la traduzione faceva effettivamente un pò schifo...
Ad ogni modo l'autore del post in cui era contenuto il bbcode interessato, riceveva un messaggio privato in cui veniva avvisato della segnalazione
Screenshot PCA/permessi/permessi forum-gruppi
Files to edit
viewtopic.php,
language/en/common.php
Included files
root/report_code.php
Copy: root/report_code.php
To:
report_code.php
Codice: Seleziona tutto
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2012 [email protected] www.phpbb3hacks.com
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$post_id = request_var('p', 0);
if (!$post_id)
{
trigger_error('NO_POST_SELECTED');
}
$sql = 'SELECT poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $post_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=".$row['forum_id']."&p=$post_id") . "#p$post_id";
$sql = 'SELECT username, user_colour
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $row['poster_id'];
$result = $db->sql_query($sql);
$row2 = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (confirm_box(true))
{
$subject = $user->lang('REPORT_CODE_SUBJECT');
$message = sprintf($user->lang['REPORT_CODE_MESSAGE'], get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), generate_board_url() . "/viewtopic.{$phpEx}?f=".$row['forum_id']."&p={$post_id}#p{$post_id}");
$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($message, $uid, $bitfield, $options, true, true, true);
$data = array(
'address_list' => array ('u' => array($row['poster_id'] => 'to')),
'from_user_id' => $user->data['user_id'],
'from_username' => $user->data['username'],
'icon_id' => 0,
'from_user_ip' => $user->data['user_ip'],
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => false,
'message' => $message,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid
);
submit_pm('post', $subject, $data, false);
meta_refresh(3, $redirect_url);
$message = sprintf($user->lang['REPORT_CODE_SUCCESS'], get_username_string('full', $row['poster_id'], $row2['username'], $row2['user_colour'])) . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
trigger_error($message);
}
else
{
$s_hidden_fields = build_hidden_fields(array(
'u' => $row['poster_id'],
'f' => $row['forum_id'],
'p' => $post_id
));
confirm_box(false, sprintf($user->lang['REPORT_CODE_CONFIRM'], get_username_string('full', $row['poster_id'], $row2['username'], $row2['user_colour'])), $s_hidden_fields);
}
redirect($redirect_url);
?>
Open: viewtopic.php
Find
Tip: This may be a partial find and not the whole line.
Codice: Seleziona tutto
//
$postrow = array(
Add before
Tip: Add these lines on a new blank line before the preceding line(s) to find.
Codice: Seleziona tutto
if (strstr($message, $user->lang['CODE'].': '))
{
$message = str_replace($user->lang['SELECT_ALL_CODE'].'</a>', $user->lang['SELECT_ALL_CODE'].'</a> • <a href="'.generate_board_url() . "/report_code.{$phpEx}?p=".$row['post_id'].'">'.$user->lang['REPORT_CODE'].'</a>', $message);
}
Open: language/en/common.php
Find
Tip: This may be a partial find and not the whole line.
Codice: Seleziona tutto
'7_DAYS' => '7 days',
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.
Codice: Seleziona tutto
'REPORT_CODE' => 'Report dead links',
'REPORT_CODE_SUBJECT' => 'Notification about dead links in your post',
'REPORT_CODE_MESSAGE' => '%1$s has notified you about dead links in your post %2$s',
'REPORT_CODE_CONFIRM' => 'Are you sure you want to notify %s about dead links in his post?',
'REPORT_CODE_SUCCESS' => '%s has been notified about dead links in his post.',