Recent Topics

1 Mar 01, 2007 11:00    

My b2evolution Version: Not Entered

I am wondering why there is no ban possibility. Now and then we have a troll on our blog or a schoolclass on a rampage in our comments. This means 100's of manual entered comments which have no common elements other than the IP-address.

I would like to be able to click on a button, banning that IP from commenting ever again. (unless ofcourse, I unban them).

As this option is not present in B2Evo, I suspect that there is a reason not to add this functionality. So, why? What am I missing?

If not, is there a hook on the right location so I could make a plugin that does just this?

2 Mar 01, 2007 12:10

At first glance it looked like you could hook into FilterIpAddress() and add a "ban" link, but it appears to never be triggered.

A tad more manual, but you could add a tooltab that lets you type in an ip address and add it to your plugins table of banned ip's, with an option to remove all comments from that ip. You could also use the same tab to display the list of current banned ip's with an option to unban them.

Depending on how you want to ban them, you could either hook into SessionLoaded() and ban them completely from even viewing your blog, or you could hook into GetSpamKarmaForComment() if you only want to disable them from commenting.

¥

3 Mar 01, 2007 12:17

Thanks, I'll look into it...

4 Mar 01, 2007 19:09

Yeah, Yabba's right.

About FilterIpAddress: that filters the display of the IP address, so you could add a link, like Yabba said. I've just recently added it to CVS HEAD, so it should be in 2.0. I must have missed to trigger it before, although it's documented in the Plugin class already for 1.8.x.


Form is loading...