Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress 2.0 – Theme Compatibility


  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    A few questions have cropped up already, so lets funnel the discussion here.

    bbPress 2.0 introduces a radical new approach at integrating robust new functionality into existing WordPress themes. If you’re an average user looking for a turn-key forum solution, this works out pretty awesomely – If you’re a talented developer trying to beat your own drum, it’s all probably a little bit confusing.

    Theme Compatibility

    bbPress comes with a child theme of TwentyTen, titled (you guessed it) bbPress – TwentyTen. This theme includes all of the custom bits that bbPress needs to function, broken up into template parts to allow them to be used in several places, like template files, shortcodes, and widgets.

    1. MOST COMMON – If you’re using any other conventional WordPress theme (TwentyEleven, BP-Default) and find the default template layout of bbPress acceptable, you don’t need to do anything at all – it should just work.
    2. DO NOT put any custom themes in “/bbpress/bbp-themes/” as they will get wiped out when you update bbPress.
    3. CUSTOM – If you want to build your own theme or make changes to the existing template files, you’ll need to do the following:

      Copy Files

      • If this is not a custom theme under your control (meaning you are not the author) you’ll want to copy the contents of the “/bbpress/bbp-themes/bbp-twentyten” folder into your “wp-content/themes/%YOURTHEMENAME%” folder, where %YOURTHEMENAME% is the name of your custom Child Theme of whatever your current theme is. This is so theme updates don’t wipe out all your hard work later.
      • If you are the author of this theme, then you can copy all the files *out of* the “/bbpress/bbp-themes/bbp-twentyten” folder into the folder of your theme, and make your own edits from there. The files to copy include the single-*, archive-*, page-*, and anything in the subfolders.
      • In neither case should a new folder with the name “bbp-twentyten” exist. You are not copying the FOLDER, you are copying what’s IN the folder.

      Add Theme Support

      Now that you’ve got the files copied over, you’ll need to tell bbPress that you are in control of the theme situation. You do this by adding this to your functions.php file:

      add_theme_support( 'bbpress' );

      By doing this, you’re telling bbPress that your theme has its own template files to handle all of the new functionality that bbPress adds. This method gives you a single on/off switch to either use the standard theme compatibility, or use your own.

    In the future, specialized template compatibility themes can be created either as plugins or child-themes to work like “add on packages” to existing themes, without requiring elaborate edits to existing themes, moving files around, etc…

    Shortcodes (as of May 23, 2011)

    Whether you rely on theme compatibility, or decide to go the custom route, we’ve included a few standard shortcodes to let you output specific forum content on any post or page in your forums. This is accomplished within an output buffer, so they won’t interfere with any of your existing page or post content. Note that if your theme specifically removes the shortcode functionality, these will not work, and will instead the actual text of the shortcode will appear on your site.

    • [bbp-forum-index] – Show the root forums
    • [bbp-single-forum id="A forum ID"] – Show a specific forum
    • [bbp-topic-index] – Show all topics
    • [bbp-single-topic id="A topic ID"] – Show a specific topic
    • [bbp-topic-tags] – Show all topic tags
    • [bbp-topic-tag] – Show topics of a specific tag
    • [bbp-topic-form] – Show the new topic form
    • [bbp-reply-form] – Show the new reply form (not commonly used)
    • [bbp-single-view id="A view slug"] – Show the topics of a registered view

    In the future, we’ll be adding more shortcodes as the needs arise.

    That’s it for the first round of explanations. I’ll edit this post as more questions and answers come through.

