[BETA] Report to Topic

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

[BETA] Report to Topic

Post by david63 » Thu Apr 02, 2015 7:49 am

phpbb3-extension-reporttotopic

Description:
This extension enhances phpBB's reporting system by introducing a set of new features.

Mod port:
This is a port of the Report to Topic mod by Danielx64

Features:
  • Each forum can designate another forum to hold the posted report topics for reported posts in that forum, i.e. Forum 1 can designate Forum 1 Reports as its report forum, while Forum 2 can then designate Forum 2 Reports.
  • NOTE: This is helpful for multiple reasons. For one, it ensures that users who do not have permission to view reports from a certain forum in the MCP also cannot view reports from that forum in the reports forum, as permissions can be set on the forums. Secondly, it also helps with organization so that the reports forum doesn't get overly cluttered.
  • Fully customizable report information. An admin can define which information is shown in the report topic by creating a template through the ACP, with the use of tokens the admin can add/remove certain information.
Languages:
en

Status:
0.1.1-beta

Installation:
  • Download the latest release and unzip it.
  • Copy the entire contents from the unzipped folder to root/ext/
  • Navigate in the ACP to Customise -> Manage extensions.
  • Find Report to topic under "Disabled Extensions" and click Enable.
Repository:
https://github.com/david63/david63-reporttotopic

ADVANCED NOTICE:
This version of this extension will not work with phpBB 3.2 due to core changes
Last edited by david63 on Sat Feb 20, 2016 9:00 am, edited 5 times in total.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Report to Topic

Post by david63 » Thu Apr 02, 2015 7:50 am

To add the required event do the following.

Open:
report.php

Find:

Code: Select all

meta_refresh(3, $redirect_url);
Before add:

Code: Select all

/**
		* This event allows you process the report data in an extension
		*
		* @event core.report_post_submit
		* @var	array	forum_data	All data available from the forums table on this post's forum
		* @var	int		post_id		ID of the post
		* @var	int		pm_id		ID of the PM1
		*/
		$vars = array(
			'forum_data',
			'post_id',
			'pm_id',
		);
		extract($phpbb_dispatcher->trigger_event('core.report_post_submit', compact($vars)));
Note : This event was added in 3.1.5
Last edited by david63 on Sat Feb 20, 2016 8:59 am, edited 2 times in total.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Korkel
Registered User
Posts: 391
Joined: Mon Jun 02, 2014 7:09 am
Location: ~/home/Liz/Desktop
Name: Liz Aalderink
Contact:

Re: [DEV] Report to Topic

Post by Korkel » Thu Apr 02, 2015 8:26 am

Thank you! <3

Will it get a default form what gets filled out for example:
Reporter name: <name>
Reported post: <link>
Reason for report: <category>
Extra information form: <content>

Thank you.
"If you lose your left arm, your right arm will be left."
“The most important property of a program is whether it accomplishes the intention of its user.”
Image

Holger
Registered User
Posts: 1756
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [DEV] Report to Topic

Post by Holger » Thu Apr 02, 2015 9:07 am

:D
Select a logo from any location, either on your board or from anywhere on the Internet.
:D

Thanks for starting this!

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Report to Topic

Post by david63 » Thu Apr 02, 2015 9:15 am

Holger wrote: :D

Select a logo from any location, either on your board or from anywhere on the Internet.
The "copy & paste" gremlin at work again :shock:
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Report to Topic

Post by david63 » Thu Apr 02, 2015 2:56 pm

Update

I have the ACP working and reporting a post goes to a topic.

I still have to test reporting PMs

This extension will require an additional event, so any release will be some way off - although I can release a beta version but it will require a core edit to add the event pending being incorporated.

=============================================

A question for anyone who has been using this as a MOD.

When there is a reported post does the link in the post go to the topic? And are there any other such instances that I should be aware of?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Stoker 4.0
Registered User
Posts: 1483
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [DEV] Report to Topic

Post by Stoker 4.0 » Thu Apr 02, 2015 3:36 pm

david63 wrote:Each forum can designate another forum to hold the posted report topics for reported posts in that forum, i.e. Forum 1 can designate Forum 1 Reports as its report forum, while Forum 2 can then designate Forum 2 Reports.
I would like to see a global function were you can set the report forum for all forums. Dont know if its allready there ;)
david63 wrote:When there is a reported post does the link in the post go to the topic? And are there any other such instances that I should be aware of?
Link should go to the reported post.

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Report to Topic

Post by david63 » Thu Apr 02, 2015 3:44 pm

Stoker 4.0 wrote:I would like to see a global function were you can set the report forum for all forums.
That is the default
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [BETA] Report to Topic

Post by david63 » Fri Apr 03, 2015 12:51 pm

I have just updated this to beta and released the first version (0.1.0-beta) - see first post

I still have a few internal things to work on, but nothing that should prevent it from working (I hope :o )
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Puchahawa
Registered User
Posts: 768
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [BETA] Report to Topic

Post by Puchahawa » Fri Apr 03, 2015 3:41 pm

Hi david, Just doing some testing using phpbb 3.1.3 board and set the ext so it would put topic and pm's to the same forum. That was the only thing I changed in the settings other than unclicking show signatures. The settings were accepted no problem. So I went to one of the topics and clicked the report button. When I went to submit the report it had this error. I did do the edit to the report.php file as needed.

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/includes/message_parser.php on line 24: include(includes/bbcode.): failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/includes/message_parser.php on line 24: include(): Failed opening 'includes/bbcode.' for inclusion (include_path='.;C:/php/pear')

( ! ) Fatal error: Class 'bbcode' not found in C:\wamp\www\phpBB3\includes\message_parser.php on line 32
Call Stack
#    Time    Memory    Function    Location
1    0.0020    190032    {main}( )    ..\report.php:0
2    1.0391    8504744    phpbb\event\dispatcher->trigger_event( )    ..\report.php:302
3    1.0391    8504920    phpbb\event\dispatcher->dispatch( )    ..\dispatcher.php:46
4    1.0391    8504920    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch( )    ..\dispatcher.php:60
5    1.0391    8505832    Symfony\Component\EventDispatcher\EventDispatcher->dispatch( )    ..\ContainerAwareEventDispatcher.php:167
6    1.0391    8506008    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch( )    ..\EventDispatcher.php:53
7    1.0391    8506208    call_user_func:{C:\wamp\www\phpBB3\vendor\symfony\event-dispatcher\Symfony\Component\EventDispatcher\EventDispatcher.php:164} ( )    ..\EventDispatcher.php:164
8    1.0391    8506712    david63\reporttotopic\event\listener->submit_report_post( )    ..\EventDispatcher.php:164
9    1.0751    8797568    include( 'C:\wamp\www\phpBB3\includes\message_parser.php' )    ..\listener.php:289

User avatar
david63
Registered User
Posts: 16548
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [BETA] Report to Topic

Post by david63 » Fri Apr 03, 2015 4:33 pm

That error is saying that you have a problem or missing includes/bbcode.php file
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Puchahawa
Registered User
Posts: 768
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [BETA] Report to Topic

Post by Puchahawa » Fri Apr 03, 2015 4:36 pm

hmmm, the file is there. I'll try replacing it with a fresh install version and see what happens.

Korkel
Registered User
Posts: 391
Joined: Mon Jun 02, 2014 7:09 am
Location: ~/home/Liz/Desktop
Name: Liz Aalderink
Contact:

Re: [BETA] Report to Topic

Post by Korkel » Fri Apr 03, 2015 4:41 pm

Can the post be posted by a spefic user?
"If you lose your left arm, your right arm will be left."
“The most important property of a program is whether it accomplishes the intention of its user.”
Image

User avatar
Puchahawa
Registered User
Posts: 768
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [BETA] Report to Topic

Post by Puchahawa » Fri Apr 03, 2015 5:17 pm

david63 wrote:That error is saying that you have a problem or missing includes/bbcode.php file
I replaced the includes/bbcode.php file with a fresh downloaded 3.1.3 version, disabled the extension and deleted the data. Purged the boards cache just in case. Enabled the extension again, then tried to report a post and got the same error. So I tried to report a pm. same error. The reports are going through even through the error shows up and the new topic reporting the post/pm does not get created.

I tried replacing the includes/message_parser.php file from the fresh install files as that was referenced in the error also. no change.

Any other ideas? :)

just for reference purposes I have the following extensions on my test board.

Code: Select all

Advanced BBCode Box	3.1.0	
Announcements on index	1.0.1	
Auto Database Backup	1.1.0	
Board Announcements	1.0.2	
Cron Status	3.1.1	
FAQ manager	1.0.0	
modernpninfo	2.0.0	
Pages	1.0.2	
Password Strength	1.1.0	
Permission: Read other users' topics	0.0.5-dev	
phpBB Directory	1.0.0-dev	
Profile side switcher	0.0.1	
Quickedit	1.0.0	
Quick Login	1.0.5	
Report to topic	0.1.0-beta	
Reset login attempts	1.0.2	
Topic Solved	2.0.0-rc1

Korkel
Registered User
Posts: 391
Joined: Mon Jun 02, 2014 7:09 am
Location: ~/home/Liz/Desktop
Name: Liz Aalderink
Contact:

Re: [BETA] Report to Topic

Post by Korkel » Fri Apr 03, 2015 5:24 pm

I've tried set it up, but reports don't get posted in a forum.
"If you lose your left arm, your right arm will be left."
“The most important property of a program is whether it accomplishes the intention of its user.”
Image

Post Reply

Return to “Extensions in Development”