[ABD] Report2Topic

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC] Report2Topic

Post by Erik Frèrejean »

As I'm kinda bored today, I'll give this one an other shot. Please keep in mind that I'll be rewriting the thing ;).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
spacefish
Registered User
Posts: 173
Joined: Mon Oct 09, 2006 8:48 am

Re: [DEV] Report2Topic

Post by spacefish »

Great news - thanks! :D
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [RC] Report2Topic

Post by imkingdavid »

Erik Frèrejean wrote:As I'm kinda bored today, I'll give this one an other shot. Please keep in mind that I'll be rewriting the thing ;).
alright, saves me a lot of work. :) Good luck!
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [DEV] Report2Topic

Post by stokerpiller »

Great, lets see what will happen on a day where Erik is bored :mrgreen:
I am done with phpBB
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [DEV] Report2Topic

Post by Erik Frèrejean »

To keep you guys informed, I've finished rewriting the current report feature into a more flexible system. I think that I'll be able to get some code available before my holiday next week.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [DEV] Report2Topic

Post by stokerpiller »

Sounds great Erik, have you considered PMs?
Since 3.0.6 they can be reported too.
I am done with phpBB
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [DEV] Report2Topic

Post by Erik Frèrejean »

With the system I've got in mind PMs should work as well, although I can't say for sure until I've started programming that part.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Report2Topic

Post by imkingdavid »

Is it possible in the new version to define a post template with some token/variable things so you can change the layout of the post and what information is included?

Also, can you set which forum a topic is posted in per forum or is it just one overall?
Thanks!
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [DEV] Report2Topic

Post by Erik Frèrejean »

imkingdavid wrote:Is it possible in the new version to define a post template with some token/variable things so you can change the layout of the post and what information is included?
Interesting idea, I'll give it a look once I've setup the frame work for this thing but looking at it I think it will be pretty easy to implement.
imkingdavid wrote:Also, can you set which forum a topic is posted in per forum or is it just one overall?
Thanks!
You mean that reports from forum "w" will be posted in form "Y" and from forum "X" in forum "Z"?
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [DEV] Report2Topic

Post by Erik Frèrejean »

Unfortunately I don't have a svn/git repository setup at the moment. For those that are interested in some off my plans you can have a look at the current diff. Don't bother installing it as it won't do a thing ;).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Report2Topic

Post by imkingdavid »

Erik Frèrejean wrote:
imkingdavid wrote:Is it possible in the new version to define a post template with some token/variable things so you can change the layout of the post and what information is included?
Interesting idea, I'll give it a look once I've setup the frame work for this thing but looking at it I think it will be pretty easy to implement.
That'd be great, but of course if it doesn't make the cut, no biggie. I'm good with editing the language file or whatever manually if need be.
Erik Frèrejean wrote:
imkingdavid wrote:Also, can you set which forum a topic is posted in per forum or is it just one overall?
Thanks!
You mean that reports from forum "w" will be posted in form "Y" and from forum "X" in forum "Z"?
Exactly. For instance, I have a MOD Team and a Styles Team on my board (along side the global moderator team). Instead of piling all reports into a general reports area, I could have a reports category and then a MOD Forum Reports area for reports from the MODs section, and a Styles Forum Reports area for reports from the Styles section.

The reason I ask this is because it's similar to how it's set up on a vBulletin forum that I am staff on and I think it's a quite handy feature. :)
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [DEV] Report2Topic

Post by Erik Frèrejean »

imkingdavid wrote:
Erik Frèrejean wrote:
imkingdavid wrote:Also, can you set which forum a topic is posted in per forum or is it just one overall?
Thanks!
You mean that reports from forum "w" will be posted in form "Y" and from forum "X" in forum "Z"?
Exactly. For instance, I have a MOD Team and a Styles Team on my board (along side the global moderator team). Instead of piling all reports into a general reports area, I could have a reports category and then a MOD Forum Reports area for reports from the MODs section, and a Styles Forum Reports area for reports from the Styles section.

The reason I ask this is because it's similar to how it's set up on a vBulletin forum that I am staff on and I think it's a quite handy feature. :)
I never looked at it that way, certainly something thats nice to have. I'm not sure whether it will make 2.0.0 kinda depends on the amount of work this thing will take certainly now I really want to finish thing thing finally ;). But if it won't make .0 it almost certainly will make .1 :)
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Report2Topic

Post by imkingdavid »

