PDA

View Full Version : Miscellaneous Hacks - Discourage Report Abuse


MarkFL
05-29-2015, 09:00 PM
Overview:

This product is designed to discourage abuse of the post/PM reporting system by alerting users (via the "Report Post" icon's tooltip) if they have already reported a post/PM and why they reported it. Each report reason is displayed on a separate line within the tooltip.

You may choose to allow users to report posts/PMs multiple times, or you can restrict multiple reporting to moderators and administrators only. Users who can only report the posts/PMs of others one time will find that the link to the report form for a post is void once they have reported that post. All users (unless restricted by userid as described below) will be able to report their own posts multiple times.

You may restrict certain "problem users" from reporting posts that have already been reported by them or anyone else or from reporting altogether. You may also choose to disable post reporting in selected forums, and to choose whether moderators/administrators are exempt from this restriction.

Updates:

Version 1.1:


Product can no longer be circumvented by manually calling the report script.
If the report thread has been given the [SOLVED] prefix (standard prefixid), then users who have reported the post are advised of this.


Version 1.2:


"Report Post" icon is red for posts the user has already reported.
Those who are not allowed to report the post again will see an alert if they click the icon, and those who are allowed are also alerted, but can proceed by clicking the "Ok" button, or return to the thread by clicking the "Cancel" button. Both alerts display the information shown in the "Report Post" icon's tooltip.


Version 1.3:


Bug fix: previously all users who posted in the report thread were told they had reported the post. Now only those who actually reported the post are told they have reported it.


Version 1.4:


Allows prefixid(s) used to mark report threads as resolved to be defined in the product settings.


Version 1.5:


Will now automatically check for the prefixid defined by my newly released "Report Thread Prefix Management" product if that is installed and active.


Version 1.6:


All moderators will see a "report thread" icon which serves as a link to the report thread. The status of the report thread is shown in the icon's tooltip.


Version 1.7:


You may now restrict users by usergroup to a certain number of reports per day. Upon installing or upgrading to this version, a new table is created in your database that serves as a log for reports made by users in the restricted group(s). This table is pruned daily to remove rows that are more than 24 hours old.


Version 1.7.1:


Check for user reporting eligibility done at thread level rather than post level for efficiency.


Version 1.8:


You may now choose to turn off post reporting altogether for selected forums.
You have the option whether to exempt moderators/administrators from this restriction.
Removed the need to make a manual template edit to your postbit template(s).


Version 2.0:


Several bug fixes.


Version 2.1:


Added support for the reporting of PMs.
Individual user restrictions are done by username rather than userid.
All messages to user now fully phrased.


Backup/Warning:

This product alters your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:

Download and extract the attached .zip file.

Upload the contents of the "upload" folder to your forum's root directory. If you store your button icons in a different location than "images/buttons", then upload the two image files to that folder instead.

Then follow:

AdminCP ► Plugins & Products ► Manage Products ► Add/Import Product

Click on "Choose File" and browse to the product xml file that was packaged in the .zip file.

Click "Import"

If you have installed versions prior to v1.8 and have edited your postbit (either "postbit" or "postbit_legacy" depending on which you use) then please undo that edit by finding the code:

<vb:if condition="$show['reportlink']">
&nbsp;
<vb:if condition="$reported">
<a class="reported" href="{vb:raw post.reportlink}" rel="nofollow" title="{vb:raw title}" onclick="<vb:if condition="!$report_again">alert(this.title); return false<vb:else />if (!confirm(this.title)){return false;}</vb:if>">
&nbsp;
</a>
<vb:else />
<a class="report" href="{vb:raw post.reportlink}" rel="nofollow" title="{vb:rawphrase report_bad_post}">
<!-- <img src="{vb:stylevar imgdir_button}/report-40b.png" alt="{vb:rawphrase report_bad_post}" /> -->
&nbsp;
</a>
</vb:if>
&nbsp;
</vb:if>

And restoring it to the original code:

<vb:if condition="$show['reportlink']">
&nbsp;<a class="report" href="{vb:raw post.reportlink}" rel="nofollow" title="{vb:rawphrase report_bad_post}"><!-- <img src="{vb:stylevar imgdir_button}/report-40b.png" alt="{vb:rawphrase report_bad_post}" /> -->&nbsp;</a> &nbsp;
</vb:if>

with:

You MUST set your settings to enable the mod. Each setting has an explanation of its use.

https://vborg.vbsupport.ru/attachment.php?attachmentid=154893&stc=1&d=1461954213

Support for this product can be found here:


MHB - Discourage Report Abuse (http://mathhelpboards.com/vbulletin-products-61/discourage-report-abuse-22022.html)
TAZ - Discourage Report Abuse (https://theadminzone.com/threads/discourage-report-abuse.145196/)

final kaoss
05-30-2015, 12:28 PM
How about a limit on how much they can report per day or week. Also, I'd like to see a function that can detect on if any action was taken on the reported post. Lets say if no action was taken in 2 weeks, that users reporting is limited further.

MarkFL
05-30-2015, 12:40 PM
I actually a few minutes ago added a check to see if the report thread has had the [SOLVED] prefix added, and this information is then displayed to all users who have reported the post to let them know the reporting of that post has been marked as resolved by the staff. I have not made this ready for release yet as I want to give the option in the settings to choose the prefixid that is used to mark threads as resolved.

Limiting users to a certain number of reports per unit of time would be trickier, but is something I will consider. :D

final kaoss
05-30-2015, 02:55 PM
Also, I'd like to see a feature from hackforums added as well if its not too difficult. (it's a mybb mod found here http://mods.mybb.com/view/report-once)

If a post has been reported, do not allow other members to report it again.

I've seen this mod by BoP but I'm sure it can be abused by clever members who paste the report url + showpost # into a new window.
https://vborg.vbsupport.ru/showthread.php?t=268799

MarkFL
05-30-2015, 04:55 PM
Also, I'd like to see a feature from hackforums added as well if its not too difficult. (it's a mybb mod found here http://mods.mybb.com/view/report-once)

If a post has been reported, do not allow other members to report it again.

I've seen this mod by BoP but I'm sure it can be abused by clever members who paste the report url + showpost # into a new window.
https://vborg.vbsupport.ru/showthread.php?t=268799

Initially I suggested at the forum I help administrate that we install Joe's add-on, but there were objections to killing the reporting feature for everyone, and so that's why I developed this add-on as an alternative.

With my product, you do have the option to kill post reporting for certain members, either for posts that have been reported before or you can kill reporting for members entirely, so that they can't report posts at all.

But, you are right that this can be circumvented by pasting the correct URL into their browsers. I will address this with another plugin for the next product update with the "no permission" page. ;)

I have a couple of other improvements planned as well, so look for the next update soon. :up:

MarkFL
05-30-2015, 06:36 PM
I went ahead and updated the product so that it cannot be circumvented by manually calling the report script. If a user does not have permission to report a post for any reason, then they are now shown the "no permission" page if they attempt to call the report script for that post.

The other updates I have planned will take much more time, and so I wanted to go ahead and implement this functionality now. :D

MarkFL
05-31-2015, 04:37 PM
Update: version 1.2


"Report Post" icon is red for posts the user has already reported.
Those who are not allowed to report the post again will see an alert if they click the icon, and those who are allowed are also alerted, but can proceed by clicking the "Ok" button, or return to the thread by clicking the "Cancel" button. Both alerts display the information shown in the "Report Post" icon's tooltip.

MarkFL
06-02-2015, 01:01 AM
Update: version 1.3


Bug fix: previously all users who posted in the report thread were told they had reported the post. Now only those who actually reported the post are told they have reported it.

MarkFL
06-10-2015, 06:05 PM
Update: version 1.4


Allows prefixid(s) used to mark report threads as resolved to be defined in the product settings.

MarkFL
06-11-2015, 03:59 PM
Update: version 1.5


Will now automatically check for the prefixid defined by my newly released "Report Thread Prefix Management" product if that is installed and active.

tareqbd
06-15-2015, 02:48 PM
Hi Mark, is it possible to add a feature like "Maximum report per day by per usergroup"

MarkFL
06-15-2015, 03:05 PM
Hi Mark, is it possible to add a feature like "Maximum report per day by per usergroup"

I will look into adding that feature soon. :D

MarkFL
06-19-2015, 03:24 AM
Update: version 1.6


All moderators will see a "report thread" icon which serves as a link to the report thread. The status of the report thread is shown in the icon's tooltip.

MarkFL
06-23-2015, 04:58 AM
Hi Mark, is it possible to add a feature like "Maximum report per day by per usergroup"

Update: version 1.7


You may now restrict users by usergroup to a certain number of reports per day. Upon installing or upgrading to this version, a new table is created in your database that serves as a log for reports made by users in the restricted group(s). This table is pruned daily to remove rows that are more than 24 hours old.

MarkFL
07-28-2015, 05:26 AM
Update: version 1.8


You may now choose to turn off post reporting altogether for selected forums.
You have the option whether to exempt moderators/administrators from this restriction.
Removed the need to make a manual template edit to your postbit template(s).

akz645
07-29-2015, 10:40 PM
Update: version 1.8


You may now choose to turn off post reporting altogether for selected forums.
You have the option whether to exempt moderators/administrators from this restriction.
Removed the need to make a manual template edit to your postbit template(s).


Cheers Mark :)

akz645
09-04-2015, 07:34 PM
...

I recently tried this Mod out on my test forum and it made an entire thread no longer accessible (when this Mod is enabled), if it has a single reported post in it (with the error shown below).
Furthermore, after reporting any post, this error message shows up:
Fatal error: Call to a member function fetch_array() on a non-object in /home/[My DB]/public_html/includes/class_postbit.php(345) : eval()'d code on line 287https://vborg.vbsupport.ru/external/2015/09/28.png
--------------------
Report Thread Prefix Management (https://vborg.vbsupport.ru/showthread.php?t=319036) + Profile Reporter (https://vborg.vbsupport.ru/showthread.php?t=320100) => Those Mods seem to work though.
Mark, can you take a look at my forum? Should I PM you the details?

It probably does clash with another modification, but I'm not sure which. If we could order modifications based on the date they were installed, that would made it so much easier to unistall them in order to find the problem/conflict.

MarkFL
09-04-2015, 09:10 PM
First, let's try this...at the top of the plugin titled "Discourage User From Reporting Post More Than Once", add the following code in red.

if ($vbulletin->options['markfl_pdpr_enabled'])
{
global $db;
$reported = false;
$report_again = false;

Let me know if that fixes the problem on your end. :)

akz645
09-04-2015, 09:19 PM
First, let's try this...at the top of the plugin titled "Discourage User From Reporting Post More Than Once", add the following code in red.

if ($vbulletin->options['markfl_pdpr_enabled'])
{
global $db;
$reported = false;
$report_again = false;

Let me know if that fixes the problem on your end. :)
Cheers that fixed the problem :)

Can you explain to me why it fixed the issue?

MarkFL
09-04-2015, 09:25 PM
I run into this error occasionally with the fetch_array() function, but only at certian hook locations which can be different on other sites, and I have found that making $db global is the cure. Why this needs to be done for some sites and not others I have no clue, but I think I will start including that statement in every plugin that uses the fetch_array() function from now on just to make sure everyone is covered. :)

