-
Author
Tagged: Activity page sidebar
-
October 5, 2014 at 06:27 #30672ahd904Participant
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.October 5, 2014 at 15:58 #30681sharmstrModeratorI 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 CODEelseif (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 CODEelseif (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 things1- 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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 5, 2014 at 16:01 #30682sharmstrModerator@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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 5, 2014 at 17:55 #30689ahd904ParticipantSharmstr, 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 ??
October 10, 2014 at 20:00 #31362AbeKeymasterHey 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.October 10, 2014 at 22:21 #31374sharmstrModeratorAwesome. Thank you!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.