BuddyDev

Search

Need some Customization Help for BuddyBlog Plugin


  • Participant
    Level: Enlightened
    Posts: 145
    Daniel on #20131

    Hi,

    When a user wants to edit his post with Buddyblog and he clicks on “Add Media” button, then a window pops up with two tabs.

    1. Upload Files
    2. Media Library

    Unfortunately, the Media Library Tab shows all the WP media pics of the website. Would it be possible to hide this tab in order that the user only can upload files from his computer and not have access to WP Media Library Tab?

    Also since the new BuddyBlog update, the “Upload Featured Image” option has disappeared. Might could you help me to make it appear again please?

    Many thanks in advance for your help.

    Regards
    Daniel


  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 9861
    Brajesh Singh on #20132

    Hi Daniel,

    1. Please visit settings and make sure you have Featured image enabled for BuddyBlog

    2. For Media Library:- Is there a chance you are checking it as a site admin and not normal user?

    Regards
    Brajesh


  • Participant
    Level: Enlightened
    Posts: 145
    Daniel on #20143

    Hi Brajesh,

    1. I have already enabled Featured Image in BuddyBlog Settings but the function is hidden in frontend when the user is trying to EDIT his post.

    In the older Buddyblog Version the user was able to change the Featured Image when Editing Post, but since the new update the function is hidden even when enabled in backend.

    Also, Ravi had send me the code below to hide “New Post” Tab because I am using another plugin to create New Post.
    Since the new update, the “New Post” tab is visible again. Would it be possible to change the code Ravi provided in order that the user gets redirected to https://mypage.com/create-new-blog/ when clicking on “New Post” tab instead of hiding the tab? If that will not be possible could you please change the code in order that the tab is invisible?

    function buddydev_remove_new_post_tab() {
    	if( ! buddyblog_is_edit_post() ) {
    		bp_core_remove_subnav_item( buddypress()->buddyblog->slug, 'edit' );
    	}
    }
    add_action( 'bp_buddyblog_setup_nav', 'buddydev_remove_new_post_tab' );
    
    function buddydev_remove_admin_new_post_tab( $wp_admin_nav_items ) {
    
        if ( ! buddyblog_is_edit_post() ) {
    	    $new_admin_items = array();
    
    	    foreach ( $wp_admin_nav_items as $wp_admin_nav_item ) {
    
    		    if ( $wp_admin_nav_item['id'] == 'my-account-' . buddypress()->buddyblog->id . '-new-post' ) {
    			    continue;
    		    }
    
    		    $new_admin_items[] = $wp_admin_nav_item;
    	    }
    
    	    return $new_admin_items;
        }
    
        return $wp_admin_nav_items;
    }
    
    add_filter( 'bp_buddyblog_admin_nav', 'buddydev_remove_admin_new_post_tab' );

    Thank you very much for your assistance.

    Regards
    Daniel

You must be logged in to reply to this topic.

This topic is: not resolved
Subscribe