Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moderation words


  • Stefano Lissa
    Participant

    @satollo

    Hi, bbPress (at least version 2.5.8) uses the comment moderation words of WordPress, skipping the moderation check if that field is empty. Actually a forum could have different black list words.

    I would like to ask for that feature: an hook to filter/change/enqueue moderation words before bbPress will use them, so I can create a specific configuration in a theme or like.

    Thank you, Stefano.

Viewing 8 replies - 1 through 8 (of 8 total)

  • Robkk
    Moderator

    @robkk

    I will note this as a possible feature request. Having a unique blacklist might be a good idea, there might be a way to hook into WordPress’s blacklist function and specify words only for bbPress, but I do not know at the moment, sorry.


    Stefano Lissa
    Participant

    @satollo

    Looking at the code it seems there is no way to hook into that option in a easy way. One should hook into get_options for the moderation_key option but find a way to determine he is in the bbpress contect and not in the comment moderation context. If needed I can write the patch to bbpress for that, it’s one line of code!

    Stefano.


    Robkk
    Moderator

    @robkk

    Any contributions are welcome 🙂


    Stefano Lissa
    Participant

    @satollo

    Ok, where could I send a patch? Should I create an SVN patch or just give a description on where to add the code?

    Thank you, Stefano.


    Robkk
    Moderator

    @robkk

    Either way I guess.

    You are free to go ahead and create a trac ticket for the suggested hook with the patch file attached to it.

    Or I guess you can explain to me what to add and where it should be, and then I can create the ticket from the information you gave me.

    If you need any additional help with creating a trac ticket, I can help you out.


    Stefano Lissa
    Participant

    @satollo

    I’ve just created a ticket, hopefully in the correct way…

    https://bbpress.trac.wordpress.org/ticket/2861

    Stefano.


    Robkk
    Moderator

    @robkk

    the patch might not be created right. I don’t think you create the patch from the plugin version but maybe the latest alpha version or the latest version you can download from the trunk using SVN.

    You can download/download using SVN using the url from here.

    Download

    Are you sure how you inserted the filter will not cause any issues?

    I am specifically talking about how $blacklist = both of these.

    $blacklist = trim( get_option( 'moderation_keys' ) );
    
    $blacklist = apply_filters('bbp_moderation_keys', $blacklist);

    Here are a bunch of helpful guides that I am just going to drop here.

    Working With Patches

    Installing Via SVN


    Stefano Lissa
    Participant

    @satollo

    Hi, I’m unsing that patch in a couple of sites, and it seems to work. Where do you think there is a problem? In my blogs I’ve just added a filter which replaces the moderation key used by bbpress (the variable $blacklist in the code which initially contains the moderation keys of WordPress).

    Bye, Stefano.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar