BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25183
    Brajesh Singh on in reply to: Change content/menu in left/right panels and change #53531

    Hi Stijn,
    Thank you

    1. Please install and activate classic widget https://wordpress.org/plugins/classic-widgets/
    Then, Visit Dashboard->Appearance->Widgets and add some widget to “Left Panel” widget area.

    That will remove the default widgets currently visible(archive and categories).

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183
    Brajesh Singh on in reply to: Restrict BBpress based on Profile Type #53530
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25183

    Hi,
    Please try the following code.

    
    // Disables activity post form on group pages for non-admins
    /**
     * Checks if user can post activity
     *
     * @return bool
     */
    function buddydev_user_can_post_activity() {
    
    	if ( ! bp_is_group_activity() ) {
    		return true;
    	}
    
    	// Replace ids by your allowed user ids.
    	$allowed_user_ids = bp_group_admin_ids( groups_get_current_group(), 'array' );
    
    	$can = false;
    	if ( is_super_admin() || in_array( get_current_user_id(), $allowed_user_ids ) ) {
    		$can = true;
    	}
    
    	return $can;
    }
    
    add_action( 'bp_before_activity_post_form', function() {
    
    	if ( ! buddydev_user_can_post_activity() ) {
    		ob_start();
    	}
    
    } );
    
    add_action( 'bp_after_activity_post_form', function() {
    
    	if ( ! buddydev_user_can_post_activity() ) {
    		ob_get_clean();
    
    		$css = '#buddypress form#whats-new-form {display: none};';
    
    		wp_add_inline_style( 'bp-legacy-css', $css );
    	}
    } );
    
    add_action( 'bp_enqueue_scripts', function () {
    	if ( ! buddydev_user_can_post_activity() ) {
    		$css = '#buddypress form#whats-new-form {display: none};';
    
    		wp_add_inline_style( 'bp-parent-css', $css );
    	}
    }, 15 );
    
    /**
     * Filter ajax post request
     */
    function buddydev_restrict_post_update() {
    
    	// Always allow site admin.
    	if ( buddydev_user_can_post_activity() || function_exists( 'bp_nouveau' ) ) {
    		return;
    	}
    
    	$object = empty( $_POST['object'] ) ? '' : sanitize_key( $_POST['object'] );
    
    	if ( ! $object || 'user' == $object || bp_is_user_activity() ) {
    		exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'You are not allowed to post activity.' ) . '</p></div>' );
    	}
    }
    
    add_action( 'wp_ajax_post_update', 'buddydev_restrict_post_update', 9 );
    
    

    It should only show the post form to the group admin.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183
    Brajesh Singh on in reply to: Custom post layout on Buddyboss Theme profile #53528

    Hi Steve,
    Thank you for your post.

    It is an old thread. Let us keep our current discussion to your new post.,
    https://buddydev.com/support/forums/topic/buddyblog-customizing-blog-display/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183
    Brajesh Singh on in reply to: BuddyBlog – customizing blog display #53527

    Hi Steve,
    Thank you for the post.

    Please allow me to check it with the latest BuddyBoss version and get back to you within next 24 hours.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183

    Hi,
    Thank you for reporting the issue.

    Please allow me to check and get back to you in next 24 hours.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183

    Hi Stephanie,

    Hope you are doing well.
    Thank you for your patience.

    Please upgrade to 1.5.9.1. It accounts for the current file being uploaded in the allocated size.

    PS:- It only accounts for uploading file. If you are using remote media download feature(adding from remote source), It will not account in that case as the size is not available.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183
    Brajesh Singh on in reply to: Anonymous plugin – rtMedia issue #53524

    Hi Katrine,
    Thank you for your patience.

    I have put a plugin here which will disable anonymous upload if you activate it.

    Please download the plugin from here and activate.
    https://github.com/mediapress/mpp-disable-anonymous-upload

    Try uploading a media from activity to see if it works or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183

    Hi gavyn,
    Welcome to BuddyDev support forums.
    I am not familiar with the code of BuddyX theme.

    Here is some code that doe sit (but in a reverse way, disables at other places except group).
    https://buddydev.com/support/forums/topic/hiding-whats-new-form-in-member-activity-but-not-in-groups/page/2/#post-44896

    If you are comfortable with code, Please customize it from your use case. If you are not comfortable with code customization, Please let me know. I will update it for default BuddyPress which you can check and see if that works for BuddyX.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25183

    Hi Stephanie,
    Thank you for your patience.

    We have it fixed. I will push on wordpress.org today or Monday. I am working on another compatibility of MediaPress with one of our plugins and have been holding it to release together.

    I will post here after the release.

    Regards
    Brajesh