This topic has 11 replies, 2 voices, and was last updated 8 years by sharmstr.

  • Author
  • #64267
     Mike
    Participant

    I’ve added some code to add mentions to bbpress, but for some reason it’s not working with Group Forums.

    I’m using this code: http://wptavern.com/add-the-new-buddypress-mentions-interface-to-bbpress-forum-replies

    Any tips to get this to also work in Group forums?

    Thanks!

    Mike

    #64293
     sharmstr
    Moderator

    Why aren’t you asking the person who wrote it?

    Anyhow, probably because the code has is_bbpress().

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64297
     Mike
    Participant

    Great point. Just wasn’t sure if there was something KLEO specific that may be handled in the way Group forums interact with other bbPress forums on the site. Thanks!

    #64300
     sharmstr
    Moderator

    You can always test that by enabling the WP 2015 Theme temporarily to see if the code works, which I’ve done and it doesnt. 🙂

    Anyhow, there used to be a bp_is_group_forum() function in bp (well, its still there) that would tell you if you were on a group forum page. The problem is that it checks for the old type of group forums and doesnt work on newer installs. You just need to google for a way to determine if you’re on a group forum. That would be my guess anyway.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64304
     sharmstr
    Moderator

    Try this instead. I dont really like it because it only checks to see if you are on a group page, not a group forums page.

    COPY CODE
    
    function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && ( is_bbpress() || bp_is_group() ) ) {
    		$retval = true;
    	}
    	
    	return $retval;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64313
     Mike
    Participant

    That seems to work great! Thanks so much!

    #64391
     sharmstr
    Moderator

    I’ve added this as an option in Theme Options > bbpress. Lets see if its accepted by the devs.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64554
     sharmstr
    Moderator

    This is available in Kleo 3.0.3.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64562
     Mike
    Participant

    Awesome! Great work. I’m assuming when I upgrade when it’s released I should remove the code you gave me from my child theme?

    #64564
     sharmstr
    Moderator

    Yes. Then save your theme options. You dont have to change anything, just save. See if it works and let me know.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #64570
     Mike
    Participant

    Seems to work! Thanks!

    #64571
     sharmstr
    Moderator

    Sweet!

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 12 posts - 1 through 12 (of 12 total)

The forum ‘Plugins questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?