BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: How can I get buddypress notification in another page #31669

    Hello Adeala,

    Thank you for posting. Please check the following with name ‘BuddyPress Notifications Widget’

    https://buddydev.com/plugins/buddypress-notifications-widget/

    it offers shortcode you can use to list notifications anywhere.

    supported args are as following

    // Possible value 0,1

    1. link_title // Link title with user notification page
    2. show_count
    3. show_count_in_title // Show total notification count with title
    4. show_list // show notification list
    5. show_clear_notification // Show clear notification button
    6. show_empty // Show title even if no notification

    for example: [buddydev_bp_notification show_count=1]

    Regards
    Ravi

    • This reply was modified 5 years ago by Ravi.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Shortcode Activity – Hide last Forums dicussions #31615

    Hello Michel,

    Thank you for posting. Shortcode plugin do not allow to exclude activity types. But you can include certain types.

    Look plugin page under action parameter.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Change Default Text #31614

    Hello Steven,

    Thank you for posting. Please refer the following link:

    https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/

    Please let me know if it helps you or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Shortcode Activity – Limit the activity content #31613

    Hello Michel,

    You can put this code in ‘bp-custom.php’. Please check the following url

    https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Shortcode Activity – Limit the activity content #31603

    Hello Michel,

    Thank you for posting. BuddyPress provides a filter to control the excerpt length. Use the following code

    
    /**
     * Modify excerpt length. Return no. of characters in activity excerpt.
     *
     * @param int $length Length.
     *
     * @return int
     */
    function buddydev_modify_excerpt_length( $length ) {
    	$length = 100;
    
    	return $length;
    }
    add_filter('bp_activity_excerpt_length', 'buddydev_modify_excerpt_length' );
    
    

    Please check.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Default page when an user is logged #31353

    Hello Granmeh,

    Thank you for posting. On WordPress plugin directory there is a plugin with name “Login and Logout Redirect” which allows site admin to redirect users on login or logout to custom url. Please have a look.

    Plugin Link: https://wordpress.org/plugins/login-and-logout-redirect/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Buddypress Activity Shortcode comments #31164

    Hello Johnny,

    Thank you for posting. I have tested and it is working fine for me comment posted on a post showing in activity generated using ‘[activity-stream]’ shortcode. Please share your shortcode you are using to generate activity. Also, please do let me know you have enabled “Site Tracking” module in BuddyPress settings and comment is not in moderation.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Adding Xprofile fields to Recent Visitors directory? #31163

    Hello Carsten,

    Try the following way to show specific field data. It will only show if data is not empty for the user.

    
    
    /**
     * Adding extra content to member's directory
     */
    function buddydev_recent_visitors_extra_content() {
    
    	if ( ! bp_is_active( 'xprofile' ) ) {
    		return;
    	}
    
    	// Show data from following fields.
    	$fields = array( 2, 3 );
    
    	$user_id = bp_get_member_user_id();
    
    	foreach ( $fields as $field_id ) {
    		$field = xprofile_get_field( $field_id, $user_id );
    
    		if ( ! empty( $field->data->value ) ) {
    			echo $field->name . ': ' . $field->data->value . "</br>";
    		}
    	}
    }
    
    add_action( 'bp_directory_members_item', 'buddydev_recent_visitors_extra_content' );
    
    

    Please let me know if it works or not.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide a member type in Profile Search Forms #31160

    Hello Ramon,

    Sorry for the inconvenience. Please look the following documentations

    https://codex.buddypress.org/themes/bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide a member type in Profile Search Forms #31157

    Hello Ramon,

    Thank you for the acknowledgement. Please try the following code to exclude specfic member-types from member directory search form field I am supposing you are using “BP Profile Search”

    
    
    /**
     * Excluded member type form form
     *
     * @return array
     */
    function buddydev_search_excluded_member_types() {
    	// Enter member type name you want to exclude.
    	return array( 'Teacher' );
    }
    
    add_action( 'bps_edit_field', function ( $field ) {
    
    	if ( 'bp_member_type' != $field->code || empty( $field->options ) ) {
    		return $field;
    	}
    
    	$field->options = array_diff( $field->options, buddydev_search_excluded_member_types() );
    } );
    
    

    Use this code in you bp-custom.php file and let me know if it works or not.

    Regards
    Ravi

    • This reply was modified 5 years, 1 month ago by Ravi.