Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi,
    BuddyBlog should not throw that notice. Yes, we use use cap check but the notice is thrown by some code using old style number for checking capability.

    Also, the error should give you some kind of the origin of the error. Please check that.

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi PresPhuture,
    You are welcome. Glad that it worked.

    Best Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: Outputting document link #12825

    Hi David,
    Thank you for using MediaPress.

    If you are using MediaPress 1.3.1 or above, you can simply disable the google doc viewer as shown here

    https://buddydev.com/mediapress/files/2017/12/mediapress-disable-google-doc-viewer.gif

    Once you do it, the doc files will have the exact same behaviour you are expecting.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Thank you George. I enjoyed assisting with code 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Wow, That’s great George.
    Congratulation on the first plugin. All the best 🙂

    Should we mark this topic as resolved now?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi PresPhuture,
    Since Ravi seems to be away, I will assist here.,

    Please put the following code in your bp-custom.php

    
    
    /**
     * Only show BuddyBlog tabs if a user is author or above.
     */
    function buddyblog_custom_remove_profile_nav() {
    
    	if ( ! bp_is_user() || user_can( bp_displayed_user_id(), 'publish_posts' ) ) {
    		return;
    	}
    
    	bp_core_remove_nav_item( 'buddyblog' );
    
    }
    
    add_action( 'bp_buddyblog_setup_nav', 'buddyblog_custom_remove_profile_nav' );
    
    /**
     * Remove from adminbar too for BuddyBlog.
     */
    function buddyblog_custom_remove_admin_nav( $nav_items ) {
    
    	if ( ! current_user_can( 'publish_posts' ) ) {
    		$nav_items = array();
    	}
    
    	return $nav_items;
    }
    
    add_filter( 'bp_buddyblog_admin_nav', 'buddyblog_custom_remove_admin_nav' );
    

    You may adjust the capability further if you wnat in future.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: BuddyPress Extended User Groups Widget #12814

    Hi Cecile,
    Can you please post your modified code on pastebin?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: BuddyPress Signup Avatar plugin crop problem #12813

    Hi Ecet,
    Welcome to BuddyDev.

    The plugin needs update to work with current version of BuddyPress. We will need some time before we can provide you an update.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Congratulations.
    Please do link me when you push the code 🙂

    About the code:-
    $typenow is fine but it tell you more or less about the editing screen and not exactly about the post type being saved.

    In our case, we were saving 2 entries(1 for custom post and another for gallery post type). For both, the $typenow remained same as the second post(gallery) creation was triggered programatically. Using get_post_type( $post_id) gave us the current post being saved’s post type.

    Hope that clarifies.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi George,
    Please try changing this line

    
    
     if ( $typenow == 'buslsite' ) {
    
    

    to

    
     if ( get_post_type( $post_id ) == 'buslsite' ) {
    
    

    That should do it.