BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello JJ,

    Please check the following plugin. It allows recording logged in visitors for selected post types and let me know if it works or not.

    Plugin Url:
    https://github.com/buddydev/recent-post-visitors

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Thank you for acknowledgement. I am glad that I could help.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Tiziano,

    Thank you for posting. You can use ‘action=new_blog_post’ in your shortcode to list only new blog post activity in your activity listing. Please let me know it works or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: How to change sub slugs in groups ? #28461

    Hello Bharat,

    Thank you for posting. But BuddyPress does not allow to change sub-groups like group-create, group-settings etc. BuddyPress takes them as an action and process request accordingly.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Restrict Activity Commenting by Member-type #27698

    Hello Keith,

    Thank you for the acknowledgement.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Restrict Activity Commenting by Member-type #27687

    Hello Keith,

    Thank you for posting. Try the following code it prevents student type user from comment and replying on other user’s activity.

    
    /**
     * Check weather user is restricted from commenting.
     *
     * @param int $user_id User id.
     *
     * @return bool
     */
    function buddydev_is_restricted_commenter( $user_id ) {
    	// Never restrict super admin from commenting.
    	if ( is_super_admin( $user_id ) ) {
    		return false;
    	}
    
    	return bp_has_member_type( get_current_user_id(), 'student' );
    }
    
    /**
     * Check user can comment or not.
     *
     * @param bool $can Bool.
     *
     * @return bool
     */
    function buddydev_user_can_comment( $can ) {
    	$activity = new BP_Activity_Activity( bp_get_activity_id() );
    
    	$user_id = get_current_user_id();
    
    	// Do not restrict for its own activity.
    	if ( $activity->user_id == $user_id ) {
    		return $can;
    	}
    
    	if ( buddydev_is_restricted_commenter( $user_id ) ) {
    		$can = false;
    	}
    
    	return $can;
    }
    add_filter( 'bp_activity_can_comment', 'buddydev_user_can_comment' );
    add_filter( 'bp_activity_can_comment_reply', 'buddydev_user_can_comment' );
    
    

    Please do let me know if it works or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: BP Private MSG for non logged in users #27472

    Hello Daniel,

    It seems you have a customize message url. Please replace the following code,

    
    $url =  bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user->user_login ;
    

    with

    
    $url =  trailingslashit( bp_loggedin_user_domain() ) . 'bp-messages/?new-message&fast=1&to=' . $user->user_login;
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: BP Private MSG for non logged in users #27465

    Hello Daniel,

    Thank you for posting. Please make sure the message component is enabled. If enabled and you still facing the issue. Please share a screenshot of the page.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Thank You for the acknowledgement. I am glad that I could help.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BuddyPress Profile Completion for BuddyBoss #27353

    Hello,

    Sorry for the inconvenience. Please do let me know what issue you are facing in this plugin. Is it about the profile fields, avatar or covers or redirects?.

    Regards
    Ravi

    • This reply was modified 5 years, 6 months ago by Ravi.