Forum Replies Created
-
In reply to: Add forum but viewing goes to blank page
sorry, ! can’t get to our site as ssl cert is not valid.
what theme are you using ?
In reply to: Forum Page Titletook me a few minutes to work it out !!
Try
.post-type-archive-forum p { display: none ; }this might hep
https://pmgarman.me/delete-users-without-posts-from-wordpress/
bbpress just uses worpdress posts, so it should work.
BUT ensure you can restore if it does something funny !!
great, glad you are fixed 🙂
bbpress has roles of keymaster, moderator, participant, spectator and blocked – see
The rest of the above is either roles that you have created or come with memberpress, or roles that don’t exist but that you want – it’s not quite clear which 🙂 – please come back with further info.
so is a ‘secondary keymaster’ a concept you want, or something that you have created or exists in memberpress???
If you want to create a new memberpress role then the capabilities in the link above might help.
In reply to: Are logins from Woocommerce the same for BBpress?single login, so not sure why @billz88 has a problem.
Woocomerce, bbpress and wordpress all use same login
only so much I can do for free 🙁
In reply to: FORUM PERMALINKdashboard>settings>forums>forum root slug>Forum Prefix
can’t remember, try it
In reply to: Remove Separatorit’s a lot of code to learn.
There are hundreds of filters and actions.
most of it is detective work.
I have bbpress in a folder on my laptop/
I use
https://notepad-plus-plus.org/
as my main tool, it understands all the file types and displays them in a very readable way.
It has a ‘search on files’, so in your case I looked for ‘subscribe’ as this was the word that had the | before it.
that got me to the subscribe link function, which has the
' | 'in it, which got me to the filterWhen you came back with it changing when you click, I then searched for
' | 'and found it in the core function.For the ‘before_xx_parse_args’ and other filter stuff see
In reply to: Remove Separatorah, found the function that the ajax call is doing.
this code works on my test site
function remove_sep ($args) { $args['before'] = ' ' ; return $args ; } add_filter ('bbp_before_get_topic_subscribe_link_parse_args', 'remove_sep') ; remove_action( 'bbp_ajax_subscription', array( 'BBP_Default', 'ajax_subscription' ) ); add_action ( 'bbp_ajax_subscription', 'new_ajax_subscription'); function new_ajax_subscription() { // Bail if subscriptions are not active if ( ! bbp_is_subscriptions_active() ) { bbp_ajax_response( false, esc_html__( 'Subscriptions are no longer active.', 'bbpress' ), 300 ); } // Bail if user is not logged in if ( ! is_user_logged_in() ) { bbp_ajax_response( false, esc_html__( 'Please login to subscribe.', 'bbpress' ), 301 ); } // Get user and topic data $user_id = bbp_get_current_user_id(); $id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0; $type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post'; // Bail if user cannot add favorites for this user if ( ! current_user_can( 'edit_user', $user_id ) ) { bbp_ajax_response( false, esc_html__( 'You do not have permission to do this.', 'bbpress' ), 302 ); } // Get the object if ( 'post' === $type ) { $object = get_post( $id ); } // Bail if topic cannot be found if ( empty( $object ) ) { bbp_ajax_response( false, esc_html__( 'Subscription failed.', 'bbpress' ), 303 ); } // Bail if user did not take this action if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $object->ID ) ) { bbp_ajax_response( false, esc_html__( 'Are you sure you meant to do that?', 'bbpress' ), 304 ); } // Take action $status = bbp_is_user_subscribed( $user_id, $object->ID ) ? bbp_remove_user_subscription( $user_id, $object->ID ) : bbp_add_user_subscription( $user_id, $object->ID ); // Bail if action failed if ( empty( $status ) ) { bbp_ajax_response( false, esc_html__( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 ); } // Put subscription attributes in convenient array $attrs = array( 'object_id' => $object->ID, 'object_type' => $type, 'user_id' => $user_id ); // Add separator to topic if favorites is active if ( ( 'post' === $type ) && ( bbp_get_topic_post_type() === get_post_type( $object ) ) && bbp_is_favorites_active() ) { $attrs['before'] = ' '; } // Action succeeded bbp_ajax_response( true, bbp_get_user_subscribe_link( $attrs, $user_id, false ), 200 ); }not really possible – sorry
can I just ask why you need to change this class ame, rather than just style the class to what you want
In reply to: Css style for special replyadd_filter ('bbp_get_topic_class', 'rew_author_current' , 100 , 3) ; add_filter ('bbp_get_reply_class', 'rew_author_current' , 100 , 3) ; function rew_author_current ($post_classes, $topic_id, $classes) { $author_id = bbp_get_topic_author_id( $topic_id ); $current_id = get_current_user_id() ; if ($author_id == $current_id) { $post_classes[] = 'rew-current-user' ; $post_classes = array_merge( (array) $post_classes); } return $post_classes ; }will give you ‘rew-current-user’ as a style to add css
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
In reply to: Remove Separatorfunction remove_sep ($args) { $args['before'] = ' ' ; return $args ; } add_filter ('bbp_before_get_topic_subscribe_link_parse_args', 'remove_sep') ; is the code for space, so if you want 2 spaces put$args['before'] = ' ' ;In reply to: change css class of function with filter hookok, let’s just redo the whole thing
function custom_callback( $args=array()) { // Parse arguments against default values $r = bbp_parse_args( $args, array( 'select_id' => 'bbp_topic_status', 'select_class' => 'my-class', 'tab' => false, 'topic_id' => 0, 'selected' => false ), 'topic_open_close_select' ); // Filter & return return apply_filters( 'custom_callback', ob_get_clean(), $r, $args ); } add_filter( 'bbp_get_form_topic_status_dropdown', 'custom_callback');In reply to: change css class of function with filter hookthe ‘,2’ might be the issue, as you only then use 1, but try this
function custom_callback($args) { $args['select_class'] = 'my-class' ; return $args; } add_filter( 'bbp_get_form_topic_status_dropdown', 'custom_callback');In reply to: Topic only visable for selected userok, my code does not change any roles, the user will still get the participant role.
The plugin makes them a member of a group, and as the forum is also a member of that group, they can them see the forum. The forum’s topic permissions then let them see only their topic
In reply to: Topic only visable for selected userso are you adding on first visit, or on every visit?
In reply to: user profile link giving a 404 errorIn reply to: Topic only visable for selected userif user creates topic, iit is already assigned them
If you are creating topics, then you can amend the user in the topic backend
dashboard>topics>edit topic and you will see the topic author as you and can change.
In reply to: Topic only visable for selected userand look at the topic permissions settings, in particular
Create/Edit/view OWN Topics,
In reply to: Translating [bbp-forum-index] shortcode output.‘Associated Courses and Groups’ has nothing to do with bbpress.
I’d suspect it is either something in learndash, or something you have called a page in WP where the shiortcode is held, or a name you have given to something.
🙂