Skip to:
Content
Pages
Categories
Search
Top
Bottom

Details About the New Theme Architecture


  • Jeff Sayre
    Participant

    @jeffsayre

    With BuddyPress version 1.1–which will be officially released in the next several weeks–there will no longer be bhome and bpmember themes. Instead, BuddyPress will adopt the parent/child theme architecture that WP 2.7 made possible.

    Backwards compatibility will remain for a while for those that want/need to use the old theming architecture. To use the old theme architecture, you need to keep the /bp-themes/ directory. Place/keep your old member themes in there. BuddyPress should override the new theme architecture in favor of the old one if you have a /bp-themes/ directory. However, please note that support for the old theme architecture will eventually be phased out. You will eventually need to update your themes to a parent/child architecture.

    Furthermore, once version 1.1 of BuddyPress is released, the Skeleton Theme that is currently bundled with BuddyPress (up to version 1.0.3) will be discontinued.

    Learn more about parent/child themes in WordPress.

Viewing 25 replies - 1 through 25 (of 39 total)

  • abcde666
    Participant

    @erich73

    absolutely great news ! I think this will make customizations easier ?

    Thanks a lot to all BP-developers !


    mat_
    Participant

    @mat_

    Greeeeeat news… The one that i was waiting for :)

    So now, can i start using that new architcture ? how ? do i have to download the last build from the trac ?

    Thx !


    Andre
    Participant

    @avidjockey

    To clarify things in my mind, can you (Jeff, or anyone else) explain the implications of moving to BP parent/child themes for sites that do not currently use a bphome theme?

    Will it still be an option to use any WP blog theme (with BP widgets) for “home” in conjunction with the BP (child) member theme? Or will the “home” theme also have to be a child of the BP parent theme?

    And how would that even work, if the “home” theme (i.e. a good old fashioned blog theme) potentially has its very own parent theme? Can a child theme have two parents? Or is this completely irrelevant because the “home” theme stands on its own since it’s not relying on any BP hooks if it’s strictly using widgets?

    Please excuse my ignorance of WP parent/child themes. I wasn’t even aware of them until a few days ago.


    Jeff Sayre
    Participant

    @jeffsayre

    @mat_

    So now, can i start using that new architcture ? how ? do i have to download the last build from the trac ?

    You have two options: install the latest trunk from SVN, or wait for version 1.1 to be released in the next few weeks.

    @Andre

    Will it still be an option to use any WP blog theme (with BP widgets) for “home” in conjunction with the BP (child) member theme?…And how would that even work, if the “home” theme (i.e. a good old fashioned blog theme) potentially has its very own parent theme? Can a child theme have two parents?

    Any well-designed WP theme can be used as a parent theme. Unlike with us humans, child themes can only have one parent theme. Of course, a given parent theme can have many child themes.

    Here’s a useful article on making child themes that goes into great detail. Especially look at the resources he provides at the bottom.

    Perhaps jjj can chime in here as he is the consummate theme designer–much more so than I.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    The way this works is actually really super easy and very, very awesome…

    There are a few different variations of ways to do this, and I can see some really imaginative uses of this method doing some really fantastic and super awesome things, so if you’re not already, I suggest you get excited…

    I think the way that most people will use this method is with the included BuddyPress Framework theme as a jumping off point. Think of it as the HTML and bare-bones styling to get your site’s root blog and BuddyPress profile/directory pages up and running. It includes all of the normal files you would expect from a typical WordPress theme (single.php, comments.php, page.php, index.php, home.php, attachments.php, etc…) plus it includes all of the theme files for BuddyPress registration pages and components in their own respective folders similar to what bp-member did.

    Currently, parent/child template relationships do NOT include the parent template’s style.css, so if you’re making a child theme, you will need to manually include the style.css of your parent theme with an @import rule, but it takes 2 seconds to type in so no big deal.

    So that means that your parent/child relationship is really only for .php files until you manually @import a CSS file from another directory.

    To answer your question about multiple parent themes, yes and no. :)

    Lets say we have three themes: bp-framework, bp-default, and bp-child.

    Each theme/template can only name off one parent, but that doesn’t stop the parent theme/template from having its own parent also. Example: bp-child could name bp-default as its parent, and bp-default could name bp-framework as its parent, and they will recursively overrule each other down the parent/parent/child ladder with the current template winning at the end.

    This works well in situations where you might not need a home.php for your child themes. Home.php is a WordPress file for hardcoding the landing page of your blog, and maybe child themes don’t need one. In that case, move home.php into a “bp-home” folder with a style.css that makes the bp-framework its parent and includes the parent style.css, assign bp-home as the theme for your root blog, and you’re done. This way the other blog themes won’t have a home.php for no reason.

    Because of this, it’s possible to have themes inherit from multiple other themes if you plan ahead in such a way that allows for this. My experience with this idea and creating my own framework is that it takes a little pre-production planning, but it pays off big time later on.

    The other crazy fluke is that parent themes don’t need to be active in the Site Admin area. This means that you could have child themes active for users to select without allowing them to select the parent theme, and still have the parent theme’s files be accessible to the child. This really gives you a better way to control the themes that users have access to and how they work with your custom framework to keep your header/footer/other files in sync.

    I personally can’t wait to see what some of the more popular WordPress theme guru’s are able to pull off with the next version of BuddyPress.


    abcde666
    Participant

    @erich73

    1)

    I do have BP-version 1.0.1 running on a site and have made a few customizations so far (just CSS-changes and some images).

    So with the new template-structure: should I delete the current install completely and get the BP-version 1.1 installed ? I mean: what is the best way to upgrade to the 1.1-version when it will be released in the next few weeks ? I definitely want to have the new template-structure, so I guess I would need to set-up my website from scratch, right ?

    And: I am running the site in german-language only.

    2)

    will this new template-structure also make it easier to design a custom-template for the user-blogs ?

    Like I would like to have the user-blogs having the same CSS-style as my main pages ?

    I still have not been able to figure how to do this. I would like the user-blogs to have the same design in order to have a consistent website.

    Why is this not already the case at http://www.testbp.org ? Why is it still the original WordPress-design ? Is there a chance you create a plugin or something at which the Admin is able to select to chosse the design of the “User-Blogs” like choosing from “WordPress original design” or “TestBP.org design” ?

    3)

    is there a chance to have a “package install” which will have ONE package which will include all latest software: WordPress 2.8.x, BuddyPress 1.1 and BBPress ?

    I read many post where I see people having troubles integrating the BBPress-software into the system (even an experienced BP-expert had troubles).

    Is there a chance you will create a 1 Package download which will make it very easy for people to have a full website (like http://www.testbp.org) installed ?

    So literally 1 click-download will create a ready-made website, same like testbp.org ?

    4)

    a user-request to get invited into a “Private Group” is not possible being accepted. This does not work yet at my installation and I think this is a general bug.

    5)

    the wording of “Blog” and “Blogs” is confusing. In both english and german language.

    Many thanks,


    Jason Giedymin
    Participant

    @jason_jm

    @Erich73

    ==bugs==

    I suggest using trac for any bugs.

    ==user blogs & design==

    User blogs are run by MU. If you want to retain a ‘similar’ design you could:

    • draft a wp theme using similar colors etc…
    • perhaps use a global footer or manually add in some sidebar widgets to force show some site-wide bp content
    • flag this theme as the default
    • flag this theme as the only theme ‘turned on’ via site-wide admin

    ==1 Package==

    I agree, yet also disagree on your suggestion.

    It wold be very efficient to have a turn-key bundle. It would surely make many people’s lives easier. However to do so now would be very difficult for the existing devs. Now it absolutely doesn’t stop anyone else from doing it however.

    Having a bundle offered by the .org sends the message that all apps are 1 wholly integrated unit. That will also require webserver, php, mysql integration for a turnkey solution (how many times do we see “i need help with X re-write”.) Also on support, this type of product would deserve a single forum, a single user group, plug-in pages, etc… At the moment It’s now quite there yet. As I understand it, this is a goal for the .org long term. Not to sure about the backend integration however.

    As you, I also see the many frustrations which users do experience. I try to help support the community as much as possible, may it be cross app integration, patches, other info, and in some cases monetary and personnel donations to many of the backends I just described.

    This is what makes open source great, it allows users such as yourself who come up with an idea which benefits the community to start working on it. I no doubt believe a project such as this would get support from various existing communities and users.

    Go for it!

    I think the only way you could have a 1-click option would be if… at some point… there were a buddypress.com like wordpress.com. That said… all of these projects are auttomatic projects… so maybe at some point in the future they will all merge into one product? Who knows.


    James
    Participant

    @marine5942

    With the structure that is going to be implemented, does that mean you’ll have to use the “default” buddy press theme, and do your own customizations, or can you upload your own theme, and integrate the buddypress layout into it?


    Jeff Sayre
    Participant

    @jeffsayre

    You can either use the default BuddyPress parent theme (which is actually called bp-sn-framework) and child theme, use the default parent theme with your own child theme, or use the parent theme to make your own, custom parent theme and then add your own custom child themes.

    Yipes! I tried trunk installing off SVN and it borked me with the old ‘cannot modify headers’ blarg.

    Darn it, I love child themes and can’t wait for this one!

    More instructions will come on the 1.1 release. Basically you can copy the default theme and make your changes. It’s still using the framework. Or, you can add a custom.css file to _inc/css/ in the default theme and add your custom styles if you like. You will need to uncomment the line in style.css.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    To summarize, the new theme structure includes a skeletal framework right away to start, that allows other themes to inherit the styling of BP HTML, CSS, and AJAX if you choose. It answers the age old “How do I get my child themes to look like my root theme?” question right off the bat. It also answers most of the “How do I port my existing theme to look like BP?” question too, but some adjustments will need to be made to make it look perfect. It also means that as new BP core features are developed, the BP default framework is updated as well, allowing your child themes to tap into the new HTML, CSS, and AJAX without any modifications to themselves. Neat eh?

    What this REALLY does (in my opinion) for theme authors, is it puts EVERYTHING that the WHOLE website will need to look and work correctly in 1 convenient theme folder; with the option of subdomains having their own template files override the root if you as a site admin so choose. You can inherit the header.php and footer.php, but change the single.php and category.php if you want to. Or say that one subdomain gets blue links, and the other gets orange; a few changes in the style.css and you’re set for that child theme.

    It’s just awesome and the anticipation of how people will use this is killing me. :)


    Jeff Sayre
    Participant

    @jeffsayre


    abcde666
    Participant

    @erich73

    @John James, (it´s strange to always have to write “@somebody”, why is the forum and the wire not THREADED ? Also, why does the person I am replying to not get an e-mail-notification about my reply?)

    anyhow, now to my question:

    how to easily apply my own custom-theme onto the user-blogs ? I would like to have ALL my user-blogs to have the same design as my main-page.

    Many thanks,

    Erich


    alcina22
    Participant

    @alcina22

    hi to all the buddypress friends…:)

    I have a question…

    if I would make a 4 columns layout for buddypress, with this new architecture, I do make my change in the parent theme or in the child?

    I think I will need a “sidebar2.php” and 3 in the parent theme? Is it correct?

    sorry for the question, I don’t know if it is exactly on topic, but I found this news when I was on the point to start “my” bptheme…

    so, I hope in your help!

    Thank you! maybe also a link to start with a new bp layout?

    I’m a little lost…

    thank you again!

    ciao :-)

    alcina

    P.S. sorry also for my… “english”!!!

    I am having problems in using the OLD themes. As far as I got it, it still should work… Could it be that after activating one time the new theme-structure that there is no turning back?

    Thats what I’ve done:

    1. Installed the new themes

    2. Deleted the bp-themes directory

    3. Played around

    4. Tried to go back, installed the old themes again (member in bp-themes which I created again)

    5. White screen of death

    Any ideas?

    By the way: Still trying to figure out how to adapt my highly adapted theme… I will need in my child theme a couple of template files (php)… it seems not as easy as I thought. Any recommendations how to do it (change the framework or only change the child? If only the child – how to get around some heavy stuff in the framework?

    THANKS!!!!


    Jeff Sayre
    Participant

    @jeffsayre

    @alcina22

    Your questions are best asked by starting a new thread. I suggest you do so in the “How-To and Troubleshooting” forum.

    @Michael

    With step four in your list, were you reinstalling your custom theme or the default bphome and bpmember themes? Did you reselect the proper theme in WPMU’s backend? Also, have you checked your server’s log files to see if there is useful information in pinpointing the issue?

    I also suggest that you start a new thread as this thread is for general announcements and general questions about the new theme architecture.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @Erich73, You would be best to make two themes for yourself; one as a child of the BP framework, and the other as a child of your first theme.

    The first theme would include all of your custom CSS, images, etc… The second theme would bypass the home.php file and include any extra CSS or images that you might need. It’s simple once you see how it all plays together.

    @alcina22, child theme files will always override any parent theme files. With that being said, if you need a home.php with 4 columns, then you make a home.php file in your child theme folder, and you add the extra code in your child theme’s function.php file to accommodate for the extra sidebar areas.

    @Michael, BP1.1 should be backwards compatible, but once you’ve moved forward it is difficult to go back. The idea with 1.1 is that it’s something you’re going to want to commit to using, as there is so much deprecated code and renamed functions/extra functions, that your old themes will still work but are obsoleted by the new architecture.

    If you have a HIGHLY customized theme, then it will make more sense to use your existing theme as your own framework, and make other themes work as a child of it instead. Basically you’ll want to compare and contrast the way that all the new 1.1 themes work, the functions they use, and the files it needs, and merge those files with your own. Using the BP framework isn’t REQUIRED, but it’s a great starting off point for most people. For the rest of us that have gotten used to making our own themes, we’re stuck making our own theme again for 1.1 if we want things done our way. It’s easier this time around though, I promise. :)

    I have not yet confirmed support for the old themes in 1.1. This will happen.


    Detective
    Participant

    @detective

    I just tested locally BP 1.1.

    The new theme architecture is great, previously I had a custom bp theme that integrated another WP theme (Thesis). Now it is much easier to integrate another theme! :)

    However, I have found that the BP code many times uses the following code:

    load_template( TEMPLATEPATH . '/some_file' );

    This doesn’t work quite right if some uses a custom theme, because it directly looks into the parent theme for some_file instead of checking in the child theme first.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @detective, I thought that issue was addressed but it’s possible it crept back in. Child theme files should always override the parent file, with the exception of style.css and functions.php which have special handling.


    Detective
    Participant

    @detective

    The code is spreaded through many bp template tags, like:

    function bp_get_profile_header() {
    load_template( TEMPLATEPATH . '/profile/profile-header.php' );
    }

    Since TEMPLATEPATH always point to the parent theme, currently if someone uses a custom theme, then it’s impossible to use those template tags. Not a big deal, almost always it’s possible to write a copy of the function and load the correct file.

    If I remember correctly, there is a function named locate_template that first looks into the child theme, and then into the parent.

    Yes, the load_template calls need to be replaced with locate_template calls. I will fix this shortly.


    Jason Giedymin
    Participant

    @jason_jm

    since your doing the digging.. :-D I posted a scheme (http,https) security patch for the depreciated and new theme logins @ https://trac.buddypress.org/ticket/960

Viewing 25 replies - 1 through 25 (of 39 total)
  • The topic ‘Details About the New Theme Architecture’ is closed to new replies.
Skip to toolbar