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: 25377
    Brajesh Singh on in reply to: Groups without a Type #40075

    Hi Khalid,
    Thank you for using the plugin.

    I think you are looking at the problem the wrong way.

    Your problem is user not selecting a group type(which is an issue with BuddyBoss not enforcing it) and not that Group Tabs Pro is doing something.

    With Group Tabs Pro, you are able to apply changes to all groups or scope to groups with some specific group types. We do plan to add “No Group Type” as scope in future but that is not the real issue.

    For now, I will suggest reaching out to BudddyBoss support and asking them how to enforce atleast one type selection for group types.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377

    Hi Sachin,
    Thank you for the question.

    1. BuddyBlog does not expose other user’s media to the logged user. The user’s will see only their own uploaded media. If it is showing other’s media, it is a conflict or you are logged as admin user.

    Also, The default BuddyBlog comes with the option to disable editor or media uploader. You can disable the WordPress uploader from your admin forms page. We do not provide any other option for upload in the default plugin, do you will need to implement your own.

    Another option is to use MediumEditor plugin for BuddyBlog Pro and use Mediumeditor instead of tinymce editor. In that case, we do not use the WordPress uploader and there is a file chooser which uses current device’s default file chooser.

    Please share your (or your client’s order id ) and I will share a copy of the Medium editor plugin with you.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: [Resolved] Auto join groups – cron job #40070

    Hi Darshan,
    You were right. The code from Ravi used an API function that did not return hidden group if the user is context was not logged.

    Here is the updated code. Please make sure to update the profile field id with your own.

    
    
    /**
     * Retrieves all group ids of which the user is a member or has requested membership or is banned.
     *
     * @param int $user_id user id.
     * @param int $limit per page.
     * @param int $page page number.
     *
     * @return array
     */
    function bd_get_user_group_ids( $user_id, $limit = false, $page = false ) {
    	global $wpdb;
    
    	$pag_sql = '';
    
    	if ( $limit && $page ) {
    		$pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit ), intval( $limit ) );
    	}
    
    	$bp = buddypress();
    
    	$group_sql = $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d {$pag_sql}", $user_id );
    
    	return $wpdb->get_col( $group_sql );
    }
    
    /**
     * Sync user's groups
     *
     * @param int   $user_id       User id.
     * @param array $new_group_ids New group ids.
     */
    function buddydev_sync_user_groups( $user_id, $new_group_ids ) {
    
    	if ( ! $user_id || ! $new_group_ids || ! function_exists( 'groups_leave_group' ) ) {
    		return;
    	}
    
    	$existing_user_group_ids = bd_get_user_group_ids($user_id );
    
    	$removable_group_ids = array_diff( $existing_user_group_ids, $new_group_ids );
    	$new_join_group_ids  = array_diff( $new_group_ids, $existing_user_group_ids );
    
    	foreach ( $removable_group_ids as $group_id ) {
    		groups_leave_group( $group_id, $user_id );
    	}
    
    	foreach ( $new_join_group_ids as $group_id ) {
    		groups_join_group( $group_id, $user_id );
    	}
    }
    
    /**
     * Sync user's groups on field save.
     */
    add_action( 'xprofile_data_after_save', function ( BP_XProfile_ProfileData $object ) {
    	$field_id = $object->field_id;
    
    	// Replace field id with yours field id.
    	$group_field_id = 5;
    
    	// If not our field id return.
    	if ( $group_field_id != $field_id ) {
    		return;
    	}
    
    	$new_group_ids = wp_parse_id_list( $object->value );
    
    	if ( empty( $new_group_ids ) ) {
    		// should we remove existing groups?
    		// let us avoid that for now.
    		return;
    	}
    
    	buddydev_sync_user_groups( $object->user_id, $new_group_ids );
    } );
    
    

    This code does not need the the Auto group join plugin. You can still use the plugin for other purpose.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: [Resolved] BuddyPress Xprofile – Search URLs #40069

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 25377

    Hi mdc,
    Thank you for the question.

    No, The plugin is not able to handle multiple conditions currently. The plugin does not load fields/options via ajax, It simply shows/hides them.

    If you are referring to our Ajax Registration plugin, then yes, the current code is compatible.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: [Resolved] changing css tags #40067

    Hi David,
    When you change a file url, BuddyPress will not know of its existence. So, you will need to load it on your own to make it available on the front end.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377

    Hi James,
    Thank you for the question.

    Yes, you can do that with Profile Visibility Manager.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: [Resolved] Auto join groups – cron job #40059

    Hi Darshan,
    It seems you are referring to the custom code section. Please allow me to check and get back to you by tomorrow.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: [Resolved] BuddyPress Xprofile – Search URLs #40058

    Hi James,
    The search functionality is not offered by Xprofile Custom Field Types plugin.

    It is offered by the BuddyBoss platform and is same for the native fields/custom fields. If you are able to use the link for native fields(such as Web etc), you can apply the same for custom field types.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25377
    Brajesh Singh on in reply to: Branded login and BP Rewrites #40056

    Hi Tosin,
    The change has no effect on Branded login. It is currently allowing you to edit the slug part after the members page. Branded login has no page for tat.

    You can edit branded login slug from your pages screen. Slugs have no special meaning in the case of branded login plugin.

    Regards
    Brajesh