Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25490

    You are welcome. I am glad it worked.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490
    Brajesh Singh on in reply to: Member Types Pro for Buddyboss #33547

    Hi Rami,
    I am sorry for the delayed reply.


    @ravisharma
    has added the changes. I will need 1-2 days to review the code before publishing. I will post back after publishing.

    Regards
    Brajehs

  • Keymaster
    (BuddyDev Team)
    Posts: 25490

    Hi,
    Thank you for using our theme and plugins.

    It might be a conflict in one of the new updates of these plugin. Please allow us 48 hours to test and push an update.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490

    Hi Steven,
    Thank you for the question.

    I am assuming you are looking to change thee excerpt length in the activity stream(activity posts list)?

    It is simple doable by 2-4 lines of code without any plugin. We are also including it in one of our upcoming plugins for a no-code solution.

    Please confirm me if this is the case and I will post the code.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490
    Brajesh Singh on in reply to: Customize Search Bar #33543

    Hi,
    Yes, these are doable but out of scope for our forum assistance.

    I will suggest asking in the BP Profile Search forum or you may use our custom services.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490

    Hi,
    Thank you for the question.

    I have posted the code as a blog post here
    https://buddydev.com/add-buddypress-create-group-button-to-user-profile-groups-page-navigation/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490

    You are welcome.

  • Keymaster
    (BuddyDev Team)
    Posts: 25490
    Brajesh Singh on in reply to: How get I get the total activity count of a user #33536

    HI,
    Thank you for the question.

    There does not exist a function in BuddyPress API to achieve this currently.

    We can create own own like this

    
    /**
     * Returns total activities count for the user
     *
     * @param int $user_id user id.
     * @param string $type activity type.
     *
     * @return int
     */
    function buddydev_get_total_user_activities_count( $user_id, $type = '' ) {
    	global $wpdb;
    
    	$table = buddypress()->activity->table_name;
    
    	$where_conditions = array();
    
    	$where_conditions[] = $wpdb->prepare( 'user_id = %d', $user_id );
    	if ( $type ) {
    		$where_conditions[] = $wpdb->prepare( "type = %s", $type );
    	}
    
    	$whe_sql = join( ' AND ', $where_conditions );
    
    	return absint( $wpdb->get_var( "SELECT count(DISTINCT id) FROM {$table} WHERE {$whe_sql}" ) );
    }
    
    

    and use it like

    
    
    $updates_count = buddydev_get_total_user_activities_count( 1, 'activity_update' );
    $all_count = buddydev_get_total_user_activities_count(1)
    

    and so on.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490
    Brajesh Singh on in reply to: How can I display ads between buddypress activity #33535

    You will most probably want to keep all the banners as array entry and use a random value in the range to avoid a specif c pattern/repetition.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25490
    Brajesh Singh on in reply to: Audio for avatar #33534

    Hi Ankit,
    It might be possible but there does not exist any such solution. By adding song, I am assuming you want to use audio+cover as avatar.

    Regards
    Brajesh