That's great to hear! :) Good luck with development!
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Pseudonym
Registered User
Posts: 173
Joined: Mon Jan 26, 2004 8:37 am

Re: [DEV] Report2Topic

Post by Pseudonym »

Hey Erik, I've already adapted this mod for my own board. It handles both reported posts and reported PMs using phpbb 3.0.6. I haven't tested it on any other versions.

Features:
* Quick links to reporter and poster profiles page
* Quick links to send a PM to reporter and/or poster
* Quick link to view the report in the MCP
* Shows recent PM history (if any) to give mods an idea of conversation context


Here's the code - feel free to use anything that may be relevant.

Disclaimer: I haven't done much with php classes before, and had a few issues with variable scope, so apologies for any unusual workarounds you may find! :P

-------------------------------------------------------

To anyone installing this:

Note that this is a mod of a mod, not a standalone installation. You will still need to install Erik's original Report2Topic mod first, then install this over the top. (This is because there are a few config settings to be saved to the database, an Admin Control Panel module, etc, etc - and Erik's mod will do all that for you.)



OPEN report.php

FIND:

Code: Select all

    meta_refresh(3, $redirect_url);

    $message = $lang_success . '<br /><br />' . sprintf($lang_return, '<a href="' . $redirect_url . '">', '</a>');
    trigger_error($message);
 
BEFORE, ADD:

Code: Select all

    // Report2Topic
    // Add:
    include($phpbb_root_path . 'includes/mods/report2topic.' . $phpEx);
    new report2topic($report_id);
    // End Report2Topic

 
CREATE or REPLACE includes/mods/report2topic.php with the following:

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id: report2topic.php 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

include ($phpbb_root_path . 'includes/functions_posting.' . $phpEx);

/**
* Permission/Auth class
* @package phpBB3
*/
class report2topic
{
	var $post_data	 = array();
	var $report_data = array();
	static $pm_history	 = array();
	
