Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 8,951 through 8,975 (of 14,146 total)
  • @robin-w

    Moderator

    hmm, suspect this is theme related, and would need bespoke code to fix – sorry

    @robin-w

    Moderator

    try

    bbp style pack

    this should let you style the forums

    If you still have problems, come back

    @robin-w

    Moderator

    mu current understanding is that wp is not in tapatalk, and since bbpress relies on wp, I’d suggest it is not.

    @robin-w

    Moderator

    that’s a bit like asking ‘my car has stopped working – can you tell me why?’:-)

    suggest you work out what has changed in the last week – plugin/theme updates, php versions, wordpress versions etc.

    If that doesn’t help, enable debugger – suspect you’ll find an error

    then come back

    @robin-w

    Moderator

    That’s sort of how Open Software works, product is free, support is free, but it does rely on volunteers like myself to take time away from earning money to do this.

    Anyway – thanks for posting your solution, it may help others coming across this in future.

    @robin-w

    Moderator

    are you trying at the back end or front end?

    @robin-w

    Moderator

    agree that docs can always be improved.

    It would also help if you had posted that you had fixed it. That’s 10 minutes of my life I won’t get back 🙂

    @robin-w

    Moderator

    The parent ID should be the forum the topic belongs to.

    If that doesn’t fix suggest you try running the forum tools to get the relationships right

    dashboard>tools>forums>repair forums

    and run one at a time

    That may get you further forward

    @robin-w

    Moderator

    let me look at this – it should be fairly easy, but I am away for a few days, so let me look at it next week !

    In reply to: How to Integrate

    @robin-w

    Moderator

    knowing nothing about NeonCRM, I would have no idea, and suspect you will struggle to get an answer to this. bbpress uses custom post types, but otherwise is wordpress, so the answer should be the same as it would be for a wordpress post if that helps.

    @robin-w

    Moderator

    with option 1, what did you put as post parent for each topic?

    @robin-w

    Moderator

    However, when BBPress is active, this will not work and will always redirecting to Homepage but if BBPress is activated, the custom code will work perfectly.

    Can’t see a difference between the 1st half and the 2nd half of this sentence !!

    @robin-w

    Moderator

    1. what are you clicking to get ‘registration is disabled?

    2. have a further look at dashboard>settings>general>membership>anyone can register

    if that isn’t present come back (and confirm what version of wordpress you are using)

    @robin-w

    Moderator

    suspect your membership software is the issue

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    In reply to: Nothing is displayed

    @robin-w

    Moderator

    Suspect you are using php 7.1
    3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6 RC
    3. in bbpress 2.5.12 go to /includes/forums/functions.php and change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );
    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );
    Since the next upgrade will fix that anyway, no issue in changing the bbpress file
    best I can offer I’m afraid

    In reply to: Nothing is displayed

    @robin-w

    Moderator

    @robin-w

    Moderator

    @robin-w

    Moderator

    may be theme rather than plugin related, but try

    bbp style pack

    to do styling

    can’t see the forum (get no topics), but you can fix the sidebar with

    #sidebar .bbp-login-form label {
      width: 100%;
    }

    you can put this into the custom css part of your theme or in the custom css of the plugin above

    @robin-w

    Moderator

    ok, so this is a search function – yes?

    If so, look at this code that I use with my private groups plugin to filter search results and see if you can make this work for you

    //this function filters to the bbp search function to allow only returns from allowed forums
    
    function pg_has_search_results( $args = '' ) {
    	
    	global $wp_rewrite;
    //start with code as per bbp search !
    	/** Defaults **************************************************************/
    
    	$default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() );
    
    	// Default query args
    	$default = array(
    		'post_type'           => $default_post_type,         // Forums, topics, and replies
    		'posts_per_page'      => bbp_get_replies_per_page(), // This many
    		'paged'               => bbp_get_paged(),            // On this page
    		'orderby'             => 'date',                     // Sorted by date
    		'order'               => 'DESC',                     // Most recent first
    		'ignore_sticky_posts' => true,                       // Stickies not supported
    		's'                   => bbp_get_search_terms(),     // This is a search
    	);
    
    	// 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';
    	}
    	
    	//PRIVATE GROUPS then loop to find allowable results
    	//bail from this part if there are no search terms, as otherwise it sorts the whole database and overflows memory
    	if (! bbp_get_search_terms() == '' ) {
    	//change page default to allow filter against all search results - otherwise allowed posts is only the first page of results ie whatever is in  bbp_get_replies_per_page()
    	$default['posts_per_page'] = -1;
    	$allowed_posts = private_groups_get_permitted_post_ids(new WP_Query( $default ));
    	// Then add allowed forum ids to the default query 
        $default['post__in'] = $allowed_posts;
    	if (empty ($allowed_posts )) $default['post__in'] = array(0) ;
    	//then set per page back (so that we get the correct pagination )
    	$default['posts_per_page'] = bbp_get_replies_per_page();
    	
    	}
    	
    	
    	
    	//then return to bbp search code
    	
    	/** Setup *****************************************************************/
    
    	// Parse arguments against default values
    	$r = bbp_parse_args( $args, $default, 'has_search_results' );
    
    	// Get bbPress
    	$bbp = bbpress();
    
    	// Call the query
    	if ( ! empty( $r['s'] ) ) {
    		$bbp->search_query = new WP_Query( $r );
    	}
    
    	// Add pagination values to query object
    	$bbp->search_query->posts_per_page = $r['posts_per_page'];
    	$bbp->search_query->paged          = $r['paged'];
    
    	// Never home, regardless of what parse_query says
    	$bbp->search_query->is_home        = false;
    
    	// Only add pagination is query returned results
    	if ( ! empty( $bbp->search_query->found_posts ) && ! empty( $bbp->search_query->posts_per_page ) ) {
    
    		// Array of arguments to add after pagination links
    		$add_args = array();
    
    		// If pretty permalinks are enabled, make our pagination pretty
    		if ( $wp_rewrite->using_permalinks() ) {
    
    			// Shortcode territory
    			if ( is_page() || is_single() ) {
    				$base = trailingslashit( get_permalink() );
    
    			// Default search location
    			} else {
    				$base = trailingslashit( bbp_get_search_results_url() );
    			}
    
    			// Add pagination base
    			$base = $base . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
    
    		// Unpretty permalinks
    		} else {
    			$base = add_query_arg( 'paged', '%#%' );
    		}
    
    		// Add args
    		if ( bbp_get_view_all() ) {
    			$add_args['view'] = 'all';
    		}
    
    		// Add pagination to query object
    		$bbp->search_query->pagination_links = paginate_links(
    			apply_filters( 'bbp_search_results_pagination', array(
    				'base'      => $base,
    				'format'    => '',
    				'total'     => ceil( (int) $bbp->search_query->found_posts / (int) $r['posts_per_page'] ),
    				'current'   => (int) $bbp->search_query->paged,
    				'prev_text' => is_rtl() ? '→' : '←',
    				'next_text' => is_rtl() ? '←' : '→',
    				'mid_size'  => 1,
    				'add_args'  => $add_args, 
    			) )
    		);
    
    		// Remove first page from pagination
    		if ( $wp_rewrite->using_permalinks() ) {
    			$bbp->search_query->pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $bbp->search_query->pagination_links );
    		} else {
    			$bbp->search_query->pagination_links = str_replace( '&paged=1', '', $bbp->search_query->pagination_links );
    		}
    	}
    	//finally filter to return
    	// Return object
    	return apply_filters( 'pg_has_search_results', $bbp->search_query->have_posts(), $bbp->search_query );
    }
    
    add_filter ('bbp_has_search_results', 'pg_has_search_results') ; 

    @robin-w

    Moderator

    ok, but what are you using to display this?

    @robin-w

    Moderator

    thanks for that, but still not sure on the use of the word ‘pagination’

    where and using what are these numbers being shown?

    @robin-w

    Moderator

    not quite sure what you are asking in using the word ‘pagination’ vs topic counts.

    But check that this is not just because you are using a keymaster role, so seeing keymaster counts. Hidden topics are not normally included for participants.

    if still an issue come back

    In reply to: bbPress Fatal Erreur

    @robin-w

    Moderator

    Suspect you are using php 7.1
    3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6 RC
    3. in bbpress 2.5.12 go to /includes/forums/functions.php and change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );
    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );
    Since the next upgrade will fix that anyway, no issue in changing the bbpress file
    best I can offer I’m afraid

    @robin-w

    Moderator

    Is there anyway I can get a list of topic IDs inside a forum ID?

    sorry missed this first time round.

    you’ll want bbp_has_topics which you’ll find in

    \includes\topics\template.php

    line 140

    function bbp_has_topics( $args = '' )

    you can call it with a forum id eg

    <?php $query = bbp_has_topics( array( 'post_parent' => '2579') ); ?>

    this will return an array of topics from forum ID 2579 which you can then work with

    @robin-w

    Moderator

    wp_bp is buddypress

    bbpress uses custom post types for forums, topics and replies, and various ‘options’ settings, then of course users have meta data.

    Quickest way would be to re-install and reactivate bbpress then use that to delete as above and then remove bbpress again. Much better than messing with sql tables

Viewing 25 replies - 8,951 through 8,975 (of 14,146 total)