Search Results for 'code'
-
Search Results
-
Hi bbpress friends,
I want to combine the shortcode with a href html command. At the moment iam doing this:
<td> [caption id="attachment_238" align="aligncenter" width="150"]<a href=[bbp-topic-form forum_id=659]><img class="wp-image-238 size-thumbnail" src="http://hilf-mir-aus.de/wp-content/uploads/2018/03/internet.png" alt="" width="150" height="150" /></a> Internet & Technik[/caption] </td>Any guesses, its not working…
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!
When you enter a forum, a list of Topics is shown, but the table header says “Forum” instead of “Topics”. I have checked the source code and _e(“Forum”, “bbPress”) is used, and probably elsewhere as well.
There does not seem to be a way to properly rename each label in bbPress.1. I think the label is wrong as we list Topics and not Fora
2. Could bbPress not facilitate to rename more labels? Our customer even wants the label to be CATEGORIES rather than even Topics.I know, I could add a JS per page plugin and do a jQuery to renbame, but that ius of course the LAST resort – bad design.
Thanks for any hints to achieve or a fix on bbPress (e.g. adding a filter for certain such areas)
Carsten
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.