Skip to:
Content
Pages
Categories
Search
Top
Bottom

Roles and limits


  • timelessdice
    Participant

    @timelessdice

    Dear forum/support,

    I haven’t used this amazing looking plugin yet but I’ve got a couple of questions that I couldn’t find.

    Is it possible to create/edit roles?
    For example:
    The forum that I want to create is for a gaming community where we use the following roles:
    Founder, Adviser, Staff Member, Game Administrator, Moderator, Community Manager, VIP, Long term Member and Member.

    Second question I have is, is it possible to limit the access to several forum sections?
    For example:
    I want to have sections for several games such as:
    Rainbow six siege > (sub sections) General, Competitive and Looking for group.
    I also want to create Moderator+ only sections such as:
    Staff discussions > (sub sections) Members, Games, Bans/Unbans and Rules.
    This sections needs to be only accessable for the roles: Moderator, Game Administrator, Staff Member, Adviser and the Founder.

    I’m looking forward to the replies.

    Regards,

    Timeless Dice

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

  • Robin W
    Moderator

    @robin-w

    you can add roles and/or change their names – see

    Custom Capabilities

    The following in an example that both adds new roles and changes the names of existing.

    /* bbPress Custom Roles */
    function add_custom_role( $bbp_roles ) {
     
    
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'Craftsman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role3'] = array(
    'name' => 'Journeyman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role4'] = array(
    'name' => 'Adept',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role5'] = array(
    'name' => 'Artisan',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster
    );
    $moderator = bbp_get_moderator_role() ;
    $bbp_roles[$moderator] = array(
    'name' => 'Councilman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as moderator);
    $keymaster = bbp_get_keymaster_role() ;
    $bbp_roles[$keymaster] = array(
    'name' => 'Advisor',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    );
    $apprentice = bbp_get_participant_role() ;
    $bbp_roles[$apprentice] = array(
    'name' => 'Apprentice',
    '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 );

    you can limit access to forums byh changing their visibility

    Public – Anyone can see these forums
    Private – Only logged in registered users with a forum role can see these forums
    Hidden: Only Moderators/keymasters can see these forums

    or if you want more control by using :
    https://wordpress.org/plugins/bbp-private-groups/


    timelessdice
    Participant

    @timelessdice

    Thank you very much for the quick reply!

    I’m going to look into the information that you have provided and test it out later this week.


    drjohndimi
    Participant

    @drjohndimi

    Hello Robin.
    Any plan to design a plugin for roles and capabilities soon?
    Regards,
    JD


    Robin W
    Moderator

    @robin-w

    unfortunately I’m fully tied up at the moment

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