Alice Kaye (@alice-kaye)

Forum Replies Created

Viewing 7 replies - 26 through 32 (of 32 total)
  • In reply to: Add Custom User Roles

    Alice Kaye
    Participant

    @alice-kaye

    Hi Robin,

    Thanks for replying and pointing out the issue for me. Woot! I see the two filters, in post 2. I’ll try to merge the two filters together, remove the second filter entirely and hopefully with the merge, it will work the way I’m intending. (This is literally the first time I’ve ever tried my hand at understanding PHP, so I’m totally new to this).

    The first bit of code (post 1) is simply just making new roles entirely.

    Post 2 is what I need to have. I want to change the name of the main three roles, and then add the others. Reason being, for starters, I think it will confuse my users to have those three the we won’t use, and I can’t seem to change my admit account from Keymaster to one I create.

    Thanks so much! 🙂

    In reply to: Add Custom User Roles

    Alice Kaye
    Participant

    @alice-kaye

    Secondary Update:

    After making aforementioned changes, while I was able to change the name of the three major roles (Keymaster > Advisor, Moderator > Councilman, Participant > Apprentice), I’ve found that the newly added roles are no longer operational (nor showing).

    Screenshot: http://screencast.com/t/p28WJahSY4NU

    Can someone please take a look at my code and maybe provide some insight as to where I have gone wrong?

    Thanks in advance!

    Edit: I have tried modifying the newly added roles to the following:

    From:

    $bbp_roles['bbp_craftsman'] = array(
    'name' => 'Craftsman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );

    To:

    $bbp_roles['bbp_craftsman'] = array(
    'name' => 'Craftsman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_apprentice_role() ) // the same capabilities as participants
    );

    Which gave me immediate errors after re-uploading the function.php. If I leave it as is, I do not get any errors, they just simply don’t show.

    In reply to: Add Custom User Roles

    Alice Kaye
    Participant

    @alice-kaye

    Update – I managed to get it to work and managed to change the name of the defaults, to make things easier.

    This is the code in case anyone needs it for reference in the future:

    /* bbPress Custom Roles */
    function add_custom_role( $bbp_roles ) {
     
    $bbp_roles['bbp_craftsman'] = array(
    'name' => 'Craftsman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['bbp_journeyman'] = array(
    'name' => 'Journeyman',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['bbp_adept'] = array(
    'name' => 'Adept',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['bbp_artisan'] = array(
    'name' => 'Artisan',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as moderator
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    /* bbPress Custom Roles */
    
    /* bbPress Custom Role Names */
    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    
    function ntwb_bbpress_custom_role_names() {
    	return array(
    
    		// Keymaster - Advisor
    		bbp_get_keymaster_role() => array(
    			'name'         => 'Advisor',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    
    		// Moderator - Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'Councilman',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    
    		// Participant - Apprentice
    		bbp_get_participant_role() => array(
    			'name'         => 'Apprentice',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    	);
    }
    /* bbPress Custom Role Names */

    Alice Kaye
    Participant

    @alice-kaye

    Hah thanks Robin, came here to say that’s what I had found! Woot!


    Alice Kaye
    Participant

    @alice-kaye

    I believe I found my answer with bbp Private Groups. 🙂

    In reply to: Forum Setup

    Alice Kaye
    Participant

    @alice-kaye

    Woot, found the answer to that too. Yay!

    In reply to: Forum Setup

    Alice Kaye
    Participant

    @alice-kaye

    Thank you @Robkk! This is exactly what I was looking for. Love the styling pack too, that will definitely help get this going the way I want. Installed your loop-forum.php and it looks fantastic.

    Only question I have is, how do I modify it to say ‘Latest Post’ rather than ‘Freshness’. Though I’m not sure you can help me with that. Going to do some digging and see if I can find an answer.

Viewing 7 replies - 26 through 32 (of 32 total)