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: 25468
    Brajesh Singh on in reply to: [Resolved] Limit the searching range of members #8284
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: [Resolved] MediaPress problem with PHP 7.0. #8283

    Thank you for reporting Jaume.
    It is fixed. It was coming from 3rd party library class we had included. I have added the fix in the 1.0.8 and is available from wp.org now.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468

    Hi Christian,
    thank you for posting.

    1. The functionality is not available directly in MediaPress. you can easily add it. Please see
    https://github.com/buddydev/mediapress/blob/master/core/mpp-permissions.php#L39

    All you need to do is check if the current logged in user is the user you want to allow private access and add “private” to the returned status array.

    2. We don’t have an ui for this. you can do it if you want. All you need to do is it set the post_author to the user for which the gallery needs to be created.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: Sticky navigation bar (like as buddydev) #8215

    Hi Nana,
    I am about to do it for a project of mine with Community Builder. I will share the code as a blog post next week.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: [Resolved] Limit the searching range of members #8214

    Hi Dandy,
    It is doable but i will need the following info:-

    1. How do you determine if a logged in user is a student?
    2. Can a student be part of multiple groups or just one group?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: The stealth mode is only active for one Admin #8213
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: [Resolved] Mailchimp list #8212

    Hi Nana,
    Thank you for reporting.
    I will test and get back to you a little late today.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: Mediapress Gallery and Medias Pagination #8211

    Hi Carl,
    Thank you for posting.

    You can easily create a load more or infinite scroll behaviour using the MPP_Media_Query
    https://buddydev.com/mediapress/topics/api-reference/core/mpp_media_query/

    Also, we do plan to add this as a standard feature sometime in future.

    PS: Thank you for letting me know about the demo. The issue was cropping up dues to the way WordPress behaves with mysql strict mode. we have it fixed now.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: Light Gallery… #8210

    Hi Chris,
    I did test the plugins today with WordPress 4.7.3 and it is not giving any error. I am sorry but I am not in a position to help you troubleshoot.
    Also, i will appreciate if next time you will warn that the site is NSFW.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25468
    Brajesh Singh on in reply to: [Resolved] Conditional Profile Fields #8209

    Hi Dennis,
    Here is the example

    
    
    function buddydev_validate_field_dennis() {
    
    	$field_1 = 12;//the first field which has two options
    	//since field one is required, we don't validate if it is not present, Bp will take care of it
    	if ( ! isset( $_POST[ $field_1 ] ) ) {
    		return;
    	}
    
    	$value = $_POST[ $field_1 ];////make sure to escape it , I don't know expected type, so have left it.
    
    	//if we are here, one of the option has been selected, so
    
    	$bp = buddypress();
    
    	if ( $value == 'a' ) {
    		//check if question 2( assume field id 13) is present
    		if ( empty( $_POST['field_13'] ) ) {
    			$bp->signup->errors['field_13'] = 'This is a required field, you should not askip it';
    		}
    
    	} elseif ( $value == 'b' ) {
    
    		//in this case, field_14, field_15, field_16 is required
    		$required_fields = array( 14, 15, 16 );
    		foreach ( $required_fields as $field_id ) {
    			if ( empty( $_POST[ 'field_' . $field_id ] ) ) {
    				$bp->signup->errors[ 'field_' . $field_id ] = 'Required field.';
    			}
    
    		}
    
    	} else {
    		//not of the allowed value
    		$bp->signup->errors[ $field_1 ] = 'Please make sure to use a valid value.';
    	}
    }
    
    add_action('bp_signup_validate', 'buddydev_validate_field_dennis' );
    
    

    You will need to update the field ids and the value of the first field( ‘a’, ‘b’ with actual values)

    I hope you can take it from there.

    Regards
    Brajesh