New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Cannot retrieve xprofile field data #21539

    Hello Medievil,

    Thank you for posting. Please let me know what is the type of this field is. Because if it is a checkbox
    field and user has not selected any of its options then it will give empty string. Also make sure $bpmember is not empty. You can use php function “var_dump” to check what result function is returns

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Tosin,

    Please try the following code and let me know if it works or not.

    
    function buddydev_custom_skip_check( $skip ) {
    	if ( is_page( 'create-public-post' ) ) {
    		$skip = false;
    	} elseif ( ! is_buddypress() || bp_is_members_directory() ) {
    		$skip = true;
    	}
    
    	return $skip;
    }
    
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_custom_skip_check' );
    
    function buddydev_custom_redirect() {
    
    	if ( ! is_user_logged_in() || is_super_admin() || ! function_exists( 'bp_follow_total_follow_counts' ) ) {
    		return;
    	}
    
    	$count = bp_follow_total_follow_counts( array( 'user_id' => get_current_user_id() ) );
    
    	if ( $count['following'] < 7 && ! bp_is_members_directory() ) {
    		bp_core_add_message( __( 'Please follow atleast 7 members to continue.', 'buddypress' ) );
    		$location = bp_get_members_directory_permalink();
    		header( 'location:' . $location );
    		exit;
    	}
    }
    
    add_action( 'bp_template_redirect', 'buddydev_custom_redirect' );
    
    

    Thank you
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: BuddyPress Activity Shortcode #21518

    Hello Maksim,

    I have test opr Activity autoloader plugin with BuddyPress activity shortcode and it is working fine with both the template packs. Please give it a try and let me know if it works or not.

    please make sure you have passed shorcode parameter “load_more” to 1 with in the shortcode.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddypress members list #21517

    Hello Matt,

    Please try the following code in your “bp-custom.php” file.

    If you are using nouveau template pack

    
    function buddydev_reorder_member_directory_filters( $filters, $context ) {
    	if ( 'group' !== $context ) {
    
    		$filters = array();
    
    		if ( bp_is_active( 'xprofile' ) ) {
    			$filters['alphabetical'] = __( 'Alphabetical', 'buddypress' );
    		}
    
    		$filters['active'] = __( 'Last Active', 'buddypress' );
    		$filters['newest'] = __( 'Newest Registered', 'buddypress' );
    	}
    
    	return $filters;
    }
    add_filter( 'bp_nouveau_get_members_filters', 'buddydev_reorder_member_directory_filters', 10, 2 );
    

    and for legacy template pack. You need to override the template file. Please copy ‘buddypress/members/index.php’ and paste it to your theme folder and modify the options order on line no. 93

    Please let me know if it works or not.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello,

    Please try the following code and let me know if it works or not.

    
    /**
     * Create post on activation
     *
     * @param int $user_id User id.
     */
    function buddydev_create_post_on_activation( $user_id ) {
    
    	$user = get_user_by( 'ID', $user_id );
    	$user_nicename = $user->user_nicename;
    
    	// create slug
    	$new_slug = 'first-topic-' . $user_nicename;
    
    	// create topic
    	$post_value = array(
    		'post_name'     => $new_slug,
    		'post_type'     => 'topic',
    		'post_author'   => $user_id,
    		'post_title'    => 'first topic',
    		'post_content'  => 'This topic was created when you registered.',
    		'post_category' => array( 1, 5 ),
    		'tags_input'    => array( 'tag1', 'tag2' ),
    		'post_status'   => 'publish',
    	);
    	wp_insert_post( $post_value );
    
    }
    add_action( 'bp_core_activated_user', 'buddydev_create_post_on_activation', 10 );
    

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: BuddyPress Groups List Shortcode #20505

    Hello Abdullah,

    This shortcode is not the part of plugin. It’s a part of our premium theme named “Community Builder”.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello AJ,

    You are doing wrong exclude=role=”administrator” here. Please try following shortcode and mention all the user role you want to display except administrator for admin. It will display activities of other users except admin

    [activity-stream role=editor,author,contributor,subscriber per_page=10 allow_posting=1]

    You can use the above mentioned shortcode. Please let me know if it works or not

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Posting photo to group's activity feed #20433

    Hello Carolynn,

    Sorry for the inconvenience. I have tested this on my local server and it is working fine I am able to post an image without text in a group activity page.

    Is layout still breaks in default theme with no other plugin active except BuddyPress and MediaPress?. Please let me know.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Jones,

    Thank you for using the plugin. Please try the following code in your bp-custom.php file and let me know if it works or not.

    
    
    function buddydev_filter_featured_members_type( $args ) {
    
    	if ( ! function_exists( 'bp_featured_members' ) ) {
    		$args;
    	}
    
    	// our scope must be featured.
    	if ( bp_featured_members()->in_the_loop() || ( isset( $args['scope'] ) && $args['scope'] == 'featured' ) ) {
    		$args['type'] = 'random';
    	}
    
    	return $args;
    }
    
    add_filter( 'bp_after_has_members_parse_args', 'buddydev_filter_featured_members_type' );
    
    

    Thank You
    Ravi

    • This reply was modified 7 years, 10 months ago by Ravi.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Branded login: headers already sent error #19823

    Hello Hugo,

    I have checked the plugin on my local server and it is working fine for me. Please let me which login page throwing this error. Is it login page assigned to login component or default WordPress login page you are trying to login.
    Also, there might be a chance that some other plugin or theme conflicting with this to check to deactivate all other plugins except BuddyPress and switched to default theme and check if the issue still persists or not.

    Thank You
    Ravi