Forum Replies Created
-
In reply to: List parent forum in Recent Topics widget?
great – glad you’re fixed
This code will limit the topic title to 80 or whatever number you set $length to
Put it in your child theme functions.php file
add_filter ('bbp_new_topic_pre_title' , 'rew_limit_topic_length' ) ; add_filter ('bbp_edit_topic_pre_title' , 'rew_limit_topic_length' ) ; function rew_limit_topic_length ($topic_title) { $length = 80 ; if (strlen($topic_title) > $length) { $topic_title = substr($topic_title, 0, $length); } return $topic_title ; }In reply to: The Participant role is not editableso they seem to be saying that their plugin won’t let you change it.
not sure I can help further without access, and that’s beyond free help
In reply to: How I can remove the written “Forum bbPress”unfortunately it isn’t enough. Normally the title is just Forum, so without being able to examine a browser to see where this is coming from, I ma not able to help.
It may be your theme is doing this.
The only solution I found was 8 years oldmay well still be valid – link to this please
In reply to: Users can use index create thread areacan you say which shortcode(s) you are using on that page
In reply to: List parent forum in Recent Topics widget?my style pack plugin has a latest activity widget that lets you display the above
In reply to: User Roles – Adding/RenamingThe 2nd function assumes that you only have the default roles.
Put this first and it should work ie
//BBpress Rename Roles // /* BBPress Renaming Roles */ add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' , 1); 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 // //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 //In reply to: How to display all submitted topics on page?a link to a site where your desired layout is shown would be great
In reply to: How I can remove the written “Forum bbPress”a link to the site where it is would be great
yes, it makes a gravity post and a topic post.
You could code to remove the latter as part of this function by adding further code, but in all honesty I wouldn’t worry, you’d need to be creating thousands of topics a month to make an impact on performance
In reply to: Login Widget Help Neededgreat – glad you are fixed
to only have it for a specified form, you add the form id
eg
add_action( 'gform_after_submission_5', 'set_post_content', 10, 2 );will make it fire only for gravity form ID 5
In reply to: Login Widget Help Neededtry this in your custom css
.container { width: 100%; } .et_pb_widget { word-wrap : normal ; } #sidebar .bbp-login-form label { width: auto; }In reply to: Login Widget Help NeededI need a link to your site
In reply to: Newsletter IntegrationIn reply to: Test Topicand did it work ?
In reply to: deactivating bbpress causes site to crashIt could be coded, but it would be an hours work and several calls. A plugin that relies on bbpress should check that when loaded, but whilst I know most of mine do, I couldn’t swear that they all do !!
In reply to: list of all functionswould love to find the time to write it!!
Like all open software bbpress relies on users to make it successful, and I’m not a bbpress author, just a user who got into it, and I wrote much of the ‘getting started’ guide as I installed my first bbpress site.
If you want to help, then as above the key start point is the templates. Mapping these into a user understandable chart would be a great start, so go to
bbpress/templates/default/bbress/content-archive-forum.php
This is the first template called, and all the functions and templates you want to use will cascade from here.In reply to: signature separatorbbpress doesn’t have a signature field. Are you using another plugin to do this ?
this is a conditional statement
basically it has 3 parts
test
?
true
:
falseeach in this case is a function
so the test is bbp_show_lead_topic() – This will return false by default, but if you set it using a filter, then it would be true
if this returns true then the ‘?’ function is executed which will show the reply count (just the number of replies)
if false then the ‘:’ statement is executed which shows then post count (the count of topic + replies ie replies +1)
In reply to: Threaded Replies not workingok, so
1. Save the attached code to your pc, as a new file called reply.js
2. Create a directory on your theme called ‘js’, and copy the renamed file reply.js to it, so that you end up with wp-content/themes/%my-theme%/js/reply.jswhere %my-theme% is the name of your theme
Let me know if this works
addReply = { moveForm : function(replyId, parentId, respondId, postId) { var t = this, div, reply = t.I(replyId), respond = t.I(respondId), cancel = t.I('bbp-cancel-reply-to-link'), parent = t.I('bbp_reply_to'), post = t.I('bbp_topic_id'); if ( ! reply || ! respond || ! cancel || ! parent ) return; t.respondId = respondId; postId = postId || false; if ( ! t.I('bbp-temp-form-div') ) { div = document.createElement('div'); div.id = 'bbp-temp-form-div'; div.style.display = 'none'; respond.parentNode.insertBefore(div, respond); } reply.parentNode.insertBefore(respond, reply); if ( post && postId ) post.value = postId; parent.value = parentId; cancel.style.display = ''; cancel.onclick = function() { var t = addReply, temp = t.I('bbp-temp-form-div'), respond = t.I(t.respondId); if ( ! temp || ! respond ) return; t.I('bbp_reply_to').value = '0'; temp.parentNode.insertBefore(respond, temp); temp.parentNode.removeChild(temp); this.style.display = 'none'; this.onclick = null; return false; } try { t.I('bbp_reply_content').focus(); } catch(e) { } return false; }, I : function(e) { tinymce.execCommand('mceFocus',false,'bbp_reply_content'); } }In reply to: Nested replies not workingok, so
1. Save the attached code to your pc, as a new file called reply.js
2. Create a directory on your theme called ‘js’, and copy the renamed file reply.js to it, so that you end up with wp-content/themes/%my-theme%/js/reply.jswhere %my-theme% is the name of your theme
Let me know if this works
addReply = { moveForm : function(replyId, parentId, respondId, postId) { var t = this, div, reply = t.I(replyId), respond = t.I(respondId), cancel = t.I('bbp-cancel-reply-to-link'), parent = t.I('bbp_reply_to'), post = t.I('bbp_topic_id'); if ( ! reply || ! respond || ! cancel || ! parent ) return; t.respondId = respondId; postId = postId || false; if ( ! t.I('bbp-temp-form-div') ) { div = document.createElement('div'); div.id = 'bbp-temp-form-div'; div.style.display = 'none'; respond.parentNode.insertBefore(div, respond); } reply.parentNode.insertBefore(respond, reply); if ( post && postId ) post.value = postId; parent.value = parentId; cancel.style.display = ''; cancel.onclick = function() { var t = addReply, temp = t.I('bbp-temp-form-div'), respond = t.I(t.respondId); if ( ! temp || ! respond ) return; t.I('bbp_reply_to').value = '0'; temp.parentNode.insertBefore(respond, temp); temp.parentNode.removeChild(temp); this.style.display = 'none'; this.onclick = null; return false; } try { t.I('bbp_reply_content').focus(); } catch(e) { } return false; }, I : function(e) { tinymce.execCommand('mceFocus',false,'bbp_reply_content'); } }In reply to: Only social login membersno problem, glad to have helped !
In reply to: Forum sending email notifications to itselfyes add this to your child theme function file
add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply') ; function rew_no_reply () { Return 'xxx@yyy.com' ; }changing xxx@yyy.com to wehatever address you want