• Resolved Tony G

    (@starbuck)


    I see requests here for enhancements but the one banhammer_drop method that does the heavy lifting is quite simple and easy to extend. I’m wondering if I’m missing some well-known taboo against changes to this plugin.

    For example, it would be easy to get it to recognize that the first character is something unique and then process the rest of the filter as a regexp. That answers all of these requests for partials.

    Personally, I needed the following enhancement to use the same blacklist filters against the User Login Name as well as the email addresses.

    if( stripos($user_email, $blacklist_current) !== false
    	|| 
    	stripos($user_login, $blacklist_current) !== false
    ) {

    That just doubled the usefulness of this plugin! 🙂

    And rather than hardcoding rules like that, why not add a hook here to call to another plugin that provides the above and other functions. I mean, it seems like a no-brainer that we’re in just another Loop here, why not invite custom functionality to participate in the sanitization process?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I’m happy to accept pull requests for hooks and filters. Fundamentally, I dislike being asked to add in code I don’t use as it becomes unwieldy for me to support. On the other hand, if folks are interested in hooks and filters and want to kick in some code for that where they want it, that’s a win-win as I see it.

    TBH the plugin is in maintenance only since it really doesn’t need much beyond a check every year to make sure it still works with BuddyPress.

    https://github.com/ipstenu/ban-hammer

    Since people are more likely to make a fake user ID than a fake email, I don’t really consider it a long-term successful block strategy, but I can see where it might be.

    Thread Starter Tony G

    (@starbuck)

    Thanks Mika. Yes, this plugin has served us well and one can infer it’s now in maintenance mode. That’s fine. I’ll make changes to support hooks and then get my code to handle the hooks. After it’s been working a while in a few sites I’ll submit a pull request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Making simple Enhancements’ is closed to new replies.