Skip to:
Content
Pages
Categories
Search
Top
Bottom

optionsbar & userbar’s Not Hidden on Directory Pages

  • Avatar of Mark235
    mark235
    Participant

    @mark235

    After upgrading to BuddyPress 1.0, I can’t seem to get rid of the option and user bars on the directory pages for member, group and blogs.

    Sample of 1.0 with error: http://sustainabletogether.com/members

    What it should look like on rc 1.0 http://learnshareact.com/members

    1.0 code for: wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php for lines 676 through 711 is:

    <?php } ?>

    <?php

    do_action( ‘bp_nav_items’ );

    }

    function bp_custom_profile_boxes() {

    do_action( ‘bp_custom_profile_boxes’ );

    }

    function bp_custom_profile_sidebar_boxes() {

    do_action( ‘bp_custom_profile_sidebar_boxes’ );

    }

    function bp_get_userbar( $hide_on_directory = true ) {

    global $bp;

    if ( $hide_on_directory && $bp->is_directory )

    return false;

    include_once( TEMPLATEPATH . ‘/userbar.php’ );

    }

    function bp_get_optionsbar( $hide_on_directory = true ) {

    global $bp;

    if ( $hide_on_directory && $bp->is_directory )

    return false;

    include_once( TEMPLATEPATH . ‘/optionsbar.php’ );

    }

    function bp_is_directory() {

    global $bp;

    return $bp->is_directory;

    }

    This all looks right to me. I don’t understand why this is not hiding the optionbar and userbar on the directory pages for member, group and blog pages?

    I’ve been staring at this until I’m blue in the face. Does anyone have any ideas on why the optionbar and userbar are not hidden on these pages?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Avatar of Saraswati11
    Saraswati11
    Participant

    @saraswati11

    Hey Mark,

    I wasn’t able to figure out what was causing this, please let me know if you figure out.

    Best, Chris

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    Hi everyone.

    Priority 5 :

    1. bp_core_directory_members()

    2. bp_core_search_site()

    3. bp_blogs_directory_blogs_setup()

    4. groups_directory_groups_setup()

    That’s a partial dump of the hooks that run for the action ‘wp’.

    All those fns get triggered on each page load. The purpose of all of them is to detect if a directory is being viewed or the search fn is being run.

    Let’s just look at the members directory and it’s fn bp_core_directory_members() in bp-core.php

    In that fn is the line:

    if ( !is_home() &amp;&amp; is_null( $bp->displayed_user->id ) &amp;&amp;
    $bp->current_component == $bp->default_component ) {

    That’s what bp uses to determine if the member’s directory is running. Underneath that line is $bp->is_directory = true which shuts down the option and user bars. Either that line is failing, your theme isn’t triggering this fn or something is setting $bp->is_directory to false again.

    This works just fine in the default themes with 1.0 and wpmu 2.7.1.

    Avatar of Ezd
    Ezd
    Participant

    @ezd

    Hi Burt,

    Yes this works in the default bp-theme that comes with BP 1.0 but I do not think it’s been fixed in the skeleton theme yet. :(

    Avatar of Saraswati11
    Saraswati11
    Participant

    @saraswati11

    How would I update a pre 1.0 theme?

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    just commented on same issue on another thread…

    … does anyone have fix for this in the skeleton theme?

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    Avatar of Saraswati11
    Saraswati11
    Participant

    @saraswati11

    The case that I still haven’t found a solution for is when using a theme built for a pre 1.0 version, the code you mention in the post you refer to is present but the respective bars still show up.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Saraswati11-

    You may need to update your themes to be consistent with the the default BuddyPress Themes that come with v1.0.1.

    Avatar of Saraswati11
    Saraswati11
    Participant

    @saraswati11

    Hey, i’m still holding out for some help with what exactly needs to be updated in the themes for the newer versions of buddy press.

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

You must be logged in to reply to this topic.