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: 25271
    Brajesh Singh on in reply to: [Resolved] Community Activity on Profile #3728

    Hi Joy,
    I am sorry, I could not reply to yopur PM earlier.

    Please do not use the above code.

    Do you want to set the “All Activity” as default page when activity is clicked? If yes, Please put the following code in bp-custom.php

    
    function buddydev_set_default_nav() {
    	bp_core_new_nav_default (
    		array(
    			'parent_slug'       => buddypress()->activity->id,
    			'subnav_slug'       => 'all-activity',
    			'screen_function'   => 'bp_community_activity_screen'
    		)
    	);
    }
    add_action( 'bp_setup_nav', 'buddydev_set_default_nav', 20 );
    
    

    That will do it. Please do let me know if it works or not?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: Conditional Fields plugin won't activate #3721
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: BP Member Types #3716

    Hi Kim,
    I am sorry but I could not understand the last reply properly.

    The best way to list all members will be using the the BuddyPress Members loop.

    in bp_has_members(), pass type=alphabetical and it will list all members(even those who never logged in).

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: [Resolved] BuddyPress hosting in India #3715

    Hi Lavish,
    Welcome to BuddyDev.
    Since you are looking for local service provider, I will suggest BigRock. You can use their Indian server and their customer service is great.

    For me, It seems they are value for money in Indian context.

    PS: Go with any hosting but avoid BlueHost for hosting BuddyPress. Their servers seems to be oversold. The best option is Digitalocean if you are comfortable managing your own server.

    Hope that helps
    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: BP Member Types #3710

    Hi Kim,
    The problem lies with BuddyPress. It does not list users who haven’t logged in once(It uses a user meta and checks for that).
    It is possible to do so. If you list members by using alphabetic filter, It will list all the members.

    PS: What are you doing to insert the members on team page? using short code?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: BP Member Types #3708

    Hi Kim,
    Welcome to BuddyDev.

    I am sorry for the inconvenience,.
    Have these users logged in atleast once? Are they visible inside all tab?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271
    Brajesh Singh on in reply to: Profile Visibility for existing users #3704

    Hi Kathy,
    Welcome to BuddyDev. Thank you for purchasing the plugin.

    1. Please update the settings that you want to applied to all users in the Admin settings page

    2. Please put the following code in your bp-custom.php

    
    
    function bppv_custom_bulk_update() {
    
    	if ( get_site_option( 'bppv_custom_bulk_updated') || ! function_exists( 'bp_profile_visibility_get_default_settings' ) ) {
    		return ;//do not update again
    	}
    	//only admins with capability to manage users can do it
    	if ( !  current_user_can( 'delete_users' ) ) {
    		return ;
    	}
    
    	//apologies for the implicit dependency
    	$settings = bp_profile_visibility_get_default_settings();
    	if ( empty( $settings ) ) {
    		return ;
    	}
    
    	$keys = array_keys( $settings );
    
    	if ( empty( $keys ) ) {
    		return ;
    	}
    
    	$meta_keys = array_map( 'esc_sql', $keys );
    
    	$list = '\'' . join( '\', \'', $meta_keys ) . '\'';
    
    	$meta_list = '(' . $list .')';
    
    	//delete current preference
    
    	global $wpdb;
    
    	//Drop it for all existing Users
    	$delete_sql = "DELETE FROM {$wpdb->usermeta} WHERE meta_key IN {$meta_list}";
    
    	$wpdb->query( $delete_sql );
    
    	//now update for each key
    	foreach ( $settings  as $key => $val ) {
    
    		if ( $key =='admin_only' ) {
    			continue;//
    		}
    		$update_settings_query = "INSERT INTO {$wpdb->usermeta} (user_id, meta_key, meta_value)
                    SELECT  ID, %s as meta_key, %s as meta_value   FROM {$wpdb->users} where ID !=0";
    
    		$prepared_query = $wpdb->prepare( $update_settings_query, $key, $val );
    
    		$wpdb->query( $prepared_query );
    		update_site_option( 'bppv_custom_bulk_updated', 1 );
    	}
    
    }
    //Run it only once
    add_action( 'init', 'bppv_custom_bulk_update' );//
    

    It needs to be run only once and It will overwrite the settings of ALL USERS(even for users with existing preference).

    After one run, you can remove the code if you want.

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25271

    Hi Chris,
    Thank you confirming.

    Have a great time building your social network 🙂

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271

    Hi Alayna,
    Thank you for purchasing Facebook Like Activity Stream plugin. I am glad you liked it.

    I am assuming you want the same type of activity stream on the sitewide activity too? I will need 1-2 days and will like to explore it again(Since many things have changed and It will be doable now) and add as part of the FB Like Activity plugin.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25271

    Thank you. I am glad you have resolved it now. Marking as closed.

    Regards
    Brajesh