Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sub forums in bbpress 2.3 and buddypress 1.7


  • moebis
    Participant

    @moebis

    I just installed the latest trunk of both to continue my testing. I like a lot of the improvements, but I’ve been discovering some bugs here and there. Not sure if this is the place to post it, but here it goes.

    First off, the 2 work well together now, except when you try to mix the site-wide forums with group forums. If you click on a group and look at the forum tab, it shows posts from the next group-forum or site-wide forums. What I’m attempting to do is create groups, with a top-level forum for each group, and then sub-sitewide forums underneath, which I nest using the backend bbpress admin. These sub-forums don’t have a group all their own they just belong underneath and listed in forums top of the master group they are part of. It looks like this functionality is somewhat coded into the newest branch of buddypress 1.7 and bbpress 2.3, and if fixed it would be perfect. I know there is a plugin called buddypress group hierarchy or something, but it’s not really what I’m looking for, because it assumes I want full group buddypress functionality surrounding the sub-forums. I just want more granular control over the topics on each group.

    @johnjamesjacoby – hear our plea. Allow us to create sub-forums in bbpress for the top-level forum in buddypress groups. When you click on the group, the sub-forums that belong to it will show underneath. When posting to the group forum, maybe even an option to move the topic to the top level group forum or sub-forums for the user? Just a thought. Thanks for all the great work on this, it’s getting much better now.

