Forum Replies Created
-
In reply to: Allow Participants to Trash / own Topics and Posts
though re-reading the thread this morning, I think I have not fixed anything, juts done it another way.
and that doesn’t work either – forget the code above
In reply to: Allow Participants to Trash / own Topics and Postsok, I’ve taken pity and kicked this round for an hour – I expect to be on your Christmas list !!!
This seems to work, although please do some testing for all roles, and check it out.
/*Customize the BBPress roles to allow Participants to trash topics*/ add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 10, 2 ); function ST_add_role_caps_filter( $caps, $role ){ // Only filter for roles we are interested in! if( $role == bbp_get_participant_role() ) { $caps = array( // Primary caps 'spectate' => true, 'participate' => true, // Forum caps 'read_private_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, 'delete_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'delete_replies' => true, // Topic tag caps 'assign_topic_tags' => true, ); } return $caps; } /*then only allow participants to trash their own topics*/ add_filter( 'bbp_map_reply_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 ); add_filter( 'bbp_map_topic_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 ); function ST_tweak_trash_meta_caps( $caps, $cap, $user_id, $args ){ // apply only to delete_reply and delete_topic if ( $cap == "delete_reply" || $cap == "delete_topic" ){ // Get the post $_post = get_post( $args[0] ); if ( !empty( $_post ) ) { // Get caps for post type object $post_type = get_post_type_object( $_post->post_type ); //$caps = array(); // Add 'do_not_allow' cap if user is spam or deleted if ( bbp_is_user_inactive( $user_id ) ) { $caps[] = 'do_not_allow'; // Moderators can always edit forum content } elseif ( user_can( $user_id, 'moderate' ) ) { $caps[] = 'moderate'; // User is author so allow edit if not in admin } elseif ( user_can( $user_id, 'participate' ) && ( (int) $user_id === (int) $_post->post_author ) ) { $caps = array(); //$caps[] = $post_type->cap->delete_posts; // Unknown so do not allow } else { $caps[] = 'do_not_allow'; } } } // return the capabilities return $caps; }In reply to: Forum topic issuecan you tell us
what theme you are using
what other plugins you are usingIn reply to: Searching across forumsno problem – not so long ago I was a newbie !!
In reply to: Searching across forumsthe bbpress search widget does that – is there something particular that you want?
In reply to: Change queryI am not sure I understand what it is you are asking
wp-query is a wordpress function
In reply to: User RoleMaybe you can take a look on my Site?
sorry that is beyond free support.
I have try it but bulk action doesn´t work.
can you say what didn’t work – some detail would be useful
In reply to: User Roleyou can use the bulk action in dashboard>users to change current ones
In reply to: User Roleit would only apply to new users.
In reply to: Forum Root IssueThis theme uses the genesis framework, so I suspect you will need to add this plugin to make it all work
In reply to: How to include the Forum Title in subcategories?In the bottom of my forum page there’s a ‘Suggest Category’ button
Don’t know what is creating that.
can we have a link please.
In reply to: metadata for forumsI want to show a description for a forum in the forums list. Is there a way to enable this with bbPress, or a plugin that does it?
use my style pack plugin
once activated go to
dashboard>settings>bbp style pack>forum display and look at 6 & 7
The forum description is put in the content of the forum dashboard>forums
In reply to: User Roletry this – it should work but is untested
Please come back and let us know if it does or doesn’t
add_filter ('kal_get_user_role_map()' , 'bbp_get_user_role_map()' ) ; function kal_get_user_role_map() { // Get the default role once here $default_role = bbp_get_default_role(); return (array) apply_filters( 'kal_get_user_role_map', array ( 'administrator' => bbp_get_keymaster_role(), 'editor' => $default_role, 'author' => bbp_get_spectator_role(), 'contributor' => $default_role, 'subscriber' => $default_role ) ); }This goes in your function file
In reply to: Forum descriptionsgreat !
In reply to: Forum descriptionsmy style pack plugin has an option for this
install and activate and then go to
dashboard>settings>bbp style pack>forum display items 6 & 7In reply to: Forums don’t show with Mamp Progreat – glad you’re fixed
In reply to: /Forum and forum link in wp backend not workingThis link goes to forums, rather than a 500 error
try
dashboard>settings>permalinks
and just click save to refresh these
In reply to: Adjust width of forum-titleslink to your site please
In reply to: /Forum and forum link in wp backend not workingas a test switch to a default theme such as twentyfifteen, and see if this fixes.
In reply to: Forums don’t show with Mamp Protry this thread
further thought – have you tried deleting the bbpress.php – it is only needed if the page.php isn’t doing what you want
sorry, I’ve taken a further look and I cannot work out why it is not working
can I have a link to your site again plaese
In reply to: Block users from posting linksnow confused – you seem to be stating issues with both admin access and www. vs non www
can you state clearly what is and isn’t working
This should help
https://wordpress.org/plugins/bbp-buddypress-profile-information/