Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 5,451 through 5,475 (of 64,309 total)
  • Author
    Search Results
  • #205179
    Robin W
    Moderator
    #205168

    In reply to: Working Member List?

    Robin W
    Moderator

    bbpress version 2 just uses WordPress users, so look at WordPress list members plugins

    for instance

    Members List Plugin

    #205167

    In reply to: Working Member List?

    Robin W
    Moderator

    this is code from bbpress version 1 – 9 years ago, unlikely to work

    #205166
    stracy2
    Participant

    I’m using WordPress 5.2.4, bbPress 2.6 RC 7. I can privately give anyone in-the-know and willing to help a link to a test site.

    Symptoms – A search with one word typically works, but a search with more than one word typically gives HTTP error 500. Another symptom, the search first results page isn’t themed.

    The symptoms occur with any/all themes, with all plug ins disabled except bbpress.

    The symptoms appear like a server resource issue, but this is an AWS machine and more memory/CPU, increasing memory_limit in php.ini, doesn’t change symptoms.

    Is there a limit on database size bbPress can handle? The site has roughly 18K users, 100 Forums, 30K Topics, 160K replies.

    I’m grateful for any help, direction, diagnostics.

    #205150

    In reply to: bbpress Loop Argument

    Robin W
    Moderator

    I’d be tempted to just clone the bbp_has_topics function

    eg

    add this to your functions file

    function babblebey_has_topics( $args = '' ) {
    	global $wp_rewrite;
    
    	/** Defaults **************************************************************/
    
    	// Other defaults
    	$default_topic_search  = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false;
    	$default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search );
    	$default_post_parent   = bbp_is_single_forum() ? bbp_get_forum_id() : 'any';
    
    	// Default argument array
    	$default = array(
    		'post_type'      => bbp_get_topic_post_type(), // Narrow query down to bbPress topics
    		'post_parent'    => $default_post_parent,      // Forum ID
    		'meta_key'       => '_bbp_last_active_time',   // Make sure topic has some last activity time
    		'orderby'        => 'meta_value',              // 'meta_value', 'author', 'date', 'title', 'modified', 'parent', rand',
    		'order'          => 'DESC',                    // 'ASC', 'DESC'
    		'posts_per_page' => -1, 						// Topics per page
    		'paged'          => bbp_get_paged(),           // Page Number
    		's'              => $default_topic_search,     // Topic Search
    		'show_stickies'  => $default_show_stickies,    // Ignore sticky topics?
    		'max_num_pages'  => false,                     // Maximum number of pages to show
    	);
    
    	// What are the default allowed statuses (based on user caps)
    	if ( bbp_get_view_all() ) {
    
    		// Default view=all statuses
    		$post_statuses = array(
    			bbp_get_public_status_id(),
    			bbp_get_closed_status_id(),
    			bbp_get_spam_status_id(),
    			bbp_get_trash_status_id()
    		);
    
    		// Add support for private status
    		if ( current_user_can( 'read_private_topics' ) ) {
    			$post_statuses[] = bbp_get_private_status_id();
    		}
    
    		// Join post statuses together
    		$default['post_status'] = implode( ',', $post_statuses );
    
    	// Lean on the 'perm' query var value of 'readable' to provide statuses
    	} else {
    		$default['perm'] = 'readable';
    	}
    
    	// Maybe query for topic tags
    	if ( bbp_is_topic_tag() ) {
    		$default['term']     = bbp_get_topic_tag_slug();
    		$default['taxonomy'] = bbp_get_topic_tag_tax_id();
    	}
    
    	/** Setup *****************************************************************/
    
    	// Parse arguments against default values
    	$r = bbp_parse_args( $args, $default, 'babblebey_topics' );
    
    	// Get bbPress
    	$bbp = bbpress();
    
    	// Call the query
    	$bbp->topic_query = new WP_Query( $r );
    
    	// Set post_parent back to 0 if originally set to 'any'
    	if ( 'any' === $r['post_parent'] )
    		$r['post_parent'] = 0;
    
    	// Limited the number of pages shown
    	if ( !empty( $r['max_num_pages'] ) )
    		$bbp->topic_query->max_num_pages = $r['max_num_pages'];
    
    	/** Stickies **************************************************************/
    
    	// Put sticky posts at the top of the posts array
    	if ( !empty( $r['show_stickies'] ) && $r['paged'] <= 1 ) {
    
    		// Get super stickies and stickies in this forum
    		$stickies = bbp_get_super_stickies();
    
    		// Get stickies for current forum
    		if ( !empty( $r['post_parent'] ) ) {
    			$stickies = array_merge( $stickies, bbp_get_stickies( $r['post_parent'] ) );
    		}
    
    		// Remove any duplicate stickies
    		$stickies = array_unique( $stickies );
    
    		// We have stickies
    		if ( is_array( $stickies ) && !empty( $stickies ) ) {
    
    			// Start the offset at -1 so first sticky is at correct 0 offset
    			$sticky_offset = -1;
    
    			// Loop over topics and relocate stickies to the front.
    			foreach ( $stickies as $sticky_index => $sticky_ID ) {
    
    				// Get the post offset from the posts array
    				$post_offsets = wp_filter_object_list( $bbp->topic_query->posts, array( 'ID' => $sticky_ID ), 'OR', 'ID' );
    
    				// Continue if no post offsets
    				if ( empty( $post_offsets ) ) {
    					continue;
    				}
    
    				// Loop over posts in current query and splice them into position
    				foreach ( array_keys( $post_offsets ) as $post_offset ) {
    					$sticky_offset++;
    
    					$sticky = $bbp->topic_query->posts[$post_offset];
    
    					// Remove sticky from current position
    					array_splice( $bbp->topic_query->posts, $post_offset, 1 );
    
    					// Move to front, after other stickies
    					array_splice( $bbp->topic_query->posts, $sticky_offset, 0, array( $sticky ) );
    
    					// Cleanup
    					unset( $stickies[$sticky_index] );
    					unset( $sticky );
    				}
    
    				// Cleanup
    				unset( $post_offsets );
    			}
    
    			// Cleanup
    			unset( $sticky_offset );
    
    			// If any posts have been excluded specifically, Ignore those that are sticky.
    			if ( !empty( $stickies ) && !empty( $r['post__not_in'] ) ) {
    				$stickies = array_diff( $stickies, $r['post__not_in'] );
    			}
    
    			// Fetch sticky posts that weren't in the query results
    			if ( !empty( $stickies ) ) {
    
    				// Query to use in get_posts to get sticky posts
    				$sticky_query = array(
    					'post_type'   => bbp_get_topic_post_type(),
    					'post_parent' => 'any',
    					'meta_key'    => '_bbp_last_active_time',
    					'orderby'     => 'meta_value',
    					'order'       => 'DESC',
    					'include'     => $stickies
    				);
    
    				// Cleanup
    				unset( $stickies );
    
    				// Conditionally exclude private/hidden forum ID's
    				$exclude_forum_ids = bbp_exclude_forum_ids( 'array' );
    				if ( ! empty( $exclude_forum_ids ) ) {
    					$sticky_query['post_parent__not_in'] = $exclude_forum_ids;
    				}
    
    				// What are the default allowed statuses (based on user caps)
    				if ( bbp_get_view_all() ) {
    					$sticky_query['post_status'] = $r['post_status'];
    
    				// Lean on the 'perm' query var value of 'readable' to provide statuses
    				} else {
    					$sticky_query['post_status'] = $r['perm'];
    				}
    
    				// Get all stickies
    				$sticky_posts = get_posts( $sticky_query );
    				if ( !empty( $sticky_posts ) ) {
    
    					// Get a count of the visible stickies
    					$sticky_count = count( $sticky_posts );
    
    					// Merge the stickies topics with the query topics .
    					$bbp->topic_query->posts       = array_merge( $sticky_posts, $bbp->topic_query->posts );
    
    					// Adjust loop and counts for new sticky positions
    					$bbp->topic_query->found_posts = (int) $bbp->topic_query->found_posts + (int) $sticky_count;
    					$bbp->topic_query->post_count  = (int) $bbp->topic_query->post_count  + (int) $sticky_count;
    
    					// Cleanup
    					unset( $sticky_posts );
    				}
    			}
    		}
    	}
    
    	// If no limit to posts per page, set it to the current post_count
    	if ( -1 === $r['posts_per_page'] )
    		$r['posts_per_page'] = $bbp->topic_query->post_count;
    
    	// Add pagination values to query object
    	$bbp->topic_query->posts_per_page = $r['posts_per_page'];
    	$bbp->topic_query->paged          = $r['paged'];
    
    	// Only add pagination if query returned results
    	if ( ( (int) $bbp->topic_query->post_count || (int) $bbp->topic_query->found_posts ) && (int) $bbp->topic_query->posts_per_page ) {
    
    		// Limit the number of topics shown based on maximum allowed pages
    		if ( ( !empty( $r['max_num_pages'] ) ) && $bbp->topic_query->found_posts > $bbp->topic_query->max_num_pages * $bbp->topic_query->post_count )
    			$bbp->topic_query->found_posts = $bbp->topic_query->max_num_pages * $bbp->topic_query->post_count;
    
    		// If pretty permalinks are enabled, make our pagination pretty
    		if ( $wp_rewrite->using_permalinks() ) {
    
    			// User's topics
    			if ( bbp_is_single_user_topics() ) {
    				$base = bbp_get_user_topics_created_url( bbp_get_displayed_user_id() );
    
    			// User's favorites
    			} elseif ( bbp_is_favorites() ) {
    				$base = bbp_get_favorites_permalink( bbp_get_displayed_user_id() );
    
    			// User's subscriptions
    			} elseif ( bbp_is_subscriptions() ) {
    				$base = bbp_get_subscriptions_permalink( bbp_get_displayed_user_id() );
    
    			// Root profile page
    			} elseif ( bbp_is_single_user() ) {
    				$base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
    
    			// View
    			} elseif ( bbp_is_single_view() ) {
    				$base = bbp_get_view_url();
    
    			// Topic tag
    			} elseif ( bbp_is_topic_tag() ) {
    				$base = bbp_get_topic_tag_link();
    
    			// Page or single post
    			} elseif ( is_page() || is_single() ) {
    				$base = get_permalink();
    
    			// Forum archive
    			} elseif ( bbp_is_forum_archive() ) {
    				$base = bbp_get_forums_url();
    
    			// Topic archive
    			} elseif ( bbp_is_topic_archive() ) {
    				$base = bbp_get_topics_url();
    
    			// Default
    			} else {
    				$base = get_permalink( (int) $r['post_parent'] );
    			}
    
    			// Use pagination base
    			$base = trailingslashit( $base ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
    
    		// Unpretty pagination
    		} else {
    			$base = add_query_arg( 'paged', '%#%' );
    		}
    
    		// Pagination settings with filter
    		$bbp_topic_pagination = apply_filters( 'bbp_topic_pagination', array (
    			'base'      => $base,
    			'format'    => '',
    			'total'     => $r['posts_per_page'] === $bbp->topic_query->found_posts ? 1 : ceil( (int) $bbp->topic_query->found_posts / (int) $r['posts_per_page'] ),
    			'current'   => (int) $bbp->topic_query->paged,
    			'prev_text' => is_rtl() ? '&rarr;' : '&larr;',
    			'next_text' => is_rtl() ? '&larr;' : '&rarr;',
    			'mid_size'  => 1
    		) );
    
    		// Add pagination to query object
    		$bbp->topic_query->pagination_links = paginate_links( $bbp_topic_pagination );
    
    		// Remove first page from pagination
    		$bbp->topic_query->pagination_links = str_replace( $wp_rewrite->pagination_base . "/1/'", "'", $bbp->topic_query->pagination_links );
    	}
    
    	// Return object
    	return apply_filters( 'babblebey_has_topics', $bbp->topic_query->have_posts(), $bbp->topic_query );
    }

    which is just bbp_has_topics’ renamed with pagination changed to -1

    and then call that

    berry metal
    Participant

    I want to output bbPress single topic shortcodes with different IDs, through my single post template.

    On post with the title “A” shortcode [bbp-single-topic id=6041], on post with the title “B” shortcode [bbp-single-topic id=6042], etc…

    And the matching I need it via title strings, meaning that the topic with id 6041 would have the title “A”, and the topic with id 6042 would have the title “B”.

    How to achieve this, and what would be the dynamic query?

    I am using bbPress instead of comments, as they are post type, and I want to use this advantage.

    #205138

    In reply to: bbpress Loop Argument

    Robin W
    Moderator

    given that

    get_template_part( ‘template-parts/topic’, ‘card’ );

    is from your theme (or other plugin) not bbpress, not sure what is taking the pagination.

    the usual solution would be to parse args eg

    add_filter ('bbp_before_has_topics_parse_args', rew_has_topics') ;
    
    function rew_has_topics( $args = '' ) {
    	$args['posts_per_page'] = '-1' ;
    return $args;
    }
    #205137
    Babblebey
    Participant

    Thank you very much.

    If only the codex https://codex.bbpress.org/developer/ was completed.

    Please, I might need the same for if A TOPIC is Favourited and if a TOPIC is Subscribed to

    #205134
    Babblebey
    Participant

    Hello there,

    Thank you for viewing this thread.

    I have a sidebar on the Homepage of my website that should list latest forum topics. But the number of topics listed is being determined by the “number of topics” set per-page in the “Forum Settings”.

    Is there a way to setup an argument($args) similarly to that of the new WP_Query($args) to set a custom of topics per-page.?

    Here’s my query:

    
    <!--Sidebar Start-->
                <div class="col-md-4">
                          <div class="sidebar-topics row sticky-top">
                              <div class="col-md-12 col-sm-12 col-12 ml-2 mb-2 p-1">
                                    <h3 class="">Latest Forum Topic</h3>
                              </div>
                              <div class="col-md-12 col-sm-12 col-12">
                            <?php
                                if ( bbp_has_topics() ):
                                    while ( bbp_topics() ) : bbp_the_topic();
                                        get_template_part( 'template-parts/topic', 'card' );
                                    endwhile;
                                endif;
                              ?>
                            </div>
                      </div>
                </div>
    <!--Sidebar Ends-->
    
    #205133
    Robin W
    Moderator

    this is 11 yr old and relates to version 1 of the bbpress plugin – so yes not current

    #205109
    Robin W
    Moderator

    You can copy all the templates across, but you only need to copy those that you want to change, and it is better just to do this, as then you know which you have altered.

    so if you wanted to amend loop-single-forum you would do the following

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    #205103
    Robin W
    Moderator

    then you need to amend form-topic and form-reply

    to amend

    <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>

    to something like (untested)

    <?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
    <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
    <?php endif ; ?>
    <?php else : ?>
    <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Update', 'bbpress' ); ?></button>
    <?php endelse : ?>
    
    #205092
    Robin W
    Moderator

    Step by step guide to setting up a bbPress forum – Part 1

    item 3 method 2 and you can put introductory text before the shortcode

    #205080
    lightsourceptaah
    Participant

    I’m using bbpress v2.5.14 with WordPress 5.2.4 running OceanWP v1.7.1
    Website url: https://ptaah.com.au

    How do I edit the Forum page?
    I want to add an introduction paragraph and a Login button.

    I’m a beginner, this is my first web adventure – please help!

    With many thanks, Anne

    Lovage
    Participant

    Hi, there!

    I use the latest version of bbPress. Just found a login status issue on my forum https://forum.themevan.com

    Reproduce the issue:

    – Access to a sub-forum page before logging in
    – Log in your account
    – Back to that sub-forum page

    You will see the reply form still doesn’t display and this page is unlogged in status, if you refresh this page, it works fine.

    How to fix this issue?

    Thanks!

    #205045
    John
    Participant

    I’m having the same issue with bbPress email notifications coming through as HTML code. I’m using the BuddyBoss theme and platform and have reached out to their support for help, but haven’t found a solution yet.


    @avaiya
    Did you ever find a solution to this? If so, what was it?

    #205040

    In reply to: Migrating from phpBB

    tomijolkkonen
    Participant

    Sorry for the confusion. I did mean that I had no access to the old database but I got the sql.gz file of the old database backup that I transferred to a new phpmyadmin that the service provider had made with a wordpress site install. I’m not sure where to continue this anymore. Should I just whipe everything and start over or try to work it out. Again sorry for the confusion. So to put it simply so there is not confusion as I know I’m not the most clear when trying to explain something. I’m making a forum site for father-in-law. He has a old forum still on that is running phpBB. I need to transfer the forum posts etc from sql.gz file to the new site. I don’t know how the transfer tool works and couldn’t find a tutorial. Also if I did get it right I have no idea how to make it show up in bbPress.

    #205030
    tomijolkkonen
    Participant

    Ok yes, starting with I’m completely new to this and I need to redesign my Father in laws, forum website. This would be my first time doing this and he said that there is no hurry as he heard from my wife that I know how to code but the thing is I’m only at the basics of C# so not sure if any use here but on to the point.

    So he is not able to connect to the old website host site because I dont think it really exists anymore and/or was transferred to another host service. But he has a backup from the old database that used phpBB and he is not really willing to part with everything that was stored in that forum as it contains over 10 years of garthered info on the matter which is central to the forum. So I don’t feel that copying every post would be really a good way as there are around 200k posts on it.
    So I have a wordpress site setup with BBpress and have the basics and the serviceprovider has the database on phpmyadmin. I’m looking to use the backup to somehow have the posts etc showup without messing with the actual site but im ok even if it wipes the new design.

    I have tried using bbPress import tool but to no avail. I have not found any info considering this. So the old site is still active but I have no access to the old database but I have the old backup. The import tool did not make much sense to me but I tried.For example I am not sure do I use the root name when typing in the database name in the import tool so I have tried to look for a deeper explanation.Also I dont know how the old posts would show up in bbPress.

    #205024
    thomaslindvig
    Participant

    I want my users in the forum to appear semi-anonymously, so they only appear with their usernames, not their real names (full name / display name), how do I change that? I don’t mind coding snippets.

    Tantraforum.dk forside


    WP 5.2.4
    bbpress 2.5.14
    theme Spacious by themegrill 1.6.6

    #205022
    Milan Petrovic
    Participant

    The only plugin that does what you need is my GD bbPress Toolbox Pro: https://plugins.dev4press.com/gd-bbpress-toolbox/ and if you want, I can set demo website for you to test it.

    Regards,
    Milan

    #205003

    In reply to: Creating a topic

    Robin W
    Moderator

    very doubtful that bbpress would add this – you’d need to register a trac ticket

    #205000
    Robin W
    Moderator

    I dug into this a bit further

    The moderation in bbpress is looking for ‘<href…’ so if you just post links ie

    you post this

    https://bbpress.org/forums/topic/posts-with-3-or-more-links/

    not this

    <a href="https://bbpress.org/forums/topic/posts-with-3-or-more-links/">some link</a>

    then no check is done – it is looking for links not urls

    There is some capability in the code via

    $reply_content = apply_filters( 'bbp_new_reply_pre_content', $reply_content );

    to take out more than 2 links, but there is not an easy way to put 3 urls into moderation

    #204995
    Chuckie
    Participant

    Related:

    Moderate posts that have 3 or more links

    But it does not work.

    #204994
    Robin W
    Moderator

    do you really mean WordPress role subscriber or bbpress role participant ?

    #204985
    Chuckie
    Participant

    :)Side question – do the bbPress authors actively view these forums etc.? It all seems rather quiet. Apart from your grateful efforts. I raised one of those trac tickets:

    https://bbpress.trac.wordpress.org/ticket/3266#ticket

Viewing 25 results - 5,451 through 5,475 (of 64,309 total)
Skip to toolbar