RSprinkel
09-13-2015, 04:26 AM
Good Morning,

Just installed this mod as it looks like a great feature as well as your other mods I have installed. However when I do a test report of a post, and go back to it to check to see if the red Icon is showing and place mouse cursor over it to see if the message pops up, first off I don't see the red icon as it still appears to be black and no pop up box displays that it has already been reported. Also I noticed on that thread only at the top of the page I am getting this error message - Warning: mysql_num_rows() expects parameter 1 to be resource, object given in ..../includes/class_postbit.php(345) : eval()'d code on line 87

If I disable the mod and hit refresh on same thread that error message goes away.

Thanks for your help on resolving this issue in advance.

MarkFL
09-13-2015, 04:56 AM
Good Morning,

Just installed this mod as it looks like a great feature as well as your other mods I have installed. However when I do a test report of a post, and go back to it to check to see if the red Icon is showing and place mouse cursor over it to see if the message pops up, first off I don't see the red icon as it still appears to be black and no pop up box displays that it has already been reported. Also I noticed on that thread only at the top of the page I am getting this error message - Warning: mysql_num_rows() expects parameter 1 to be resource, object given in ..../includes/class_postbit.php(345) : eval()'d code on line 87

If I disable the mod and hit refresh on same thread that error message goes away.

Thanks for your help on resolving this issue in advance.

