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

    HI Dale,
    This should most probably work

    
    
    /**
     * Change length of activity excerpt.
     *
     * @param int $length length.
     *
     * @return int
     */
    function buddydev_change_activity_excerpt_length( $length ) {
    	return 500;
    }
    
    add_filter( 'bp_activity_excerpt_length', 'buddydev_change_activity_excerpt_length' );
    
    

    Please give it a try and let me know.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331

    Hi,
    I am sorry but I am not sure of the issue.
    Here is the code I added to your bp-custom.php

    
    
    // For showing members of opposite gender.
    function buddydev_exclude_same_gender_users( $args ) {
    
    	if ( ! is_user_logged_in() ) {
    		return $args;
    	}
    
    	$field_id = 3;// gender field.
    	$data     = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field_id, get_current_user_id() ) );
    
    	if ( empty( $data ) ) {
    		return $args;
    	}
    
    	// we have two choices here.
    	// show opposite gender or show all members who are not of same gender
    	// I am going with opposite gender, feel free to adapt.
    	$search = '';
    	if ( 'Un Homme' == $data ) {
    		$search = 'Une Femme';
    	} elseif ( 'Une Femme' == $data ) {
    		$search = 'Un Homme';
    	}
    
    	if ( empty( $search ) ) {
    		return $args;
    	}
    
    	$args['xprofile_query'] = array(
    		array(
    			'field'   => $field_id, // field id or name.
    			'value'   => $search,
    			'compare' => '=',
    		),
    	);
    
    	return $args;
    }
    
    add_filter( 'bp_after_has_members_parse_args', 'buddydev_exclude_same_gender_users' );
    
    

    It looks into the field 3 3 of the logged in user, then checks for who should be shown.

    Since I do not understand the language, The string values may be incorrect . Can you please check it and tell me if it is correct or not?

    
    if ( 'Un Homme' == $data ) {
    		$search = 'Une Femme';
    	} elseif ( 'Une Femme' == $data ) {
    		$search = 'Un Homme';
    	}
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331

    HI Diana,
    Thank you for the question.

    The patch should be

    
    yourtheme/bpajaxr/default/assets/bpajaxr-style.css
    
    

    We suggest using

    
    yourtheme/bpajaxr/default
    

    The last part is name of the active template style(currently, we only support default but will change in future) to help us localize the change and add more styles in future without breaking backward compatibility.

    Keeping this structure, you can keep your changes local to a specific style. Say, we add a new style “classic” in future, if you maintain this structure, changes for styles in the default won’t affect new.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331

    Hi Michaël,

    Thank you for the question. We do it already for MediaPress.

    I am not sure if you are looking for restricting some other type of upload.

    Please help me understand it and I will assist.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331
    Brajesh Singh on in reply to: You don't have sufficient permissions to upload #21679

    Hi Barry,
    Thank you for using MediaPress.

    It is a permission issue. Since yu are using our PMPro addon, can you please check if the user have the PMPro addon specific capability.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331
    Brajesh Singh on in reply to: [Resolved] MediaPress with BuddyPress Polls #21678

    Hi Mic,
    Thank you for using MediaPress.

    I am sorry but the developers of the poll plugin have explained it correctly.

    MediaPress adds new uploads as a activity type and so does poll. An activity can’t have more than 1 activity type and that’s the issue here.

    I am sorry but I don’t see any possible solution right now.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331

    Hi Tosin,
    I am sorry, I am not sure what the question is.

    Please answer me a few questions to help me understand it.

    1. Are you using wp-login.php or not
    2. Is it a custom login page by your theme?

    If it is the second case Please contact theme authors or code providing the login functionality. The above code and login notices are very different and unrelated(unless someone makes code to grab the login error and add it as BuddyPress notice).

    My suggestions to fix the cause of the issue as it should be properly handled by the login code.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331
    Brajesh Singh on in reply to: BuddyPress Moderation Tools – Custom Post Types #21676

    Hi Vivek,
    Thank you.
    1. Ravi tested it with custom post types and it worked. We had an issue with visibility because the way Geodir removes filters before query. We have added support for it.

    At the moment, the release team( Ravi & I) are away and travelling, so release is delayed. Ravi should be back tomorrow(26th, Day), WE can have an update available then. Otherwise, Please wait till 28th. I will post an update about it tomorrow(today Indian Time).

    2. The plugin supports, Activity post updates, comment replies. In private message, you can report the user but not the specific message content. It does not support cover image reporting. You can create a Category as “Cover Image” and let users report the user and select cover image as the reason.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331
    Brajesh Singh on in reply to: [Resolved] Redirect on first login – xprofile #21675

    Hi Vivek,
    You can change this

    
    $redirect_to = bp_core_get_user_domain($user->ID );
    

    To

    
    $redirect_to = bp_core_get_user_domain($user->ID ) .'profile/edit/group/2/;
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25331

    Hi Carsten,

    Thank you for asking. We will check front end pm in next couple of days and will let you know.

    Regards
    Brajesh