Search Results for 'code'
-
Search Results
-
Hi, I would like to know how to change the “forum” link in the breadcrumbs to link to another page I built the forums using the shortcodes and the “forum” link in the breadcrumbs takes me to the default forum page.
I would like it to go to the page I created.
Help!
I’m trying to get replycounts after the the latest posttitle. (widget)
e.g:
Avatar – Name – date – title – (number of replies)
I can’t get it working. This is sofar I have now:$forum_id = bbp_get_topic_forum_id($topic_id); $topic_id = bbp_get_topic_id($widget_query->post->ID); $reply_id = bbp_get_reply_id( $widget_query->post->ID ); $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.bbp_get_topic_post_count($forum_id, $topic_id, $total_count).')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';This is a snippet form the BBP latest post widget. It counts replies but not for separatly the latest post. It gives wrong results and those countresults are different on what page you’re visting. (index, forum, topicpage ect.)
Could somebody put me in the wright direction?Many thanks in advance.
Hi my forum appears in a part of the site that has a generic login. So what i need is that users have to type in email and name in order to post – is this possible? is there a shortcode for this or do i have to add something to the bbpress.php?
thank you in advance
MelanieHey there,
after having recently started with bbpress 2.5.4 and WP 4.1, I ran into a “404” problem after having created forum and topic as per the step-by-step directive (using method #2 with shortcode).
Right from the start, a “404” appeared when startgin from the forum index page (the one with the shortcode). I spent the last 40 hrs reading and trying the various proposed fixes, none worked.
However, deactivating the installed plugins and trying did point to WooCommerce Multilingual
being the culprit, since the forums, subforums, categories, topics work fine when WC Mutlilingual is deactivated. If WC ML is activated, the same URL (using “postname”) is crashing to a “404”.I somebody has run into similar problem and/or a diagnosis on what the reason is-
or even better can provide the magic fix, please step up and collect the praise… I myself m at the very end of my wits and carry a dangerous 1/8 knowledge about what I am doing…Cheers,
O.Topic: Need help with custom roles
Hi
This is my third time trying to post here hopefully it sticks this time.
I am trying to add some custom roles to the bbpress forums and I have followed the Custom Capabilities codex page.
It doesn’t appear to be working as intended though as I cannot give myself the owner role
I would like these roles in bbpress to sync with some custom wp roles made with the members plugin.
sorry for the wall of text below but its an effort to get this topic posted (i had links in the previous topics)
here is what i have in my child themes functions.php
// add bbPress Roles******************************************** function add_new_roles( $bbp_roles ) { /* Add a role called BlockFusion Owner */ $bbp_roles['bbp_owner'] = array( 'name' => 'BlockFusion Owner', 'capabilities' => custom_capabilities( 'bbp_owner' ) ); /* Add a role called Co-Owner */ $bbp_roles['bbp_co_owner'] = array( 'name' => 'Co-Owner', 'capabilities' => custom_capabilities( 'bbp_co_owner' ) ); /* Add a role called Admin */ $bbp_roles['bbp_admin'] = array( 'name' => 'Admin', 'capabilities' => custom_capabilities( 'bbp_admin' ) ); /* Add a role called Moderator */ $bbp_roles['bbp_moderator'] = array( 'name' => 'Moderator', 'capabilities' => custom_capabilities( 'bbp_moderator' ) ); /* Add a role called Member */ $bbp_roles['bbp_member'] = array( 'name' => 'Member', 'capabilities' => custom_capabilities( 'bbp_member' ) ); /* Add a role called Guest */ $bbp_roles['bbp_guest'] = array( 'name' => 'Guest', 'capabilities' => custom_capabilities( 'bbp_guest' ) ); 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_owner' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_co_owner' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_admin' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_moderator' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_member' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_guest' ) $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 'BlockFusion Owner' role */ case 'bbp_owner': return array( // Keymasters only 'keep_gate' => true, // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // Forum caps 'publish_forums' => true, 'edit_forums' => true, 'edit_others_forums' => true, 'delete_forums' => true, 'delete_others_forums' => true, '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, ); /* Capabilities for 'Co-Owner' role */ case 'bbp_co_owner': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // Forum caps 'publish_forums' => true, 'edit_forums' => true, 'edit_others_forums' => true, 'delete_forums' => true, 'delete_others_forums' => true, '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, ); /* Capabilities for 'Admin' role */ case 'bbp_admin': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // 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, ); /* Capabilities for 'Moderator' role */ case 'bbp_moderator': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // 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, ); /* Capabilities for 'Member' role */ case 'bbp_member': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => false, 'throttle' => true, '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' => true, 'edit_others_topics' => false, 'delete_topics' => true, 'delete_others_topics' => false, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => true, 'delete_others_replies' => false, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => true, 'edit_topic_tags' => true, 'delete_topic_tags' => true, 'assign_topic_tags' => true, ); /* Capabilities for 'Guest' role */ case 'bbp_guest': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => false, 'throttle' => true, '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' => true, 'edit_others_topics' => false, 'delete_topics' => true, 'delete_others_topics' => false, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => true, 'delete_others_replies' => false, '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; } }