Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moderation words

  • @satollo

    Participant

    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

    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.

    @satollo

    Participant

    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

    Any contributions are welcome 🙂

    @satollo

    Participant

    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

    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.

    @satollo

    Participant

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

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

    Stefano.

    @robkk

    Moderator

    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

    @satollo

    Participant

    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