Search Results for '+.+default+.+'
-
Search Results
-
Topic: editing post template
I’m looking to do something relatively simple – move the tags in a single topic post up under the title, rather than under the search bar – their default position.
I’ve been going through to files to try and figure out where this code would be but since there are so many files in default > bbpress I was hoping to get some direction on where to find the relevant code.
Thanks!
It’s under the title “Forum” in the bar/header; I think is to default for all but I can explain better if you dont understand.
Topic: User Roles – Adding/Renaming
Hello,
I’m trying to rename the current roles as well as ADD new roles. When I add the filter to change the current role name, it doesn’t add the new user role I’ve added. If I remove that code, then the new user role shows up.This is the code I’m using.
//BBpress Custom Roles // function add_new_roles( $bbp_roles ) { /* Add a role called tutor */ $bbp_roles['bbp_lead'] = array( 'name' => 'Community Lead', 'capabilities' => custom_capabilities( 'bbp_lead' ) ); 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_lead' ) $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 'tutor' role */ case 'bbp_lead': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, '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' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, 'edit_others_topics' => true, 'delete_topics' => true, 'delete_others_topics' => true, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => true, 'delete_replies' => true, 'delete_others_replies' => true, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => true, 'edit_topic_tags' => true, 'delete_topic_tags' => true, 'assign_topic_tags' => true, ); break; default : return $role; } } // End BBpress Custom Roles // //BBpress Rename Roles // /* BBPress Renaming Roles */ add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' ); function ntwb_bbpress_custom_role_names() { return array( // Keymaster bbp_get_keymaster_role() => array( 'name' => 'Administrator', 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) ), // Moderator bbp_get_moderator_role() => array( 'name' => 'Moderator', 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) ), // Participant bbp_get_participant_role() => array( 'name' => 'Member', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) ), // Spectator bbp_get_spectator_role() => array( 'name' => 'Spectator', 'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() ) ), // Blocked bbp_get_blocked_role() => array( 'name' => 'Blocked', 'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() ) ));} //BBpress Rename Roles End //[New topic] opens TinyMCE on the Text tab. My users think HTML is a government department 🙂 so can I default it to open on the View tab instead?
Topic: Repair tool with cron
Hi, I have a project which updates the forum daily through an import program.
What I need is to run the repair tool that has bbpress once a day, when all imports are finished.
I found this code but I can not make it work.
function bbp_register_default_repair_tools() { // Topic meta bbp_register_repair_tool( array( 'id' => 'bbp-sync-topic-meta', 'description' => __( 'Recalculate parent topic for each reply', 'bbpress' ), 'callback' => 'bbp_admin_repair_topic_meta', 'priority' => 5, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_reply_post_type() ) ) ); // Forum meta bbp_register_repair_tool( array( 'id' => 'bbp-sync-forum-meta', 'description' => __( 'Recalculate parent forum for each topic and reply', 'bbpress' ), 'callback' => 'bbp_admin_repair_forum_meta', 'priority' => 10, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ); // Forum visibility bbp_register_repair_tool( array( 'id' => 'bbp-sync-forum-visibility', 'description' => __( 'Recalculate private and hidden forums', 'bbpress' ), 'callback' => 'bbp_admin_repair_forum_visibility', 'priority' => 15, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_forum_post_type() ) ) ); // Sync all topics in all forums bbp_register_repair_tool( array( 'id' => 'bbp-sync-all-topics-forums', 'description' => __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'callback' => 'bbp_admin_repair_freshness', 'priority' => 20, 'overhead' => esc_html__( 'High', 'bbpress' ), 'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ); // Sync all sticky topics in all forums bbp_register_repair_tool( array( 'id' => 'bbp-sync-all-topics-sticky', 'description' => __( 'Recalculate sticky relationship of each topic', 'bbpress' ), 'callback' => 'bbp_admin_repair_sticky', 'priority' => 25, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_topic_post_type() ) ) ); // Sync all hierarchical reply positions bbp_register_repair_tool( array( 'id' => 'bbp-sync-all-reply-positions', 'description' => __( 'Recalculate the position of each reply', 'bbpress' ), 'callback' => 'bbp_admin_repair_reply_menu_order', 'priority' => 30, 'overhead' => esc_html__( 'High', 'bbpress' ), 'components' => array( bbp_get_reply_post_type() ) ) ); // Sync all BuddyPress group forum relationships bbp_register_repair_tool( array( 'id' => 'bbp-group-forums', 'description' => __( 'Repair BuddyPress Group Forum relationships', 'bbpress' ), 'callback' => 'bbp_admin_repair_group_forum_relationship', 'priority' => 35, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_forum_post_type() ) ) ); // Update closed topic counts bbp_register_repair_tool( array( 'id' => 'bbp-sync-closed-topics', 'description' => __( 'Repair closed topics', 'bbpress' ), 'callback' => 'bbp_admin_repair_closed_topics', 'priority' => 40, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_topic_post_type() ) ) ); // Count topics bbp_register_repair_tool( array( 'id' => 'bbp-forum-topics', 'description' => __( 'Count topics in each forum', 'bbpress' ), 'callback' => 'bbp_admin_repair_forum_topic_count', 'priority' => 45, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type() ) ) ); // Count forum replies bbp_register_repair_tool( array( 'id' => 'bbp-forum-replies', 'description' => __( 'Count replies in each forum', 'bbpress' ), 'callback' => 'bbp_admin_repair_forum_reply_count', 'priority' => 50, 'overhead' => esc_html__( 'High', 'bbpress' ), 'components' => array( bbp_get_forum_post_type(), bbp_get_reply_post_type() ) ) ); // Count topic replies bbp_register_repair_tool( array( 'id' => 'bbp-topic-replies', 'description' => __( 'Count replies in each topic', 'bbpress' ), 'callback' => 'bbp_admin_repair_topic_reply_count', 'priority' => 55, 'overhead' => esc_html__( 'High', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ); // Count topic voices bbp_register_repair_tool( array( 'id' => 'bbp-topic-voices', 'description' => __( 'Count voices in each topic', 'bbpress' ), 'callback' => 'bbp_admin_repair_topic_voice_count', 'priority' => 60, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() ) ) ); // Count non-published replies to each topic bbp_register_repair_tool( array( 'id' => 'bbp-topic-hidden-replies', 'description' => __( 'Count pending, spammed, & trashed replies in each topic', 'bbpress' ), 'callback' => 'bbp_admin_repair_topic_hidden_reply_count', 'priority' => 65, 'overhead' => esc_html__( 'High', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ); // Recount topics for each user bbp_register_repair_tool( array( 'id' => 'bbp-user-topics', 'description' => __( 'Recount topics for each user', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_topic_count', 'priority' => 70, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() ) ) ); // Recount topics for each user bbp_register_repair_tool( array( 'id' => 'bbp-user-replies', 'description' => __( 'Recount replies for each user', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_reply_count', 'priority' => 75, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_reply_post_type(), bbp_get_user_rewrite_id() ) ) ); // Remove unpublished topics from user favorites bbp_register_repair_tool( array( 'id' => 'bbp-user-favorites', 'description' => __( 'Remove unpublished topics from user favorites', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_favorites', 'priority' => 80, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() ) ) ); // Remove unpublished topics from user subscriptions bbp_register_repair_tool( array( 'id' => 'bbp-user-topic-subscriptions', 'description' => __( 'Remove unpublished topics from user subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_topic_subscriptions', 'priority' => 85, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() ) ) ); // Remove unpublished forums from user subscriptions bbp_register_repair_tool( array( 'id' => 'bbp-user-forum-subscriptions', 'description' => __( 'Remove unpublished forums from user subscriptions', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_forum_subscriptions', 'priority' => 90, 'overhead' => esc_html__( 'Medium', 'bbpress' ), 'components' => array( bbp_get_forum_post_type(), bbp_get_user_rewrite_id() ) ) ); // Remove unpublished forums from user subscriptions bbp_register_repair_tool( array( 'id' => 'bbp-user-role-map', 'description' => __( 'Remap existing users to default forum roles', 'bbpress' ), 'callback' => 'bbp_admin_repair_user_roles', 'priority' => 95, 'overhead' => esc_html__( 'Low', 'bbpress' ), 'components' => array( bbp_get_user_rewrite_id() ) ) ); }Hello
My participants cannot view or reply to private topics. Administrators/keymasters seem to be able to.
I’ve installed bbPress version 2.5.14, and Members Version 2.0.2 plugins. When I look at the participant’s role it:
can read_private_forums
cannot read_private_topics
cannot read_private_repliesand I cannot edit this role: “The Participant role is not editable. This means that it is most likely added via another plugin for a special use or that you do not have permission to edit it.”
I tried deactivating plugins one by one to see if I could edit this role. I thought by default Participants could read and reply to private topics…
Thanks for any help