Viewing 25 replies - 51 through 75 (of 144 total)

  • master5o1
    Member

    @master5o1

    folgerj: It is possible if extending WordPress’ html filtering system to allow images. In my post toolbar, I extended it to allow images for forum replies, which currently also includes blog comments.


    theurbantwist
    Member

    @theurbantwist

    Can someone take a look at my forum page and let me know some reasons as to why my forum isn’t showing up?

    I’ve followed all instructions to a “T” and I’m obviously moving in the right direction because my “Theme natively supports bbPress” as stated in the dashboard admin panel and on my forum page, it’s at least labeled at the top in the breadcrumbs section that it’s a forum but that’s pretty much it.

    Also I know that things are installed properly with the plugin because when I switch theme to default it works as is.

    I just want to know if I’m missing something. I’ve moved all relevant files into my theme folder, and like I said before I’ve followed instructions to a “t” and I’m pretty knowledgeable with wordpress and theme customization but can’t figure this out at the moment.

    Any suggestions?

    Forum page is located here: http://theurbantwist.com/community/


    Vicente
    Member

    @vruizg

    Hi!

    I’ve adapted the bbpress 2.0 plugin templates to my own theme…

    …and works fine!

    Take a look in http://www.vruiz.net/foros

    Thanks for this unpayable plugin ;-)


    enderandrew
    Member

    @enderandrew

    I’m using a custom theme (Clockstone) that is based on dark colors. The default twentyten theme doesn’t work for me.

    So I copied all the single-*, archive-*, page-* files, as well as the bbpress, css and js files into the root of my theme.

    So I have wp-content/themes/Clockstone/single-forum.php as an example

    I editted the css file to fit my color scheme. But once I add:

    add_theme_support( ‘bbpress’ );

    to my functions.php then bbpress breaks completely, and all my forum links return 404 errors. If I remove that line, then the urls and forums work, but with the default theme.

    I’m using the latest trunk as of today. Any suggestions?


    enderandrew
    Member

    @enderandrew

    I experimented making a bbp-clockstone child theme in wp-content/plugins/bbpress/themes/bbp-themes and that seems to somewhat work. Except I notice my pages are still pulling css from:

    wp-content/plugins/bbpress/themes/bbp-themes/bbp-twentyten/css/bbpress.css

    I should be pulling CSS from:

    wp-content/plugins/bbpress/themes/bbp-themes/bbp-clockstone/css/bbpress.css


    woodwardmatt
    Member

    @woodwardmatt

    @John – First of all, can I say what an awesome move to having bbpress as a plugin is! For the average user wishing to get forums up and running, you couldn’t ask for better! Nicely done!

    On more of a developer level I, the same as many of the guys posting, are probably a little thrown on the templating side of things. Just to clarify, I’ve joyfully created my fair share of wordpress themes and was looking forwarding to getting to grips with bbpress to do similar. At this point I can’t help but feel the templating side of things seems a little crazy (read awkward and unintuitive) unless i’m misunderstanding.

    By means of throwing my two pence into the discussion, I’d love to see the same approach for bbpress as was undertaken for wordpress. Namely the opposite of the following:

    DO NOT put any custom themes in “/bbpress/bbp-themes/” as they will get wiped out when you update bbPress.

    I love that bbpress has picked up the overall theme from wordpress but having the theme for the bbpress UI elements self-contained and separate from the wordpress theme would most likely clear up a fair bit of the confusion / frustrations. I know such a comment is easily made outside of understanding the full intricacies of the platform and that making such a change would no doubt have greater implications. However and to be honest, that was the approach I was expecting – most likely given the approach I was used to with wordpress. I know a similar comment has already been made, I’d just like to tip my hat to it, and raise it again for your consideration.

    Request: Custom bbpress themes to reside in “/bbpress/bbp-themes/” without risk of removal upon updates.

    Reason: To retain better / cleaner organisation of theme files and reduce complexity of theme development. (The replies / questions above are testimony to this)

    Payment: Pizza of your choice! ;)

    Once again awesome job, and hugely appreciate all the hard work!


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @woodwardmatt: Thanks for the kudos. :)

    The theme layer is complicated because there is no easy way to create a new type of content in WordPress without the theme supporting it.

    Originally you *had* to use a bbPress theme (bbp-twentyten) but that was only so I could build something out of nothing. Once I had a theme, I made shortcodes that use individual template parts so things could live anywhere and still look the way the theme looks. Lastly, I built the whole abstraction layer that used the shortcodes to output content where it belongs without you needing to do anything about it.

    The thing is, there is only one bbPress 2.0 theme in the world right now, and it’s the one that comes with bbPress 2.0. I’m not opposed to including more theme’s in core, but I think it’s someone else’s turn to make the next one.

    To your request: Currently impossible. :) Plugin updates delete the parent folder and recreate it with new contents. No way to avoid it getting wiped out. :/

    To your reason: Makes sense, and if we want to make more bbPress themes for core, we can. Then you can pick which “style” of bbPress you want inside your existing theme. Advanced developers still get the flexibility they desire. Win/Win.

    Payment: Delicious :)


    woodwardmatt
    Member

    @woodwardmatt

    @John

    Thanks for the quick response. Can certainly understand your rationale, sounds like one of those difficult choices had to be made and we are where we are. Thanks for clarifying for me (and all the other forum dwellers!)

    From a branding point of view I think in my circumstances i’m going to have to jump into the approach you initially outlined at the start of this thread. I think this is probably likely for a lot of people sporting custom designs & brands etc. Otherwise you’d end up with a whole heap of templates in the core I guess.

    That said, it would certainly seem sensible to have some key layouts defined in the core and provision for custom css styles as part of the main theme to cater for branding requirements. Was this the approach you were going for? (Just trying to get my head around it!)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I’ll probably come up with a bbPress Skeleton theme/plugin, to show off some of the flexibility. It’s possible to write a custom “bbPress Pack” that would totally override the default bbPress theme layer, without it even touching your current theme. I think that’s the ideal setup really, one where you can kinda “bolt on” parts of a website without needing to move files around here or there.


    woodwardmatt
    Member

    @woodwardmatt

    That would make sense. I think the key message is for myself (or anyone else reading this afterwards) is that the templating for bbpress is not intended to follow the same structure / approach as wordpress – that’s definitely where my confusion started to creep in.

    For the time being I’m likely to opt for overriding the CSS to provide the branding I require and stick with the current layouts in the default theme until the plugin’s had chance to settle in and some of the examples you mention have had chance to come about. I’d be interested to see more on the “bbPress Pack” approach in good time :)

    Thanks for all the insight, most useful!


    enderandrew
    Member

    @enderandrew

    @JohnJamesJacoby I believe I followed the steps you outlined, and all I got were 404 errors. The only way I got this to work, was the incorrect method of putting my bbp-theme in:

    wp-content/plugins/bbpress/themes/bbp-themes/bbp-clockstone

    Any idea why this is?

    I’d be content with a method to simply just redirect the CSS file to another location.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @enderandrew – I can’t accurately guess at what’s wrong. Try again? :)


    enderandrew
    Member

    @enderandrew

    I did a few different things a few different times. Initially I tried to follow the steps as best I understand them.

    I copied all the single-*, archive-*, page-* files, as well as the bbpress, css and js folders into the root of my theme. For example:

    wp-content/themes/Clockstone/single-forum.php

    wp-content/themes/Clockstone/css/bbpress.css

    etc.

    I edit my functions.php file in my theme and add:

    add_theme_support( ‘bbpress’ );

    Then all forum pages return a 404. Are these not the correct steps?

    Can you please clarify the instructions?


    woodwardmatt
    Member

    @woodwardmatt

    @enderandrew – If it helps at all, all I did was leave the default setup in place, having installed the bbpress 2.0 plugin. Then include a new custom css file (in the directory of my wordpress theme) and link to this beneath the call to the wp_head() function in the wordpress theme (e.g. in my header.php) – to ensure the custom css file overrides the css included by bbpress.

    I simply them overrode any of the styles that I wanted to change from the default. This is a fairly old-school approach to re-branding, but is perhaps one of the least invasive. This wont allow you to change very much of the layout but will allow you to change some of the styling to more closely match your brand and will give you a certain amount of protection against change as the plugin gets updated.

    Hope that helps :)


    enderandrew
    Member

    @enderandrew

    @woodwardmatt At the moment, I’m primarily interested in color changes, so that would work. However, with all the plugins I’m using in WordPress and Buddypress, each page load is calling tons of CSS files. I’m trying to cut down on page loading time and all the http get requests. I’d prefer not to load one CSS file, just to load another to overwrite it.


    woodwardmatt
    Member

    @woodwardmatt

    @enderandrew – I can understand the dilemma mate. It’s far from ideal, but aside from editing the core files and having to maintain your changes on every update its about the best I can think of at this point.

    That said just stripping out the include for the css file probably wouldn’t big that big a deal, may be worth investigating and weighing up your options.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Everything in bbPress and BuddyPress is coded using the WordPress actions API. There is absolutely no reason to modify any core files to do what you want to do. There are plenty of examples on how to accomplish what you need on the WordPress codex, and even in the bbPress code itself.

    Before you start chopping out pieces of core code, try to understand why it’s there. If you have questions on a specific piece of code in bbPress, open a new topic and I’m happy to explain why it’s there.


    woodwardmatt
    Member

    @woodwardmatt

    If I understood @enderandrew right, he’s basically trying to prevent the default bbpress css file from being loaded and include his own css file for styling? It’s probably a bit too a specific a query for this thread maybe, but one that would be an excellent one to get a formal response to. I can foresee this will be a common query given the confusion over the bbpress templating already.

    @enderandrew – Fancy starting the new thread? Perhaps we can get a approach detailed there that will prevent an additional CSS file being loaded.


    enderandrew
    Member

    @enderandrew

    @johnjamesjacoby That is precisely my concern. I’d rather get the templates/theme to work properly rather than put the child theme in the plugin folder, or alter core files.

    I’ve been asking for instructions on how to do this properly.

    I can’t be the only person looking to theme this for their site.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I can’t be the only person looking to theme this for their site.

    Clearly you’re not, and no one said you were. You are however one of the few having trouble getting it to work. Because of that I’d appreciate if you open your own support topic to get help for what you need rather than pollute this topic for everyone else.


    DeysonOrtiz
    Participant

    @deysonortiz

    Hello everyone and good morning.

    Has anyone been able to get bbpress to with the hybrid theme?

    On the Hybrid Forum were discussing BBpress and how I could not get it to work on the Hybrid Theme, when one of the members said it worked on his without having to go the custom route. This is what he stated:

    _____________________________________

    ‘ “All you have to do to get bbPress active on a Hybrid theme is activate bbPress 2.0 via the plugin repository, then create new page called forum or whatnot via the normal page editor. In the editor, just enter a couple of shortcodes, similar to this:

    [bbp-forum-index]

    some content to separate forums

    [bbp-topic-index]

    This will show your main forums and also a recent topics list. You can also use other shortcodes built in to bbPress for different functionality.

    The only thing I had to change was the overall table width of the forum, which easy enough to target with the Chrome web developer tools.”

    `

    I unfortunately was not able to get this to work.

    I am just curious if anyone has been able to get bbpress to work on the Hybrid Theme without any customization. I am a video editor and motion graphics artist, so coding is not my forte.

    Thank you for any help.

    This may seem like a silly question, but I’ve read through many of the replies and haven’t found the solution. If I’m following these instructions correctly, and copying “/bbpress/bbp-themes/bbp-twentyten” into my theme folder (which happens to be atahualpa), would I modify the style.css in “bbp-twentyten” to make it a child?

    If I’m modifying the style.css within atahualpa, how is it a child theme if you’re not asking us to make a copy of the original theme folder?

    I’m having some compatibility issues with Atahualpa, which I’ll dedicate to its own topic (in case anyone else also needs the help).

    Thank you! And great job so far!

    It appears that just installing the plugin, and by ignoring all of your compatibility instructions, bbPress 2.0 will inherit most of the Atahualpa style. For additional changes, it also appears that you can make adjustments to bbpress.css and accomplish most of what you need.

    It’s touch and go right now, but I’m so thankful that you guys put this plugin together.

    Just wondering

    If i want to add bbPress to my own theme, this topic tells me to add the add_theme_support( 'bbpress' ); to my functions.php <– the functions of my own WordPress theme.

    Because if you copy-/paste the files from the bbPress plugins folder to my wp-content > themes > theme folder it also has a functions.php file.

    What about two functions.php ?

    As @ BJ, I found myself confused as well from reading the instructions. I have just recently assumed you move everything except the functions and css files. But would you add the functions or css o your existing files?

    Clarification in the installation instructions would be great for those of us who are unsure.

    Looking forward to getting this to all work. I have Buddypress 1.5 with the track template files for that running pretty well. I will be looking to integrate bbpress 2.0 with that.

    Very glad to see both of these plugins come together after such a long time.

    Nice work to those who make this happen.

    Jay

Viewing 25 replies - 51 through 75 (of 144 total)

The topic ‘bbPress 2.0 – Theme Compatibility’ is closed to new replies.