This topic has 5 replies, 3 voices, and was last updated 10 years by sharmstr.

  • Author
  • #30672
     ahd904
    Participant

    Hello SeventhQueen,

    I would like to discuss again on this topic Sidebar template issue .

    The Site-Wide activity shows the sidebar Okay when i followed and changed as sharmstr had mentioned in the previous forum. (changing the settings in theme settings)

    However, i only want the sidebar to show in the “Site-wide activity page” not the “activity page of each individuals as you will see in the following link No Sidebar needed

    Could you please tell me a way to separate these two pages settings.

    I only want users to see the sidebar function within Site-wide Activity not the individual Activity BP-nav page.

    Please help.

    Thank you in advance.

    Also please refer to the image attached for a quicker understanding.

    Attachments:
    You must be logged in to view attached files.
    #30681
     sharmstr
    Moderator

    I see what’s going on. I’m not sure if the 7th Queen intended this, but in the page layout code, they are only checking to see if they are displaying the activity component, but not where. I couldn’t figure out a clean way to do this, so the easiest way for you to do this is copy /kleo/buddypress/buddypress-functions.php to your child theme, then edit the ‘kleo_bp_change_layout’ function. It should be on line 1534.

    Within that function you’ll see where it checks for the activity component

    COPY CODE
    
    elseif (sq_option('bp_layout_activity', 'default') != 'default' 
    	&& bp_is_current_component( $bp->activity->slug)) {
    	$layout = sq_option('bp_layout_activity', 'right');
    }
    

    change it to this

    COPY CODE
    
    elseif (sq_option('bp_layout_activity', 'default') != 'default' 
    	&& bp_is_current_component( $bp->activity->slug) && !bp_is_user()) {
    	$layout = sq_option('bp_layout_activity', 'right');
    }
    

    All I did was add ‘&& !bp_is_user()’ to tell it to ignore the activity layout setting and use the default buddypress layout setting if the activity is within the buddypress member screen. So if you have your default set to ‘full width” it will display the activity stream on the members page to ‘full width’.


    @abe
    : Couple of things

    1- As stated above, I’m not sure if the way kleo currently handles the activity layout is what you guys wanted, but I think it makes more sense to have the activity in the member page follow the member layout setting.

    2 – My code above it probably not ideal, but it fixes his problem. I think it misses a few checks to work in all set up scenarios. I didnt full test it.

    3 – I tried to do this within functions.php by removing the ‘kleo_bp_change_layout’ filter and adding my own custom filter with a ‘custom_kleo_bp_change_layout’ function. The problem is that in your ‘kleo_prepare_layout’ function, you are getting the layout function name from the sq_option name which is ‘kleo_bp_change_layout’ so it will always look for that function instead of my custom function. Hope that made sense.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #30682
     sharmstr
    Moderator

    @ahd904 I should mention that buddypress-function.php contains a lot of code that will probably be changed with each Kleo update. If you choose to do what I’ve suggested, you’ll have to remember to copy the updated buddypress-funtions.php file back over to your child theme and make the edit again. Not ideal, but hopefully the Kleo team will agree with us and the change will be part of the core moving forward 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #30689
     ahd904
    Participant

    Sharmstr, thank you for such a kindness and effort to work this out.

    It did work out well but as you have mentioned that there is a barrier that i have to update this with every buddypress update.

    my question is will this be updated in the next version of the theme ? Or is this really the core integration of buddypress that can not be handled ??

    #31362
     Abe
    Keymaster

    Hey guys and gals,
    That makes sense and I will include @sharmstr suggestion in next update so you won’t have to do it on each theme update.

    Thanks @sharmstr as always 😉

    PS: I also have wrapped the function in a “if ( ! function_exists(‘kleo_bp_change_layout’)) {” condition so you could just declare your function in the child theme.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #31374
     sharmstr
    Moderator

    Awesome. Thank you!

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?