	/**
	* Global constructor
	*/
	function __construct($report_id)
	{
		global $db;
		
		// Get the report data
		$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour, r.pm_id
				FROM (' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . " u)
				WHERE r.report_id = {$report_id}
					AND rr.reason_id = r.reason_id
					AND r.user_id = u.user_id
				ORDER BY report_closed ASC";
		$result = $db->sql_query_limit($sql, 1, 0);
		$this->report_data = $db->sql_fetchrow($result);
		$db->sql_freeresult($result);
		
		if ($this->report_data['post_id'] == 0)
		{
			$msg_id = $this->report_data['pm_id'];
			$is_post = false;
		}
		else
		{
			$msg_id = $this->report_data['post_id'];
			$is_post = true;
		}
		
		// Get the post data
		$this->post_data = $this->get_post_data($msg_id, $is_post);
		
		// Sort pm_history into chronological order
		ksort(report2topic::$pm_history);

		// post it
		$this->post_report($is_post);
	}

	
	/**
	* Make the actual post
	*/
	function post_report($is_post)
	{
		global $auth, $config, $user;
		global $phpEx;
		
		// First start the post "bot"
		$this->start_post_bot($auth, $user);
		
		// Now prepare the post data
		$user->add_lang('mods/report_to_topic');

		$reporter	= (!empty($this->report_data['user_colour']) ? '[color=#' . $this->report_data['user_colour'] . ']' . $this->report_data['username'] . '[/color]' : $this->report_data['username']);
		$poster		= (!empty($this->post_data['user_colour']) ? '[color=#' . $this->post_data['user_colour'] . ']' . $this->post_data['username'] . '[/color]' : $this->post_data['username']);

		decode_message($this->post_data['post_text'], $this->post_data['bbcode_uid']);
		$reason_text	= '[b]' . (isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($this->report_data['reason_title'])]) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($this->report_data['reason_title'])] : $this->report_data['reason_title']) . "[/b]\n" . (!empty($this->report_data['report_text']) ? $this->report_data['report_text'] : $this->report_data['reason_description']);

		// The [url] tag doesn't allow relative uri, so first build the complete url to the board
		$site		= $config['server_protocol'] . $config['server_name'] . ((!empty($config['server_port']) && $config['server_port'] != '80') ? ':' . $config['server_port'] : '') . $config['script_path'];
		
		$report_link	= append_sid("$site/mcp.$phpEx", array('f' => $this->post_data['forum_id'], 'r' => $this->report_data['report_id'], 'i' => 'reports', 'mode' => 'report_details'));
		
		// Now, is this a post or a PM? If it's a post...
		if ($is_post)
		{
			$post_link	= append_sid("$site/viewtopic.$phpEx", array('f' => $this->post_data['forum_id'], 'p' => $this->post_data['post_id'])) . '#p' . $this->post_data['post_id'];

			$post	= sprintf($user->lang['R2T_POST'],
						$reporter,
						append_sid("$site/ucp.$phpEx", array('i' => 'pm', 'mode' => 'compose', 'u' =>  $this->report_data['user_id'])), // PM
						append_sid("$site/memberlist.$phpEx", array('mode' => 'viewprofile', 'u' => $this->report_data['user_id'])), // View Profile
						$post_link,
						censor_text($this->post_data['post_subject']),
						$this->post_data['forum_name'],
						$poster,
						append_sid("$site/ucp.$phpEx", array('i' => 'pm', 'mode' => 'compose', 'u' => $this->post_data['user_id'])), // PM
						append_sid("$site/memberlist.$phpEx", array('mode' => 'viewprofile', 'u' => $this->post_data['user_id'])), // View Profile
						$report_link,
						$reason_text,
						$this->post_data['post_text']
						);
			$post_title	= sprintf($user->lang['R2T_TITLE'], censor_text($this->post_data['post_subject']));
		
		}
		else
		{
		// Must be a PM then...
		
			// Build the post. Start with PM details
			$post		= sprintf($user->lang['R2T_PM_POST'],
							$reporter,
							append_sid("$site/ucp.$phpEx", array('i' => 'pm', 'mode' => 'compose', 'u' => $this->report_data['user_id'])), // PM
							append_sid("$site/memberlist.$phpEx", array('mode' => 'viewprofile', 'u' => $this->report_data['user_id'])), // View Profile
							$poster,
							append_sid("$site/ucp.$phpEx", array('i' => 'pm', 'mode' => 'compose', 'u' => $this->post_data['user_id'])), // PM
							append_sid("$site/memberlist.$phpEx", array('mode' => 'viewprofile', 'u' => $this->post_data['user_id'])), // View Profile
							$report_link,
							$reason_text
							);
			
			// Support PMs with multiple recipients
			foreach (report2topic::$pm_history[$this->post_data['msg_id']]['to_users'] as $to)
			{
				$to_users[] = $to['to_username'];
			}

			// Then add the PM itself
			$post		.= sprintf($user->lang['R2T_PM_POST_TEMPLATE'],
							$this->post_data['message_subject'],
							$user->format_date($this->post_data['message_time']),
							$this->post_data['username'],
							implode(', ', $to_users),
							$this->post_data['message_text']
							);
			$post		.= (count(report2topic::$pm_history) <= 1 ? $user->lang['R2T_PM_NO_HISTORY'] : '') . $user->lang['R2T_PM_POST_FOOTER'];
			
	
			$post_title	= sprintf($user->lang['R2T_PM_TITLE'], censor_text($this->post_data['message_subject']));

		}
		
		

		// variables to hold the parameters for submit_post
		$poll = $uid = $bitfield = $options = ''; 
		generate_text_for_storage($post, $uid, $bitfield, $options, true, true, false);

		// Create the data array
		$data = array(
			'forum_id'			=> $config['r2t_forum'],
			'topic_id'			=> 0,
			'post_id'			=> 0,
			
			'icon_id'			=> false,
			'enable_bbcode'		=> true,
			'enable_smilies'	=> true,
			'enable_urls'		=> true,
			'enable_sig'		=> true,
			'message'			=> $post,
			'message_md5'		=> md5($post),
			'bbcode_bitfield'	=> $bitfield,
			'bbcode_uid'		=> $uid,
			'post_edit_locked'	=> 0,
			'topic_title'		=> $post_title,
			'notify_set'		=> false,
			'notify'			=> false,
			'post_time'			=> time(),
			'forum_name'		=> '',
			'enable_indexing'	=> true,
			
			'topic_approved'	=> true,
			'post_approved'		=> true,
		);
		
		submit_post('post', $post_title, '', POST_NORMAL, $poll, $data);
		
		
		// That's the report done. Now we just need to post PM history if there is any	
		if (!$is_post && count(report2topic::$pm_history) > 1)
		{
			$post = '';
			// Header
			$post = $user->lang['R2T_PM_HISTORY'];
			foreach (report2topic::$pm_history as &$pm)
			{
				
				decode_message($pm['message_text'], $pm['bbcode_uid']);
				$to_users = array();
				foreach ($pm['to_users'] as $to)
				{
					$to_users[] = $to['to_username'];
				}
				
				// Then add the PM itself
				$post		.= sprintf($user->lang['R2T_PM_POST_TEMPLATE'],
								$pm['message_subject'],
								$user->format_date($pm['message_time']),
								$pm['authorname'],
								implode(', ', $to_users),
								$pm['message_text']
								);
					
			}
			
			
			$poll = $uid = $bitfield = $options = ''; 
			generate_text_for_storage($post, $uid, $bitfield, $options, true, true, false);
			$data['message']			= $post;
			$data['message_md5']		= md5($post);
			$data['bbcode_bitfield']	= $bitfield;
			$data['bbcode_uid']			= $uid;

			submit_post('reply', $post_title, '', POST_NORMAL, $poll, $data);
			
		}

		
	}
	
	/**
	* Create a new user and auth setting for the "bot" that is used to post the reports
	*/
	function start_post_bot(&$auth, &$user)
	{
		global $config, $db;
		
		$sql = 'SELECT *
				FROM ' . USERS_TABLE . '
				WHERE user_id = ' . (int) $config['r2t_poster'];
		$result		= $db->sql_query_limit($sql, 1, 0);
		$new_user	= $db->sql_fetchrow($result);
		$db->sql_freeresult($result);
		
		// Setup the bot
		$user->data	= array_merge($user->data, $new_user);
		$auth->acl($user->data);
		$user->ip = '0.0.0.0';
	}


	/**
	* Get the post data
	* Based on the get_post_data function in mcp.php
	*/
	function get_post_data($post_id, $is_post)
	{
		global $db;
		
		// If reported message is a post
		if ($is_post)
		{
			
			$sql_ary = array(
				'SELECT'	=> 'f.forum_name, p.post_id, p.topic_id, p.forum_id, p.post_subject, p.post_text, p.bbcode_uid, u.user_id, u.username, u.user_colour',
			
				'FROM'		=> array(
					POSTS_TABLE	=> 'p',
					USERS_TABLE	=> 'u',
				),
				
				'LEFT_JOIN'	=> array(
					array(
						'FROM'	=> array(FORUMS_TABLE => 'f'),
						'ON'	=> 'f.forum_id = p.forum_id',
					),
				),
				
				'WHERE'		=> 'p.post_id = ' . (int) $post_id . '
					AND u.user_id = p.poster_id',
			);
			
			$sql = $db->sql_build_query('SELECT', $sql_ary);
			$result		= $db->sql_query_limit($sql, 1, 0);
			$post_data	= $db->sql_fetchrow($result);
			$db->sql_freeresult($result);
		
		}
		else
		{
		// If reported message is a PM
		
			// Grab the offending PM
			$sql = 'SELECT pm.*, pm.message_text as post_text, u.user_id, u.username
				FROM ' . PRIVMSGS_TABLE . ' pm
				INNER JOIN ' . PRIVMSGS_TO_TABLE . ' pt ON pt.msg_id = pm.msg_id
				INNER JOIN ' . USERS_TABLE . ' u ON u.user_id = pm.author_id
				WHERE pm.msg_id = ' . $post_id;
			$result = $db->sql_query($sql);
			$post_data = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);
			
			// who was this PM was sent to?
			$sql = 'SELECT pt.user_id AS to_user_id, u.username AS to_username
				FROM ' . PRIVMSGS_TO_TABLE . ' pt
				INNER JOIN ' . USERS_TABLE . ' u ON u.user_id = pt.user_id
				WHERE msg_id = ' . $post_id . '
					AND pt.folder_id != -1
				ORDER BY username';
			$to_result = $db->sql_query($sql);
			while ($to_data = $db->sql_fetchrow($to_result))
			{
				report2topic::$pm_history[$post_id]['to_users'][] = $to_data; // Add to_data variables into existing set
			}
			$db->sql_freeresult($to_result);
			
			
			// Grab the last few PMs in this conversation
			if ($post_data['root_level'] != 0)
			{
				$sql_where = 'root_level = ' . $post_data['root_level'] . ' OR msg_id = ' . $post_data['root_level'];
			} else {
				$sql_where = 'msg_id = ' . $post_id;
			}
			$sql = 'SELECT pm.*, u.username AS authorname
					FROM ' . PRIVMSGS_TABLE . ' pm
					INNER JOIN ' . USERS_TABLE . ' u ON u.user_id = pm.author_id
					WHERE ' . $sql_where . '
					ORDER BY message_time
					LIMIT 5'; // We want to see some history, but not masses of it
			$result = $db->sql_query($sql);
			while ($data = $db->sql_fetchrow($result))
			{	
				report2topic::$pm_history[$data['msg_id']] = $data;
				
				// While we're at it, find out who each PM was sent to
				$sql = 'SELECT pt.user_id AS to_user_id, u.username AS to_username
					FROM ' . PRIVMSGS_TO_TABLE . ' pt
					INNER JOIN ' . USERS_TABLE . ' u ON u.user_id = pt.user_id
					WHERE msg_id = ' . $data['msg_id'] . '
						AND pt.folder_id != -1
						AND pt.user_id != 1
					ORDER BY username';
				$to_result = $db->sql_query($sql);
				while ($to_data = $db->sql_fetchrow($to_result))
				{
					report2topic::$pm_history[$data['msg_id']]['to_users'][] = $to_data; // Add to_data variables into existing set
				}
				$db->sql_freeresult($to_result);
			}
			$db->sql_freeresult($result);
			
		}
		
		return $post_data;
			
	}
		
	/**
	* Just for php4 compatibility
	*/
	function report2topic($report_id)
	{
		$this->__construct($report_id);
	}
}
?>
CREATE or REPLACE language/en/mods/report_to_topic.php with the following:

