Skip to:
Content
Pages
Categories
Search
Top
Bottom

Titles – Roles


  • Fugglet
    Participant

    @fugglet

    Hi I’ve been searching for a little over a day by now – and I simply cannot find an answer or solution to my problem.

    I’d like to add additional forum roles, I prefer if I could just add new titles for users. Like for an example, mine is Keymaster.

    Thank you in advance.

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

  • Robin W
    Moderator

    @robin-w

    Do you mean generic titles, or ones specific to a user?

    if specific each user would have a label eg ‘beginner’, and would these roles be permanent to that use, or change?

    and if generic, do you want to give these existing role capabilities eg role ‘hero’ has ‘keymaster’ capabilities.

    Or do you just want to rename the existing roles eg change ‘keymaster’ to ‘administrator’

    Come back and explain a bit more about what you’re trying to achieve, and I’ll see if I can help further.


    Shanenopolis
    Participant

    @shanenopolis

    Hey Robin, I’m sorry this guy never came back and elaborated, but I have the same question. It seems like such an obvious thing to me, I really can’t figure out why there’s no documentation on it.

    I’m using bbPress 2.5.3, which comes with some built-in forum roles:
    Keymaster
    Moderator
    Participant
    Spectator
    Blocked

    Sure, I’d like to be able to change the names of these roles, but more importantly, I’d like to add new ones. Permanent ones. What about a moderator for only a specific forum, rather than all of them?
    Specifically, I would like to have several different types of Participants, but without a change in permissions. I’d really just like to change what it says under a person’s name on the forum. Like a title, badge, or mark of prestige for forum users.

    I have this great site role editor called Members, but it has nothing to do with the forum roles. If I could have some similar functionality for bbPress, that would be great. Do you know if this is a possibility?


    Robin W
    Moderator

    @robin-w

    With current bbPress neither is possible as far as I know !

    I take out roles from the display, I hate being a “keymaster” and think “participant” sounds a bit low.


    Shanenopolis
    Participant

    @shanenopolis

    Oh… Well poop! Can you recommend a more versatile forum plugin?


    Robin W
    Moderator

    @robin-w

    I don’t like giving no answers so in between I have a little look, and found an answer from someone else on your second question ie adding roles with existing capabilities.

    I just need to test it, and I’ll be back.

    in the meantime if I said “add this code to your functions file” would you know what I mean?


    Shanenopolis
    Participant

    @shanenopolis

    Not immediately, no, but I have access to experienced professionals.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I’ll caution you not to conflate “roles” with “ranks.” A “Role” provides specific capabilities on the site (and in the forums) where as a “Rank” is a visual indicator of some kind of importance on the site.

    Sometimes these are the same; usually they are different. I bet there’s value in having a separate “Rank” plugin for bbPress to help visually group users together into level of importance that don’t dictate the scope of permissions users have within the forums.


    Robin W
    Moderator

    @robin-w

    ok, just tested and this code seems to work

    function add_custom_role( $bbp_roles ) {
     $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    
    );
     $bbp_roles['my_custom_role2'] = array(
    'name' => 'name 2',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    
    );
    
     $bbp_roles['my_custom_role3'] = array(
    'name' => 'name 3',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    
    );
    
    return $bbp_roles;
     }
     add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    So this adds 3 roles, you/your experts can duplicate the code and add more or remove unnecessary.

    Basically you’ll just need to

    1. tell the what to put as the names – currently the new roles are name 1, Name2 and name 3 (where it says ‘name’ => ‘name 1’ , so they’ll just overwrite that with what you want.

    2. for each what capability. You’ll see the first two have the code bbp_get_participant_role() so that sets them to participant and the last sets to keymaster using bbp_get_keymaster_role() . You can guess that you just change the words for other roles such as spectator, or moderator.

    They need to add this to your theme’s functions file.

    please come back if any of this is not clear


    Shanenopolis
    Participant

    @shanenopolis

    Users have both a site role and a forum role, and those are the specific terms used within wordpress and bbPress, respectively. Thank you for your concern, but I believe I understand the difference. I’ve never seen any reference to the word rank, but it would undoubtedly alleviate some confusion if bbPress were to use that term in place of forum role.

    I would like to be able to allow forum users to earn ranks and titles like achievements. Notable badges or icons everyone can see. I think it would add a lot of depth to the forum, but maybe bbPress is not the best tool for that.


    Robin W
    Moderator

    @robin-w

    JJJ, totally agree, but until someone writes one, this is a quick and dirty method to achieve it !

    (and for me to get rid of that horrible “keymaster” name !)

    ps, if you want a count any combination of topics, replies or total posts under the role, then this plugin does that ! Gives a sort of rank.

    https://wordpress.org/plugins/bbp-topic-count/

    I might expand it to give ranks one day !


    Shanenopolis
    Participant

    @shanenopolis

    Robin: I’ll check it out when I get back to the office and let you know how it goes.
    Thanks!


    Shanenopolis
    Participant

    @shanenopolis

    It worked!! I can create vanity forum titles now without changing any permissions.
    It worked wonderfully, thank you!

    Now I just need to get people on the forum, LOL!


    full moon
    Participant

    @leighgregg

    Hello,

    I have been searching for something very similar. The “plugin author” label on all the plugin pages on wordpress.org is what I am after. The “plugin contributor” option too would be useful. Although I don’t want the text as it is, but this ability to label to indicate the users importance within a forum is essential to my project. My issue is that they Keymaster, participant, ect ect labels are useless as the forum master wont have any moderation/admin capabilities. So i need to be able to select a user to have a custom label like “offical representative”. I was looking at the code above, but I’m not sure if it would work as I need, and across a multisite install.

    I guess I am asking the same question, but is there a plugin that can allow a user to be given a unique label in the forum per site?

    Thanks in advance for any responce

    Leigh

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