Forum Replies Created
-
In reply to: change css class of function with filter hook
ok, 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.
🙂
bbpress will not use it, so I’d say the answer is yes you can delete it.
But I’d suggest you export the table before deleting.
In reply to: Profile Pictures Stretchedno, I need to see what is being downloaded to your browser.
alternately :
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
In reply to: Profile Pictures Stretchedwould need a link to a live example please
the only bbpress related settings are the ones I quoted above.
on my test site
dashboard>settings>forums>forum user slugs>topics started
changes the topics list view.
so if I amend this to ‘dicsussions’ then domain.com/discussions/ works.
buddyboss is a paid plugin that ties to the free open source bbpress and buddypress plugins. As such I can’t help further, suggest you contact their support.
In reply to: Template in Block Themes?thanks – I’ll take a look 🙂
should be
dashboard>settings>forums>forum single slugs>topic
or
dashboard>settings>forums>forum user slugs>topics started
I presume you have ‘anyone can register’ ticked in :
dashboard>settings>general>membership – that will let anyone join, and at that stage you cannot know if they are real or not, so no automatic way to prevent.
I’d suggest you move to a closed registration, so that you can manually join people.
as for getting rid of those in there – you would need some code which would look for all users who have not made a forum post, but this might delete genuine users, so without a forumla to work out who is real or not, it would be hard to code/
In reply to: Limit replies per day per user?🙂
In reply to: Limit replies per day per user?you could add this to change the wording
function change_translate_text( $translated_text ) { if ( $translated_text == 'You cannot reply to this topic.' ) { //set limit $limit = 5 ; //get replies for today $user_id = get_current_user_id() ; $reply=bbp_get_reply_post_type() ; $today = getdate(); $args = array( 'post_type'=> $reply, 'order' => 'ASC', 'orderby' => 'ID', 'post_status' => 'publish', 'posts_per_page' => -1, 'post_author' => $user_id, 'date_query' => array( array( 'year' => $today['year'], 'month' => $today['mon'], 'day' => $today['mday'], ), ), ); $the_query = new WP_Query( $args ); $count = $the_query->found_posts; if ($count>=$limit) $translated_text = 'You have exceeded the number of replies you can post in a day' ; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );
In reply to: Limit replies per day per user?Just written this – should work
add_filter ('bbp_current_user_can_access_create_reply_form' , 'rew_limit_replies') ; function rew_limit_replies ($retval) { //set limit $limit = 5 ; //get replies for today $user_id = get_current_user_id() ; $reply=bbp_get_reply_post_type() ; $today = getdate(); $args = array( 'post_type'=> $reply, 'order' => 'ASC', 'orderby' => 'ID', 'post_status' => 'publish', 'posts_per_page' => -1, 'post_author' => $user_id, 'date_query' => array( array( 'year' => $today['year'], 'month' => $today['mon'], 'day' => $today['mday'], ), ), ); $the_query = new WP_Query( $args ); $count = $the_query->found_posts; if ($count>=$limit) $retval = 0 ; return $retval ; }
Just amend the line ‘$limit = 5 ;’ to whatever number you want
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: Disappearance of the menuum, not sure this is the same problem.
can you give a link to an example please
In reply to: Forum has blank pagesgreat – glad you are fixed !!
In reply to: Forum has blank pagesok, if this is a block theme then come back, otherwise take a look at
section 8 and look at this link which gives a template
In reply to: Forum has blank pagesso this is a custom theme you are building?
In reply to: Display curent forum in topic pageor you could just display the bbpress breadcrumb by by changing the css file, or putting this in the custom css
.bbp-breadcrumb { display: block !important; padding-top: 20px; }