mvaneijgen (@mvaneijgen)

Forum Replies Created

Viewing 7 replies - 26 through 32 (of 32 total)
  • In reply to: User role upgrade

    @mvaneijgen

    Participant

    BBpress roles.

    In reply to: User role upgrade

    @mvaneijgen

    Participant

    Oke I get that there are plugins to send emails, but how to intergrade them to upgrade the user (automatically). I don’t want to manually upgrade every request.

    To me this sounds like a VIP plugin where you can pay to get a VIP upgrade.

    In reply to: User role upgrade

    @mvaneijgen

    Participant

    No im looking for this, but can’t find anything on this topic out there. If there is nothing like this ill probably have to hire someone to intergrade this.

    @mvaneijgen

    Participant

    I had to create several new users but I could not just copied and paste the code again so I modified the code a bit

    
    //code to add expert role 
    
    function add_expert_role( $bbp_roles )
    {
    	/* Add a role called expert */
    	$bbp_roles['bbp_expert'] = array(
    		'name' => 'expert',
    		'capabilities' => custom_capabilities_expert( 'bbp_expert' )
    		);
    	return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_expert_role', 1 );
    
    function expert_role_caps_filter( $caps, $role )
    {
    	/* Only filter for roles we are interested in! */
    	if( $role == 'bbp_expert' )
    		$caps = custom_capabilities_expert( $role );
     
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'expert_role_caps_filter', 10, 2 );
    
    function custom_capabilities_expert( $role )
    {
    	switch ( $role )
    	{
    		 
    		/* Capabilities for 'expert' role */
    		case 'bbp_expert':
    			return array(
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    				'moderate'              => false,
    				'throttle'              => false,
    				'view_trash'            => false,
     
    				// Forum caps
    				'publish_forums'        => false,
    				'edit_forums'           => false,
    				'edit_others_forums'    => false,
    				'delete_forums'         => false,
    				'delete_others_forums'  => false,
    				'read_private_forums'   => true,
    				'read_hidden_forums'    => false,
     
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'edit_others_topics'    => false,
    				'delete_topics'         => false,
    				'delete_others_topics'  => false,
    				'read_private_topics'   => true,
     
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => false,
    				'delete_replies'        => false,
    				'delete_others_replies' => false,
    				'read_private_replies'  => true,
     
    				// Topic tag caps
    				'manage_topic_tags'     => false,
    				'edit_topic_tags'       => false,
    				'delete_topic_tags'     => false,
    				'assign_topic_tags'     => true,
    			);
    			break;
     
    		default :
    			return $role;
    	}
    }

    This creates the role Expert. I put this in my functions.php of my child-theme

    @mvaneijgen

    Participant

    Same here, while searching for a solution came across this post.

    Any luck on fixing this?

    @mvaneijgen

    Participant

    I had imported dummy content and there where a view set to private. Mybad.

    In reply to: Custom Sidebar Problem

    @mvaneijgen

    Participant

    Hey what did you do to fix it? Cause im having the same problem with Custom Sidebars (from WPMU) Here is a screenshot

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