Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • Brendavo
    Member

    @successful-life

    bump!
    i am really stuck on this.


    Brendavo
    Member

    @successful-life

    could not edit the prev post.
    The code for the highlight is i think in bp-members-template.php on line 704

    function bp_get_loggedin_user_nav() {
    global $bp;
    
    // Loop through each navigation item
    foreach( (array) $bp->bp_nav as $nav_item ) {
    // If the current component matches the nav item id, then add a highlight CSS class.
    if ( !bp_is_directory() && $bp->active_components[$bp->current_component] == $nav_item )
    $selected = ' class="current selected"';
    else
    $selected = '';
    
    /* If we are viewing another person (current_userid does not equal loggedin_user->id)
    then check to see if the two users are friends. if they are, add a highlight CSS class
    to the friends nav item if it exists. */
    if ( !bp_is_my_profile() && $bp->displayed_user->id ) {
    $selected = '';
    
    if ( bp_is_active( 'friends' ) ) {
    if ( $nav_item == $bp->friends->id ) {
    if ( friends_check_friendship( $bp->loggedin_user->id, $bp->displayed_user->id ) )
    $selected = ' class="current selected"';
    }
    }
    }
    
    // echo out the final list item
    echo apply_filters_ref_array( 'bp_get_loggedin_user_nav_' . $nav_item, array( '<li id="li-nav-' . $nav_item . '"><div class="menu-img-' . $nav_item . '"><a id="my-' . $nav_item . '" href="' . $nav_item . '">' . $nav_item . '</a></div></li>', &$nav_item ) );
    }
    
    // Always add a log out list item to the end of the navigation
    $logout_link = '<li><div class="menu-img-logout"><a id="wp-logout" href="' .  wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></div></li>';
    
    echo apply_filters( 'bp_logout_nav_link', $logout_link );
    }

    The strange thing is… the only highlight i get on the sidebar is, if i view a friends profile. so the part on line 715 works, but not the rest!

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar