#3265 closed enhancement (wontfix)
bp-default - move sidebar to footer
Reported by: | svenl77 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | |
Cc: | mercijavier@… |
Description
Ticket created according to this forum thread http://buddypress.org/community/groups/requests-feedback/forum/topic/call-to-arms-own-your-thing/
Buddypress Theme 'bp-default' comes with the sidebar included in the pages instead of the footer. This makes it difficult to build child themes with different sidebar structures.
Plugin developers use the bp-default structure for their template files. That means the sidebar is also shipped with every plugin, which makes theme design even more difficult, because you have to change every plugin template.
In the end you have nearly every template file in your child theme just to have the sidebars changed.
To make this more easy, I would like to move the sidebar into the footer.
I like to write this as my first BP patch.
Attachments (1)
Change History (19)
#2
@
13 years ago
It has nothing to do with switching from right to left.
I will give some examples:
If I have a left and right sidebar, and I want to turn off the right sidebars in groups, but keep the widgets from the left sidebar, css wouldn't work.
Also if I have a theme option page to turn off the right sidebar, the option wouldn't work in template files from other plugins which extends for example the groups. If I go to the new group component the component template is loaded. The plugins are based on the bp-default, and so they add the sidebar. My theme option will not work.
I think if the bp-default changes and moves the sidebar in the footer, many plugin authors would delete the sidebar out of the template files.
If you like to have no sidebars in your theme, this would be difficult too.
Or even if you want to have only a left sidebar and your theme has already integrated a left sidebar. You will run into trouble.
This is actually another ticket, but in the default theme there is a hard coded login widget in the right sidebar.
If I switch from right to left via css, I would stuck with the login widget. I believe this should be a real widget.
I also do not feel comfortable to add the sidebar to the footer.
But to be honest I think actually Buddypress shouldn't add sidebars at all.
This patch is just for 1.3, as I hope it will make theme design for non BuddyPress lovers more easy, and more people start building their own themes.
In future releases, I hope the BuddyPress theme will change to come without sidebars, header and footer and just add content loop templates and widgets. But for now, I believe moving the sidebar into the footer would make it more easy.
#3
@
13 years ago
This would duplicate sidebars in existing child themes. I think this should only get into 1.3 if there's some way of checking if that sidebar has already been rendered.
#5
@
13 years ago
By reading the code of the locate_template() function , I can see it comes with 3 parameters.
locate_template($template_names, $load = false, $require_once = true )
the third parameter “$require_once” is ignored in buddypress and default is true
locate_template( array( ‘sidebar.php’ ), true )
that means the conflict could just happen by using something like this
locate_template( array( ‘sidebar.php’ ), true, false ); where $require_once is false.
and only if we add $require_once as false in the footer too.
I did some testing, and even if a plugin has locate_template( array( ‘sidebar.php’ ), true, false ).
There will not be another sidebar rendered if we use locate_template( array( ‘sidebar.php’ ), true, true) in the footer.
#7
@
13 years ago
Hi @DJPaul, some more newby question... how do I add a patch?
I need to delete the sidebar from nearly every file in the theme and add the sidebar to the footer.
If I zip the theme its still 401 kb but the max file size is 256 kb.
If I add every template file separately, this will be a lot of work, also for the person who will review it.
Can you give me some advise?
Thanks ;-Sven
#8
@
13 years ago
You would use SVN (http://codex.wordpress.org/Using_Subversion). It's fairly easy, and it will save you having to add all the files, as only the changes will be added to a patch/diff file. Good luck :)
#9
@
13 years ago
Thanks for the help, I have tried out Subclipse, hope this patch.txt is what you expect.
By doing the patch, I really feel badly, because this is twisted.
On the one hand we shouldn't add the sidebar to the footer... on the other hand it will make things more easy and if I think deeper, I feel like the buddypress theme itself is crabwise, so why not.
If we look to the onecolumn-page.php, it blows my mind, as we need an extra footer for this.
And from this point I guess it should be done different.
The footer.php should be without sidebar and the overwritten footer should have the sidebar in.
I really believe to get the sidebar out of the pages and plugin-template-files is a needed step to get more people making buddypress themes.
#10
@
13 years ago
- Keywords dev-feedback added; bp-default removed
I think we are too close to the release of 1.3 to do this, and to have time to test it for backwards compatibility, etc?
#11
@
13 years ago
- Milestone changed from Awaiting Review to 1.4
- Severity set to normal
- Version 1.2 deleted
Paul - Agreed. I agree that having the sidebar loaded all over the place is a waste, but moving it to the footer (while more efficient) has a chance of messing up the layout of thousands of child themes. Without a solid applicable patch, I'm punting this to 1.4.
#12
@
13 years ago
With the new sidebar 'buddypress' parameter can't you just get around this in themes by loading a blank file for that? Seems to me that's whilst not a perfect option the way if you do not want a sidebar for your theme to do it.
We already have footer widgets and putting a sidebar in a footer defeats usability - a ton of themes won't want that either.
#14
@
12 years ago
- Milestone changed from Future Release to 1.7
We'll address this in 1.7 with the theme compatibility, so I'm putting this ticket in to the 1.7 milestone so we don't forget to update/close this ticket in due course :)
#16
@
12 years ago
- Keywords dev-feedback removed
- Resolution set to wontfix
- Status changed from new to closed
We're not going to make this change to BP-Default in 1.7 for backwards compatibility reasons (I'm not sure there's much point at this stage in BP-Default's life). The theme compatibilty templates avoids header/sidebar/footer entirely, so I'm closing the ticket as a wontfix. Big thanks to svenl77 for original patch and discussion.
What did you achieve by doing this in the themes you made; what did it let you do? If it was switching it to the left side, you can do that in CSS.