Forum Replies Created
-
In reply to: How to change/create fourm roles
I just clicked on users in wordpress @robin-w
In reply to: How to change/create fourm roles1. When I go back to the user it says no role for these forums, but at the bottom it says
Additional Capabilities
Capabilities bbp_Facepainter2. The second screen-shot is after I update the user.
In reply to: How to change/create fourm roleshttp://postimg.org/image/u6h4ockpd/
However when I go to users in word press it still doesn’t show that their role is facepainter?In reply to: How to change/create fourm rolesAfternoon @robin-w
http://postimg.org/image/jiddpiaq9/
As you can see in the image above I set the forum role to Facepainterhttp://postimg.org/image/ukigny4sx/
Then I save itIn reply to: How to change/create fourm roleshi again @robin-w
Ok so I have put the code below in the functions.php
function add_new_roles( $bbp_roles )
{
/* role the new role*/
$bbp_roles[‘bbp_Facepainter’] = array(
‘name’ => ‘Facepainter’,
‘capabilities’ => custom_capabilities( ‘bbp_Facepainter’ )
);return $bbp_roles;
}add_filter( ‘bbp_get_dynamic_roles’, ‘add_new_roles’, 1 );
function add_role_caps_filter( $caps, $role )
{
/* Only filter for roles we are interested in! */
if( $role == ‘bbp_Facepainter’ )
$caps = custom_capabilities( $role );return $caps;
}add_filter( ‘bbp_get_caps_for_role’, ‘add_role_caps_filter’, 10, 2 );
function custom_capabilities( $role )
{
switch ( $role )
{/* Capabilities for ‘Facepainter’ role */
case ‘bbp_Facepainter’:
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;
}
}}However, it is still not working. It shows when I go to Users,user,Forum Role and set it to facepainter but when I save it, it still doesn’t set their fourm role to face painter?!
Thanks for you help
In reply to: How to change/create fourm rolesThank you however for the link above where do you find the code to edit @robin-w