162: Joshua has earned 162 Hero Points by being an active WPMU DEV member. They can use these to buy real stuff!
251: Joshua has earned 251 Reputation Points by getting involved in the WPMU DEV community.

Joshua
https://artofwargaming.net The Incredible Code Injector
Visit Twitter Profile Visit Facebook Profile
Member since September 2014
Not a WPMU DEV member?
Get access to super-powered hosting, site management tools for all your sites on any host, 24/7 live support, premium plugins, and private member forums!
Learn more Already a member? Login

-
Joshua commented on BBpress Custom Roles/Rename Existing RolesApr 05, 2018
hi Calum Brash , I worked around this by using a capabilities editor plugin. I was able to get those permissions fixed in the database using it. -
Joshua commented on BBpress Custom Roles/Rename Existing RolesApr 04, 2018
Hi Ash , Here is the code: //BBpress Register New Role// function add_role_caps_filter( $caps, $role ) { /* Only filter for roles we are interested in! */ if( $role == 'bbp_community_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_community_lead': return array( // Primary caps 'spectate' => false, 'participate' => false, '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' => false, 'edit_others_topics' => false, 'delete_topics' => false, 'delete_others_topics' => false, 'read_private_topics' => false, // Reply caps 'publish_replies' => true, 'edit_replies' => false, 'edit_others_replies' => false, 'delete_replies' => false, 'delete_others_replies' => false, 'read_private_replies' => false, // Topic tag caps 'manage_topic_tags' => false, 'edit_topic_tags' => false, 'delete_topic_tags' => false, 'assign_topic_tags' => false, ); break; default : return $role; } } //BBpress Rename 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() ) ), 'bbp_community_lead' => array( 'name' => 'Community Lead', 'capabilities' => custom_capabilities( 'bbp_community_lead' ) ), // 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() ) ) ); } // End BBpress Custom Roles // -
Joshua commented on BBpress Custom Roles/Rename Existing RolesApr 03, 2018
Hi Ash , This code works for registering the new role. I can see it, and I can select it for a user. However; I'm a bit confused as to if it's actually working. I created a new role called "Community Lead". The initial code I select should not give that role moderation capabilities, however; when I log in with that user they have full moderation capabilities. Even when I've set everything to "false" it still has moderation privileges. -
Joshua commented on Gravity Form - Create BBPress Topic In Specific ForumApr 03, 2018
Hi Kasia Swiderska , Thanks for the reply. I was told I need to register a "dynamic bbpress role". Now, I think I've done this with my other support topic ( https://premium.wpmudev.org/forums/topic/bbpress-custom-rolesrename-existing-roles ) -
Joshua commented on BBpress - Topic ExcerptsMar 26, 2018
Hi Kasia Swiderska , I got this fixed by using the plugin bbp style pack. The author, Robin, is very active and helped me work out an issue I had but it is now doing what I want it to do. Thank you so much for the follow up on this. -
Joshua commented on Gravity Form - Create BBPress Topic In Specific ForumMar 26, 2018
Hi Kasia Swiderska , Thanks for the follow up. I got this to work as intended. I'm just working through how to tell the code to add a custom taxonomy to the topic since I'm using Dev4Pres Topic Prefix with BBpress. The topic prefix are terms in the taxonomy. -
Joshua commented on [Social Marketing] Social Media PromotionMar 19, 2018
Hi Kasia Swiderska , I will look at the plugin for sure! Thanks for that information. -
Joshua commented on Gravity Form - Create BBPress Topic In Specific ForumMar 19, 2018
Hi Nithin , Thanks for the information. I did take a look at the documentation and found out I could put the id at the end of the action code. What I've done is set up a GF Form and added the "Post Fields" and set it to post a new Topic as the "post type". http://ibb.co/mumV0H The code works but the problem I'm having now is it is double posting in the forums and I'm not sure why it's doing this. https://ibb.co/hzOsVH -
Joshua commented on BBpress - Topic ExcerptsMar 19, 2018
Hi Kasia Swiderska , I think I used the wrong term "excerpts" in my original post. I basically wanted to replace the "freshness" column with the actual latest topic. Here is my code for the loop-single-topic.php <?php /** * Topics Loop - Single * * @package bbPress * @subpackage Theme */ ?> <ul id="bbp-topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> <li class="bbp-topic-title"> <?php if ( bbp_is_user_home() ) : ?> <?php if ( bbp_is_favorites() ) : ?> <span class="bbp-row-actions"> <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?> <?php bbp_topic_favorite_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '×' ) ); ?> <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?> </span> <?php elseif ( bbp_is_subscriptions() ) : ?> <span class="bbp-row-actions"> <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?> <?php bbp_topic_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '×' ) ); ?> <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?> </span> <?php endif; ?> <?php endif; ?> <?php do_action( 'bbp_theme_before_topic_title' ); ?> <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a> <?php do_action( 'bbp_theme_after_topic_title' ); ?> <?php bbp_topic_pagination(); ?> <?php do_action( 'bbp_theme_before_topic_meta' ); ?> <p class="bbp-topic-meta"> <?php do_action( 'bbp_theme_before_topic_started_by' ); ?> <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_started_by' ); ?> <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?> <?php do_action( 'bbp_theme_before_topic_started_in' ); ?> <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_started_in' ); ?> <?php endif; ?> </p> <?php do_action( 'bbp_theme_after_topic_meta' ); ?> <?php bbp_topic_row_actions(); ?> </li> <li class="bbp-topic-voice-count"><?php bbp_topic_voice_count(); ?></li> <li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?></li> <li class="bbp-topic-freshness"> <?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?> <?php bbp_topic_freshness_link(); ?> <?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?> <p class="bbp-topic-meta"> <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?> <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?> </p> </li> </ul><!-- #bbp-topic-<?php bbp_topic_id(); ?> --> -
Joshua commented on BBpress Custom Roles/Rename Existing RolesMar 18, 2018
Ash , OH my gosh! I didn't even think to do that. I hadn't realized that there were two functions to create a role and add a capability. Thanks so much for helping me get this resolved. I really appreciate it.
Upgrade Membership
Hello - you seem to have stumbled upon a super-secret ultra-private members-only page on the WPMU DEV forums. This is where people go to discuss their business secrets and development tips. Want in?
- Access to business, marketing and development sparring with peers
- Access to business, marketing and development sparring with peers
- Access to all our premium plugins
- Access to all our premium plugins
- Full Security, SEO, Backup and Performance service suites
- Full Security, SEO, Backup and Performance service suites