Search Results for 'code'
-
Search Results
-
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 //Hi, I am using bbPress 2.5 here: https://discusspf.com/community/
My problem is occurring as follows: I have the forum set up so it displays the recent topics as a shortcode on a page for the forum. This works fine for me (keymaster) and displays a create topic box at the bottom of the forum. However, for normal users it displays that they cannot create topics on the forum index, but when they navigate to a particular forum area they are able to create topics then. What is causing this issue and how might I fix it?
Thanks in advance.
Hello!
We are looking to modify BBpress meaning:
– remove the possibility for anonymous users posting answers to questions.
– remove BBpress notices like âYou can publish HTML contentâ or âYou can use BBCodes to format your contentâ.
– remove the website field request when asking a question, along subject type and question status.
– add a name for the description field regarding the title of the subject.
– customize the right sidebar to include: add a question, search and categories of the forum.We are using bbpress 2.5.14 and wordpress 4.7.9. Any help will be much appreciated.
Thank you!
Topic: Changing Display Name
I am unable to have access to the “Name” field in the Profile editor. Even as an Admin, I can’t change my displayname/profile name.
The only way I can is to go into
Inspect Element>Rightclick
Find and click “<fieldset class=”bbp-form” style=”display: none;”>
<legend>Name</legend>” tag in the page.Edit the “element.style” from “display:none;” to “display:block;”.
Unfortunately this element has a “Display:none” embedded into the code that I can’t seem to find anywhere else in the back end to manually force it to display.
If anybody could help me I would be very grateful.
My installation is here: https://discusspf.com/community/
My trouble is with font sizes. OP seems to be too small, all further replies are decent size and anything included in a quote is huge. Is there a way to change these just for the bbPress part of my theme? I have the ability to add custom CSS for bbPress but donât know what code to add. Can someone please supply code which will make OP and quote text the same size as all the replies. Thanks a bunch in advance!
Hi! I would like to provide the best writing experience possible for users of the forum I plan to set up with bbpress. Gutenberg is a good example–a clean “elegant” interface, options to go full screen (so the only thing user sees is where they will write), options to style with a button click, and option to easily insert code snippets with a button click. Its comparable to using good writing software, and no need for non-technical users to know what “UL”, “OL”, “Li” etc mean.
I have been looking through some plugins for styling bbpress, but I have not seen them discuss this aspect. Are there options available to make the bbpress text editor “elegant” in a way that is comparable to Gutenberg or the writing experience on a spot like medium.com?