Add the New BuddyPress Mentions Interface to bbPress Forum Replies

buddypress-bbpress

BuddyPress 2.1 was released yesterday with a handy new mentions interface that pops up a suggestions panel as you are typing. In the past, you would need to know a member’s username in order to write a mention in the activity stream, which many times meant looking it up. The new mentions interface makes it easier to pull users into conversations that happen in the activity stream.

Many BuddyPress sites utilize bbPress for forums, as the plugins work quite seamlessly together. bbPress forum replies is another place where access to the new mentions interface would prove to be enormously useful, as forums are a central place for interaction and conversation on many community sites. A ticket for adding this already exists in bbPress trac.

In the meantime, BuddyPress core developer Mathieu Viet, better known as @imath, posted a quick gist for adding the mentions to bbPress forum replies. Simply add the code to your bp-custom.php file:

[php]<?php
function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
if ( function_exists( ‘bbpress’ ) && is_bbpress() ) {
$retval = true;
}

return $retval;
}
add_filter( ‘bp_activity_maybe_load_mentions_scripts’, ‘custom_bbpress_maybe_load_mentions_scripts’ );[/php]

I tested it and it works exactly the same as it would in the activity stream. Here’s what it looks like, added to a test site with BuddyPress and bbPress:

bbpress-demo

Keep an eye on the relevant ticket, as this feature is likely to make its way into bbPress core in the near future. In the meantime, many thanks to @imath for this quick workaround. You can add it to any site using BuddyPress 2.1 and bbPress for better use of mentions in your forums.

16

16 responses to “Add the New BuddyPress Mentions Interface to bbPress Forum Replies”

  1. So ah what’s up with the bbPress general development process? seems basically stalled.

    2.6 shows on trac as “3 months late” and this is after being pushed back twice. So 5+ months late.

    We’d all appreciate an honest sit rep from the team.

  2. Dev Progress in bbpress is the slowest of all forum boards out there. If you want this feature you WILL be waiting for years for it to happen. Couldn’t some of the main WordPress Core team come over and fix it up for a short time.

  3. What’s wrong with simply using the bbPress Post Topics plugin? WordPress has a Plugin API for this reason. I don’t understand why bbPress is catching flak for this when a solution already exists.

    As for the @mentions, why hasn’t anyone built the plugin yet? If there’s enough demand from people or money, I can guarantee there’s someone who can build the plugin.

    • several reasons Justin, first, I was just using this as an example to illustrate stalled development, there are many more examples but this was an obvious one because the code is just sitting there ready to be put into core

      second, some things are better in core and other things in plugins. the dev team has agreed that this one falls into the former category but it is just sitting there gathering dust

      third, some prefer to use as few plugins as possible to not overload their wordpress installs, why stack a plugin on top of another plugin when you don’t have to?

      fourth, they’re ‘catching flak’ *because* the solution already exists!

      • several reasons Justin, first, I was just using this as an example to illustrate stalled development, there are many more examples but this was an obvious one because the code is just sitting there ready to be put into core

        Nothing in the ticket suggests that this is stalled development. With no patch, it seems like no one in particular cares much about that specific ticket. bbPress development overall may be stalling. I’m not involved in its community though, so I wouldn’t know much about that.

        second, some things are better in core and other things in plugins. the dev team has agreed that this one falls into the former category but it is just sitting there gathering dust

        There are two comments on that ticket with no patch. Maybe there’s talk somewhere off-ticket where the dev team agrees this belongs in bbPress, but I’m unaware of it. Personally, I think it’s better as an additional plugin.

        third, some prefer to use as few plugins as possible to not overload their wordpress installs, why stack a plugin on top of another plugin when you don’t have to?

        I’m not sure how you can overload your install with additional plugins. If there’s a plugin that does what you want to do, simply install and activate it. It’s not going to make a bit of difference if it’s packaged within bbPress itself or as another plugin.

        fourth, they’re ‘catching flak’ *because* the solution already exists!

        That just doesn’t make sense to me. If a solution exists for users, then they only need to use it.

        bbPress was originally supposed to be lightweight forum software with plugins that expand upon it. Maybe they’ve changed directions, but continuing to pile on new features does not fit in with the original intention.

        • bbPress was originally supposed to be lightweight forum software with plugins that expand upon it. Maybe they’ve changed directions, but continuing to pile on new features does not fit in with the original intention.

          I don’t think bbPress development has deviated from this course and as long as bbPress continues on this path, the more it will be just a developers playground. More and more users will likely not even consider bbPress as an option based on the lack of features out of the box compared with other solutions. That’s what I don’t understand about bbPress. Developing for developers which will never result in mainstream adoption. Just look at the bbPress user survey for all the evidence you need of this already occurring.

          I’d like to see a bbPress that strives for that middle ground of just enough features out of the box, plugins for everything else. But I don’t know where to begin to even classify the middle ground. Discourse seems like a good start, definitely not vBulletin.

  4. After using Discourse which has auto user suggest built in as a feature, I’m spoiled by it. It’s a great way to bring specific people into a conversation that they might otherwise ignore or not be aware of. I hope this enhancement makes it into bbPress. It’s another way of enhancing the communication between members of a community. I’d love to see an argument for not adding it to bbPress or why it’s better off as a plugin rather than in core.

    Now that BuddyPress 2.1 is available, I think we’ll see more effort and work go towards bbPress 2.6 being released.

    • There are dozens and dozens of features and improvements which bbPress could “borrow” from Discourse. IF the dev team was active and humming as they have in the past.

      I join you in hoping that with BuddyPress 2.1 in the bag more attention will be paid to bbPress since they do share most of the same core group of people.

  5. This seems to work fine on bbpress text editor. However, there is little problem as mention interface do not work if we use visual editor for replying or topic creation in bbpress. How to solve that? any suggestions.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: