MyBB Community Forums

Full Version: Report Once
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Plugin Name: Report Once
Plugin Version: 1.1
Author: Vernier
Compatibility: 1.6.X
Support: http://vernier.me
Description: Report Once is a simple plugin that only allows posts to be reported one time. If a post has already been reported and a user attempts to report the post, they will be faced with a friendly error message reading 'Error: This post has already been reported, therefore you may not report this post.'


Installation Instructions: Please see included 'Readme' file.


Changelog:
Version 1.0
-------------
-> Initial Release

Version 1.1
-----------
-> Adds a new setting
-> Allows you to choose whether to disable the report button entirely for reported posts or not


Download:
http://mods.mybb.com/view/report-once


Previews:
[attachment=27588] [attachment=27589] [attachment=27601]

Thanks guys, any problems, feel free to post below! Smile
I added this and modified it on my forum, it's a awesome plugin. Smile

[Image: 1ktnJ]
Nice plugin, I like it. Thank you :P
Would be better if the report button simply disappeared or changed to "reported" or something. Feel bad to encourage a useless click.
This IMHO should be a core. I see no reason why MyBB does not add it to core..
(2012-10-30, 04:25 PM)crazy4cs Wrote: [ -> ]This IMHO should be a core. I see no reason why MyBB does not add it to core..

Just wait for 1.8. There are a few report based improvements.
(2012-10-30, 03:21 PM)brad-t Wrote: [ -> ]Would be better if the report button simply disappeared or changed to "reported" or something. Feel bad to encourage a useless click.

Updated to 1.1 (sorry for the quick update) Toungue

Thanks for the idea, Brad. It now adds a new setting which allows you to choose whether you wish to hide the report button or not. Smile
Nice plugin, been waiting for this.

Is there a way also, if a topic is closed, it can't be reported?
Suggestions:
  • You should use a friendly error message instead of what you currently use. I use this:

    function ratemf_misc_error($error='', $title='')
    {
    	global $plugins, $mybb, $templates, $theme, $lang, $headerinclude;
    
    	$error = $plugins->run_hooks('error', $error);
    	$error = ($error ? $error : $lang->unknown_error);
    
    	if($mybb->input['ajax'])
    	{
    		@header("Content-type: text/html; charset={$lang->settings['charset']}");
    		echo "<error>{$error}</error>\n";
    		exit;
    	}
    
    	$title = ($title ? $title : $mybb->settings['bbname']);
    
    	eval('$page = "'.$templates->get('popup_error').'";');
    	output_page($page);
    	exit;
    }
    

    popup_error template:
    <html>
    	<head>
    		<title>{$title}</title>
    		{$headerinclude}
    	</head>
    	<body style="text-align: center;">
    		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder align_left">
    			<tr><td class="thead" colspan="2"><strong>{$title}</strong></td></tr>
    			<tr><td class="trow1" colspan="2">{$error}</td></tr>
    			<tr><td class="tfoot" colspan="2" align="center"><a onclick="window.close();">[{$lang->close}]</a></td></tr>
    		</table>
    	</body>
    </html>
    
    Feel free to use it.
  • Queries at postbit Sad, see:
    http://community.mybb.com/thread-126575-...#pid916402

Just my suggestions!
Does this replace the post message with "This post has been reported" ?
Pages: 1 2 3 4