Skip to:

Opened 13 years ago

Closed 12 years ago

Last modified 8 years ago

#3265 closed enhancement (wontfix)

bp-default - move sidebar to footer

Reported by: svenl77's profile svenl77 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Templates Keywords:
Cc: mercijavier@…


Ticket created according to this forum thread

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)

patch.txt (12.7 KB) - added by svenl77 13 years ago.
move sidebar to footer

Download all attachments as: .zip

Change History (19)

#1 @DJPaul
13 years ago

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.

#2 @svenl77
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 @DJPaul
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.

#4 @DJPaul
13 years ago

  • Version changed from 1.3 to 1.2

#5 @svenl77
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.

#6 @DJPaul
13 years ago

Nice plan! If you patch it, we'll take a look at it.

#7 @svenl77
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 @cnorris23
13 years ago

You would use SVN ( 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 :)

13 years ago

move sidebar to footer

#9 @svenl77
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.

Last edited 13 years ago by svenl77 (previous) (diff)

#10 @DJPaul
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 @johnjamesjacoby
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 @karmatosed
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.

#13 @boonebgorges
13 years ago

  • Milestone changed from 1.6 to Future Release

#14 @DJPaul
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 :)

#15 @mercime
12 years ago

  • Cc mercijavier@… added

#16 @DJPaul
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.

#17 @DJPaul
12 years ago

  • Milestone 1.7 deleted

#18 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.