BuddyDev

Search

Multiple Plugins not functioning properly

  • Participant
    Level: Initiated
    Posts: 3
    Tracy on #36441

    Well, I see I hadn’t set the correct setting for preview in BB settings, Doh. so it now showing a preview and embedding Youtube. But it still doesn’t embed the Youtube vids as well as Activity Plus—it stretches the videos length and looks ugly.

    I’d still be interested to know if it’s really a bad idea to use the two together?

    Cheers,
    Tracy

  • Participant
    Level: Initiated
    Posts: 17
    Daniel Botoc on #36445

    Hi Ravi,

    There is no settings in backend to hide the report button from Groups Directory

  • Keymaster
    (BuddyDev Team)
    Posts: 24653
    Brajesh Singh on #36460

    Hi Tracy,
    Good to know that you found the settings. Since BuddyBoss already adds the functionality we do no plan to duplicate the effort. That’s why we recommend sticking with their media solution for this.

    Hi Daniel,
    You are right, we haven’t given the option for the enabling/disabling of the buttons in the UI. Please allow me 24 hours to think if we can add it in the settings. If not, Ravi or I will assist you with the code to achieve the same.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 17
    Daniel Botoc on #36550

    Hi Tracy,

    Have you guys made any changes yet in the Plugin to allow us to hide the report button in the Groups Directory?

    If you can please advise

  • Participant
    Level: Initiated
    Posts: 17
    Daniel Botoc on #36551

    Hi Ravi,

    Currently by default any user can comment on anybody’s timeline, whether they are connected or not. The non-connected user can not post on other user’s timeline, but he can comment. Shouldn’t this functionality be restricted to only users that are connected between each other? Therefore a user shouldn’t be able to post or comment on other user’s timeline if they are not connected.

    If you can please advise

    Thank you for your support, really appreciate it

  • Keymaster
    (BuddyDev Team)
    Posts: 24653
    Brajesh Singh on #36562

    Hi Daniel,
    The current functionality is controlled by BuddyBoss. They allow it for all.

    I am requesting Ravi to assist you with the code for the same.

    Regards
    Brajesh

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #36577

    Hello Daniel,

    Please use the following code it will only allow friends to post comments or reply on user activity.

    
    
    /**
     * Allow only friends to post a comment and reply
     *
     * @param bool $can Can comment or not.
     *
     * @return bool
     */
    function buddydev_only_friends_can_comment_on_activity( $can ) {
    	
    	if ( ! bp_is_user() ) {
    		return $can;
    	}
    	
    	$activity = new BP_Activity_Activity( bp_get_activity_id() );
    
    	if ( ! friends_check_friendship( get_current_user_id(), $activity->user_id ) ) {
    		$can = false;
    	}
    
    	return $can;
    }
    add_filter( 'bp_activity_can_comment', 'buddydev_only_friends_can_comment_on_activity' );
    add_filter( 'bp_activity_can_comment_reply', 'buddydev_only_friends_can_comment_on_activity' );
    
    

    Please do let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 17
    Daniel Botoc on #36774

    Hi Ravi,

    I Will try the code and revert back

    Thank you very much for all your help

    KR

    Daniel

You must be logged in to reply to this topic.

This topic is: not resolved