• I noticed on the profile page of Buddypress, the link to create a new doc disappears if there are currently docs already active. If you click on one of the docs however the create a new doc link appears. Does anyone have any insight on this? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Cavins

    (@dcavins)

    I’m sorry, I don’t understand your situation. Can you share a screenshot of the situation in which the “create new” button is not appearing?

    Thread Starter cheyenne711

    (@cheyenne711)

    Hi David, sorry I didn’t realize you had replied to my question. I figured out the problem. I was using Buddybuilder which is a great plugin to customize the Buddypress pages, however it was omitting the “create new doc” button on the docs profile tab. Buddybuilder was kind enough to provide a solution (see below). I changed the component.php file in Buddypress Docs and it worked. Is this something you could include in the next plugin update of Buddypress docs?

    $parent_url = trailingslashit( bp_displayed_user_domain() . bp_docs_get_docs_slug() );
    $main_url = trailingslashit( bp_get_root_domain() .'/'. bp_docs_get_docs_slug() );
    
    $mydocs_label = bp_is_my_profile() ? __( 'My Docs ', 'buddypress-docs' ) : sprintf( __( '%s’s Docs', 'buddypress-docs' ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) );
    
    $sub_nav[] = array(
    'name'            => bp_is_my_profile() ? __( 'Started By Me', 'buddypress-docs' ) : sprintf( __( 'Started By %s', 'buddypress-docs' ), bp_get_user_firstname() ),
    'slug'            => BP_DOCS_STARTED_SLUG,
    'parent_url'      => $parent_url,
    'parent_slug'     => bp_docs_get_docs_slug(),
    'screen_function' => array( &$this, 'template_loader' ),
    'position'        => 10
    );
    
    $sub_nav[] = array(
    'name'            => bp_is_my_profile() ? __( 'Edited By Me', 'buddypress-docs' ) : sprintf( __( 'Edited By %s', 'buddypress-docs' ), bp_get_user_firstname() ),
    'slug'            => BP_DOCS_EDITED_SLUG,
    'parent_url'      => $parent_url,
    'parent_slug'     => bp_docs_get_docs_slug(),
    'screen_function' => array( &$this, 'template_loader' ),
    'position'        => 20,
    );
    $sub_nav[] = array(
    'name'            => bp_is_my_profile() ? __( 'Create New Doc', 'buddypress-docs' ) : sprintf( __( 'Create New Doc', 'buddypress-docs' ), bp_get_user_firstname() ),
    'slug'            => BP_DOCS_CREATE_SLUG,
    'parent_url'      => $main_url,
    'parent_slug'     => bp_docs_get_docs_slug(),
    'screen_function' => array( &$this, 'template_loader' ),
    'position'        => 30,
    );

    Here are image links so you can see the before and after
    Before
    After

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create New Doc Button not Showing’ is closed to new replies.