Viewing 16 replies - 1 through 16 (of 16 total)

  • moebis
    Participant

    @moebis

    Created ticket within buddypress trac: http://buddypress.trac.wordpress.org/ticket/4797


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Multiple forums per BuddyPress Group is started in bbPress, but likely won’t be finished for several months. There are a few technical challenges regarding performance that don’t make it entirely feasible. If it’s something you need, you’ll want to build it, and if you’re able, contribute back to the bbPress project.

    On the whole, I agree that it would be nice to have in core.

    What about assigning tag(s) to a group instead, like you do it on WPORG? Wouldn’t that be a good way to at least make it a bit more flexible while working towards the ‘multiple forums per group’ ?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I’ve considered this, but without term meta there’s no way to do sticky topics in groups.


    moebis
    Participant

    @moebis

    @johnjamesjacoby – This actually almost completely works within the current trunks of bbpress and buddypress, even the activity feed of subforums looks and works correctly within the group. The only bug is somewhere in the display of the forum tab in the group, I assume because it’s not expecting a subforum, which is why it doesn’t display the parent forum, which is also the group forum. I confirmed this by creating another subgroup (so 1 parent, and 2 child), and it will only display the latest forum/subforum created within the group and ignore the older 2 (the parent and first created subfourm). I will play around with the source code to see where it’s generating the group forum display and make a code suggestion if you would like. It’s probably just querying the bbpress tables for a forum associated with the group and whichever shows last in the table is what the display generates. It’s smart enough to already calculate all of the topics in all forums and sub-forums, so it’s about 90% of the way there. I think because bbpress and buddypress are partitioned so well, this might not be an issue, it’s almost feature complete in this regard, and I know the community has been clambering for this functionality for a very long time. Most end up turning to the hierarchy plugin, which really isn’t the long term solution. Is it possible to get this into 1.7, which is so close to release? If so, I’ll work out a quick solution, that is future proof and can be expanded on in future versions.


    moebis
    Participant

    @moebis

    Good News All!!! Ok…. I have sub forums working in buddypress with a small hack to group.php (in latest trunk of bbpress 2.3). @johnjamesjacoby was right, it looks like they started building this functionality into bbpress and so-far it works. The only thing left to do, is maybe make it display a little more intuitively (I’ll continue to work on that), and on the buddypress side allow sub forum posts to be added to the activity feed of the group it belongs to. I was wrong before, sub forum topic posts do not show up on group activity feed, but I think I’ve already isolated the code to fix that.

    Here is how to play with my hack in the latest trunk:

    EDIT: /bbpress/includes/extend/buddypress/group.php

    Delete lines 609-614 and add “?>” back to line 609.

    This is how the forums in groups looks now (you can see all topics from the group forum and the bbpress sub forum of that group forum). Also, the post box has a drop-down select to chose the forum or sub-forum to post to:


    stickFinger
    Participant

    @stickfinger

    Hi moebi

    I came here from a google search regarding subforuns in bbpress.

    Even before I install wp+bp+bbpress i´d love to know if you have news on this. For the kind of community i´m planning subforuns is a must :-)

    Also looking at your code, i´ve found in my group.php

    ` */
    public function remove_forum( $forum_args = array() ) {

    // Bail if no forum_id was passed
    if ( empty( $forum_args['forum_id'] ) )
    return;
    ` where public function is line 610 and so i´m a bit lost.

    Any help would be appreciate.
    Thanks


    stickFinger
    Participant

    @stickfinger

    Sorry, but that is really VERY important for my new project, so:

    Any insight on this?


    Fraternity
    Participant

    @fraternity

    Throwing a post on here to get notified as replies, as this is exactly what I am trying to achieve.

    This bit looks promising: “Good News All!!! Ok…. I have sub forums working in buddypress with a small hack to group.php (in latest trunk of bbpress 2.3)”


    Fraternity
    Participant

    @fraternity

    Also, sorry to derail a bit, but any comment on scalability of this?

    I currently run three forums, one each for a different capital city in my country, each with around 15 subforums.

    My plan is to combine these into a single site, so each group forum would have 15 subforums – which would be about 45 forums just to replicate what I have now.

    I’d then like to create another 10 or so site forums, so that our members from different cities can discuss general topics. And then I’d like to add more groups – initially I’d be adding 3 more groups, for 3 more cities in my country, which would be another 45 forums.

    That right away takes me up to 106 forums (10 sitewide, 6 group forums and 90 subforums), before I even start expanding the geographic reach of our groups beyond our country’s borders.

    Let’s say I expand into 50 different cities, I’m looking at about 810 subforums (10 sitewide, 50 group forums, 750 subforums).

    John mentions “There are a few technical challenges regarding performance that don’t make it entirely feasible” and I wonder if this was what he was getting at?

    Perhaps I’m posting this in the wrong section.. but figured you’re probably going to run into a similar issue, moebis


    stickFinger
    Participant

    @stickfinger

    At least one response Fraternity :-)
    It seem that matter are kind of…forgotten

    For my kind of site/ project this would be perfect.
    Also i´d like to mention a hidden (at least for me) fact: on a new install of bp 1.7 + bbpress we have no choice to stay with the now “retired” bp forum compnent.

    I´m telling you that because with the old forum component + we can achieve buddypress subgroups and subforums aswell.

    moebis…where the hell are you ? :-) we need your hack. please elaborate a bit more …


    Fraternity
    Participant

    @fraternity

    moebis – just took a look at this, I may have a more recent version than you use in your fix above.

    Here is how to play with my hack in the latest trunk:

    EDIT: /bbpress/includes/extend/buddypress/group.php

    Delete lines 609-614 and add “?>” back to line 609.

    The code I have at these lines is this:

    <?php bbp_get_template_part( ‘form’, ‘topic’ ); ?>

    <?php else : ?>

    <?php bbp_get_template_part( ‘feedback’, ‘no-topics’ ); ?>

    Probably not what I want to comment out. What I did find though is this (lines 567-581):

    // Suppress subforums for now
    add_filter( ‘bbp_get_forum_subforum_count’, ‘__return_false’ );

    // Set up forum data
    bbpress()->current_forum_id = $forum->ID;
    bbp_set_query_name( ‘bbp_single_forum’ ); ?>

    <?php

    // Remove the subforum suppression filter
    remove_filter( 'bbp_get_forum_subforum_count', '__return_false' );

    Group Subforums

    I highlighted a few things:
    1) Topics are only being displayed from group subforum 2 (believe you mentioned this above). This should be easy enough to fix
    2) I thought I was posting in the Group Forum when I used the default form below, but clearly (as per highlight 3) this is now set to group subforum 2
    3) Default Create New Topic is set to Group Subforum 2. I assume this was the “last retrieved forum” and is probably easy enough to fix. In my case, I’ll probably be changing my group forums to a category anyway, so I don’t actually want people starting new topics from this page.


    Fraternity
    Participant

    @fraternity

    That second codeblock (lines 567-581) should read:

    `
    // Suppress subforums for now
    //add_filter( ‘bbp_get_forum_subforum_count’, ‘__return_false’ );

    // Set up forum data
    bbpress()->current_forum_id = $forum->ID;
    bbp_set_query_name( ‘bbp_single_forum’ ); ?>

    <?php

    // Remove the subforum suppression filter
    //remove_filter( 'bbp_get_forum_subforum_count', '__return_false' );
    `

    The fact that bbPress doesn't automatically encode text between the code tags I used is a bit of a concern :D


    Fraternity
    Participant

    @fraternity

    @stickfinger: moebis provided his hack above. If you weren’t able to follow his instructions, then it’s probably not a good idea that you try to do this modification, and wait for the official release when the bbPress team get it sorted.

    As both moebis and I have pointed out, there are a few ‘issues’ at trying to force it to do this and that’s probably why the bbPress team have held off on the official release.


    stickFinger
    Participant

    @stickfinger

    I guess i have the same problem as you my file is different from moebis´ and so i could not find the correct lines.

    I´m not a coder but i can assure you that i know how to copy and paste :-)

    But you´re right, maybe i´ll start with BP 1.6.5 and use this Nice PLug to get the project as I wish for now. I have a similar project as Yours but very smaller

    A district site ( with maybe 4 to 10 ) and with subforums like Health, Education, Secutity, Traffic, etc.

    So for instance:

    Brooklyn:
    –Health
    –Education
    –Traffic

    Queens:
    –Health
    –Education
    –Traffic

    But i still have some concerns about future updates, you know. i´m a bit stucked :-)


    Fraternity
    Participant

    @fraternity

    Just came back to this after a number of months and see there are a few new versions out

    Have group subforums been implemented yet? I couldn’t tell from the release notes.

Viewing 16 replies - 1 through 16 (of 16 total)

You must be logged in to reply to this topic.