Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbp style pack removed my custom forum roles


  • demonboy
    Participant

    @demonboy

    Hi,

    Great plugin, Robin. I’ve installed it and off the bat it’s made some imrpovements. However my forum was displaying the custom roles I created using User Role Editor. Now that I have activated your plugin, the display of these roles within the forum has been overridden and now just displays the standard roles like ‘participant’. How do I disable your over-ride?

    TIA

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

  • Robin W
    Moderator

    @robin-w

    I’ll take a look


    Robin W
    Moderator

    @robin-w

    so how did you create a custom forum role?


    demonboy
    Participant

    @demonboy

    Hi Robin,

    My apologies, I’d said it was User Role Editor. It wasn’t, I used the Members plugin. Unfortunately, I can’t provide a link as everything is behind a login but here is my Members admin page. You can see the additional member roles I created.

    Members roles

    All that said, however, I am wondering if this is a theme update that caused this. Previously I’d themed my forum to display this user role, not bbp-author-role, so it is possible this was over-written by a theme update instead (my theme includes bbpress). Honestly, it’s been over four years since I styled my forum so I’m clutching at straws here, but is there any way your plugin could have over-written any custom code I wrote?

    I think if I add this to my child functions file I may be able to re-introduce the forum role:

    		$bbp_roles['oyster-owner'] = array(
    'name' => 'Oyster Owner',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );

    demonboy
    Participant

    @demonboy

    Sorry, forgot the function and end part.

    function add_custom_role( $bbp_roles ) {
    	
    $bbp_roles['deckhand'] = array(
    'name' => 'Deckhand',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    	
    $bbp_roles['admiral'] = array(
    'name' => 'Admiral',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    	
    return $bbp_roles;
    }
    
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    And the more I think about it, the more I think this was either something I have over-written in the past, or a feature I had another website, not something your plugin has done. On another website I use the pro version of User Role Editor and I think that is how I am able to force custom forum roles. I think the code I posted above relates to this plugin.


    Robin W
    Moderator

    @robin-w

    That all seems to make sense, I’ll ignore this for the moment 🙂

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