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: 25488
    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: 25488

    Hi Chris,
    Thank you confirming.

    Have a great time building your social network 🙂

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488

    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: 25488

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

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488
    Brajesh Singh on in reply to: Conditional Fields plugin won't activate #3685

    Hi Paul,
    Thank you for the details. I believe it was some caching issue .

    The plugin should work on registration page too. If it is not working, It may have some issues(or some type of conflict). Can you please post me the url to your registration page? I can check it quickly.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488
    Brajesh Singh on in reply to: MediaPress download all images with plugin #3683

    Hi Bernhard,
    Welcome to BuddyDev.

    Currently, we don’t have any plugin that allows it.

    A simple strategy will be to zip all media of a gallery using pclzip or ZipArchive class, and then provide it for downloading. We haven’t put anything like this as it is going to affect the performance of the server(memory/cpu/bandwidth)

    Please do let me know if you need further assistance.
    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488

    Hi Ada,
    Thank you for the kind words. I am glad we have finally got it working.

    Have always appreciated your support. All the best with your project.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488

    Hi Romanzy,
    The updates are available from WordPress.org now.

    Thank you. Marking it as resolved.

  • Keymaster
    (BuddyDev Team)
    Posts: 25488

    Hi,
    I updated the plugin last week and pushed on github. Just forgot to push it on WordPress.org and BuddyDev. will do today and message you back.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25488
    Brajesh Singh on in reply to: Conditional Fields plugin won't activate #3675

    Hi Paul,
    I just tested it on WordPress 4.5 and BuddyPress 2.5.2. The plugin activates and works fine.

    The strange part is if it is getting deactivated, It should have given you atleast some error message.

    Can you please provide me temporary access to your admin dashboard. I will be happy to look there to see what is going on. My email is [email protected]

    Thank you
    Brajesh