can I blacklist IP addresses from using the Report function?
-
Is it possible to blacklist specific IP addresses so they cannot report comments? I don’t want to blacklist them from leaving comments, just from reporting comments. I have some people who are abusing the Report function and I would like to stop them from using it.
-
Hello,
Thanks for asking. It is now part of v2.2.0.
Can you confirm it works for you?
Regards, MarcelThank you! It does not seem to be working. I tried blocking my own IP address to test it, but it still allowed me to report comments in Chrome (while logged out). In Safari, when I clicked Report Comment, it didn’t allow me to flag the comment but it also took me back to the top of the page (not sure if that’s expected behavior or not).
Hi,
If it took you to the top of the page, something went wrong regarding JavaScript.
Could it be you are using some kind of cache?
Could you share the address of the website?Regards, Marcel
Hi,
There have been a few fixes and updates on the PHP side as well. If you entered your own IP address, it should not show the report action now. Could you try it out and report back?
If you could also shed some light on the JavaScript issue, please do. The JavaScript has been rewritten in this version.Thank you! It is still sending me flagging notification emails even when I enter my own IP address as one to block from reporting. I also tried using a VPN to get a different IP address and tried blocking that one, but it still sent the reporting email notifications about flags from that IP too.
I did customize the code a bit so it’s a flag symbol rather than words “report comments” but I don’t think that should be overriding it.
The site is askamanager.org.Javascript issue does seem to be fixed!
Thank you for the response.
I see the old version of JavaScript is used. I am now not sure if you still used 2.2.0 or the development version ๐
Anyway, I just released 2.3.0. There are some fixes that might (should) help. Can you confirm?Still not working for me! Did you also change the JavaScript file and gone away from jQuery? It’s now taking some users to the top of the page when they click Report Comment, which I think could be connected.
Ehm, well, if you don’t edit it, it should work ๐
Yes, it was moved away from jQuery.If you want me to take a look, could you restore the downloaded version? You could add a IP address for 95.99.36.227, then I should be blocked.
It’s not possible for me to give support on a changed plugin.If you want me to think along with changing the text to an icon, I could look into that. That would mean you don’t have to change the plugin every time there is an update.
Regards, Marcel
I see you use Cloudflare. That means the user IP address is replaced by that of cloudflare. You can use the next filter to use a different header, like X_FORWARDED_FOR, which cloudflare is supposedly using. You can add this code to functions.php of your theme, preferably a child theme, or in your own plugin.
function my_zeno_report_comments_include_proxy_ips( $include_proxy_ip ) {
// $include_proxy_ip is a boolean
$include_proxy_ip = true;
return $include_proxy_ip;
}
add_filter( 'zeno_report_comments_include_proxy_ips', 'my_zeno_report_comments_include_proxy_ips', 10, 2 );Hi! I deleted the plugin, then reinstalled it, then tested it. But it’s still taking me to the top of the page when I click Report.
But I would LOVE it if you were able to change the text to a flag icon! That would be really helpful.
Thank you.
Could you remove the IP adresses again? Most probably cloudflare is listed there ๐
By the way, My IP address is listed, or that of cloudflare, and I don’t see the Report link, nor is the JavaScript file loaded. So that part is fine it seems.
-
This reply was modified 1 year, 3 months ago by
Marcel Pol.
Do you mean remove the IP addresses from the “Disallow IP Adresses from reporting” block in Settings/Discussions? I don’t currently have any listed in there.
Could it be that my ip address is listed under Dashboard > Settings > Discussion? It’s 95.99.36.227
Or could it be that cloudflare’s IP is listed there?
I don’t see a report button and the JavaScript is not loaded for me, so I must be blocked ๐
Ah, sorry for the confusion! I have the plugin deactivated right now; that’s why you’re not seeing it. I’ve just turned it back on if you want to take a look. No IP addresses are listed in the plugin Discussion blacklist area.
For changing the text (removing it), you can use this PHP code:
function my_zeno_report_comments_flagging_link_text( $text ) {
$text = ' ';
return $text;
}
add_filter('zeno_report_comments_flagging_link_text', 'my_zeno_report_comments_flagging_link_text'); -
This reply was modified 1 year, 3 months ago by
The topic ‘can I blacklist IP addresses from using the Report function?’ is closed to new replies.