BuddyDev

Search

Replies

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

    Hi Steve,
    Thank you for the replies.
    It’s good to know that the template override is working.

    1. Excerpt will not show any formatting. You can edit and use the_content() to show the full content instead.

    2. To show to custom field, you will need to copy the shortcode(There is a copy button near the custom field) and put it in one of the display box(single post/archive).

    Please try that and let me know if it works or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24774

    Hi Carten,
    Thank you for the question.

    It is a very simple plugin with 1 filter(just couple of lines) and it does not need any update. There is no security issue associated. That’s why we haven’t updated it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24774
    Brajesh Singh on in reply to: Presales MediaPress Media Moderator question #53533

    Hi Kim,
    Thank you for your interest in the plugin.

    The plugin does not deal with user profile photo(avatar) or user profile cover.
    That means, It should work for your use case.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24774

    Hi Carsten,
    Thank you for the question.

    BuddyPress supports persistent object caching. It does not cache complete page, It caches objects fetched for database leading to less computation/query when the object cache is enabled.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24774
    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: 24774
    Brajesh Singh on in reply to: Restrict BBpress based on Profile Type #53530
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24774

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

    Hi,
    Thank you for reporting the issue.

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

    Regards
    Brajesh