Hello,

For some reason it appears the db query has failed. What versions of PHP and MySQL are you using?

RSprinkel
09-13-2015, 05:08 AM
Hmm well PHP is 5.3.3, not sure about mySQL version. As my site is being hosted on a friends server I went into phpmyadmin and clicked on Documentation and it took me to the MySQL 5.5 Reference Manual, so I am guessing it is 5.5

MarkFL
09-13-2015, 05:40 AM
Hmmm...it all sounds reasonably up to date. i have no idea why that method is not working for you. I have personally installed this on 4 different sites, and none had this problem.

If you want to PM admin login credentials to me, I would be glad to see if I can fix it.

RSprinkel
09-13-2015, 10:23 AM
Thanks MarkFL. PM sent. ;)

Actually my mySQL is 5.1.73 not 5.5. Sorry

akz645
12-26-2015, 08:27 PM
Suggestions for this Mod:
- Exclude Usergroups From Reporting Posts Already Reported.
- Exclude Usergroups From Reporting At All.
- Users are Immune from having their posts be reported.
- Usergroups are Immune from having their posts be reported.
------------------------------------------------------------------------------------------------------------------------------------------------------

Suggestions for this Mod/another Mod:

Currently this is the default for 'User Infractions & Post Reporting Options' in vBulletin (http://i.imgur.com/kW6OTfC.png)
If somebody reports a post, a thread is (automatically) created in X forum (multiple not allowed).
If somebody else reports the same post afterwards, then they will (automatically) create a post in the same thread the first reporter created.
The user who reported/or the userID selected from the settings (http://i.imgur.com/Tvammu6.png) will be shown as creating the thread/post.

Change these three settings:
- Change: 'User Infraction Discussion Forum (http://i.imgur.com/bJtXAH8.png)' TO: Allow multiple forums to be selected.
- Change: 'Post Reporting Discussion Forum (http://i.imgur.com/BFXbW1F.png)' TO: Allow multiple forums to be selected.
- - Change: 'Post Reporting User (http://i.imgur.com/Tvammu6.png)' TO: Allow the admin to select different userID per ForumID.
Example: [ForumIDs|UserID; ForumIDs|UserID ..etc ] [3,6,7|1; 4,8,12|2;]
Note: You don't have to edit these locations, if you just re-create these settings into the AdminCP for a Mod which overwrites vBulletin default settings.

Additional settings:
- Report Forum(s): Multiple ForumID selector (http://i.imgur.com/iL4LCmA.png)
- - If users report in the forum ID you select in this setting, in the Report Forum(s) which you selected above, it (reports) will display this UserID instead.
Example: [ForumIDs|UserID; ForumIDs|UserID ..etc ] [3,6,7|1; 4,8,12|2;]
Note: This should overwrite the 'Post Reporting Discussion Forum' (http://i.imgur.com/12Sm91k.png) if the selected forum(s) overlap.
Note 2: This (http://i.imgur.com/12Sm91k.png) is different to this (http://i.imgur.com/9q747lW.png). Yes both of them create report forum destinations, but how/which userID are displayed is different.

- Allow the admin to select certain usergroups/users, those usergroups/users will have their post reports all go into X thread ID.
Example: [ThreadID|UsergroupIDs; ThreadID|UsergroupIDs etc...] [4|2; 8|6,4,3;]
AND [ThreadID|UserIDs; ThreadID|UserIDs etc...] [12|56; 13|62,14,23;]
Note: If a report is going into X threadID then it should should show the original userID creating the post (report).
- - Should a report be created in other places too? [Yes or No]
Note: If No selected, other report thread/posts will not be created in other destination forums (ignores settings above). Hence the reports from those usergroups/users will only be created inside the thread ID the admin chose above.

MarkFL
04-29-2016, 04:25 PM
Update - Version 2.1:


Added support for the reporting of PMs.
Individual user restrictions are done by username rather than userid.
All messages to user now fully phrased.