Code: Select all

<?php
/**
*
* acp_users [English]
*
* @package language
* @version $Id: report_to_topic.php
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
    exit;
}

if (empty($lang) || !is_array($lang))
{
    $lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
    'R2T_TITLE'    => 'Reported post: %s',
    'R2T_POST'    => 'This post is created to notify you of a reported post. The details of the post are listed below:
[b]Reported by:[/b] %1$s [size=80][url=%2$s][Send PM][/url] [url=%3$s][View profile][/url][/size]
[b]Reported post:[/b] [url=%4$s]%5$s[/url]
[b]Posted in:[/b] %6$s
[b]Poster:[/b] %7$s [size=80][url=%8$s][Send PM][/url] [url=%9$s][View profile][/url][/size]
[url=%10$s]Click to view this report in the Moderator Control Panel[/url]

[b]Report reason:[/b]
[quote]%11$s[/quote]

[b]Original post:[/b]
[quote]%12$s[/quote]

[size=80][i]This is an automatically created message[/i][/size]',
));


$lang = array_merge($lang, array(
    'R2T_PM_TITLE'    => 'Reported PM: %s',
    'R2T_PM_POST'    => 'This post is created to notify you of a reported PM. The details of the PM are listed below:
[b]Reported by:[/b] %1$s [size=80][url=%2$s][Send PM][/url] [url=%3$s][View profile][/url][/size]
[b]PM sent by:[/b] %4$s [size=80][url=%5$s][Send PM][/url] [url=%6$s][View profile][/url][/size]
[url=%7$s]Click to view this report in the Moderator Control Panel[/url]

[b]Report reason:[/b]
[quote]%8$s[/quote]',
    'R2T_PM_POST_TEMPLATE'    => '
    
[quote][size=90][b]Subject:[/b] %1$s
[b]Sent at:[/b] %2$s
[b]From:[/b] %3$s
[b]To:[/b] %4$s[/size]
__________________________________________

%5$s[/quote]',
    'R2T_PM_POST_FOOTER'    => '

[size=80][i]This is an automatically created message[/i][/size]',
    'R2T_PM_NO_HISTORY'    => "\nThere was no history for this conversation.\n",
    'R2T_PM_HISTORY'        => "The conversation history is as follows:\n",
));


?>
Hope that helps someone. ;)
Last edited by Pseudonym on Sat Feb 27, 2010 2:12 am, edited 1 time in total.
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [DEV] Report2Topic

Post by stokerpiller »

Very very nice Pseudonym

One problem though.
When reporting a PM I get this debug error:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/mods/report2topic.php  on line 93: Undefined index: forum_id
And the report for the PM is posted in the last created report topic and not its own.
I am done with phpBB
Locked

Return to “[3.0.x] Abandoned MODs”