mrentropy (@mrentropy)

Forum Replies Created

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

  • mrentropy
    Participant

    @mrentropy

    @erikalleman thanks so much for taking the time to respond — especially when it’s not currently something you are working on.

    I know you will not need this, but I thought in case others have this issue, and come across this post, I’d add that there is more needed to solve this issue than I posted last week.

    For both of us, we were/are attempting to utilize the ajax behavior for a series of topics. However, the JavaScript that bbPress utilizes targets an ID and not a class name. This means, that outputting a series of topics with Favorite links will all have the same ID, and only the first topic will use ajax.

    My solution ended up requiring template overrides for loop-single-topic.php to create unique IDs for every favorite link. Then I wrote a new click function for Favorites, as well as a new bbp_ajax_call function in js/engagements.js.


    mrentropy
    Participant

    @mrentropy

    Actually, in my case, the issue was that I was overriding the theme files and had removed this span. <span class="bbp-row-actions">. bbPress must try ajax first, and if it fails, just redirect the page — and the JavaScript logic must look for that class name? Adding the span back, made the page behave as desired.


    mrentropy
    Participant

    @mrentropy

    Hi Erika,

    Were you ever able to make the AJAX buttons work? I’m having a similar experience of the page always reloading after favoriting or subscribing.


    mrentropy
    Participant

    @mrentropy

    I realize this topic is more than six years old, but I’ve been attempting to achieve similar behavior, and adding the following code in a custom plug-in seems to work. I have a taxonomy of “ideacategory” and I’m able to create a bbPress view called “ideacat” that filters all of the topics where the category term is equal to “24-hour-market-watch.”

    function idea_register_custom_views() {
    		
    	bbp_register_view(
    		'ideacat',
    			esc_html__( 'Idea Category', 'bbpress' ),
    			apply_filters( 'bbp_register_view_ideacat', array(
    			'tax_query' => array(
    				array(
    					'taxonomy' => 'ideacategory',
    					'field' => 'slug',
    					'terms' => array( '24-hour-market-watch' )
    				)
    			),
    			'show_stickies' => false
    			)
    		) );
    
    }
    
    add_action( 'bbp_register_views', 'idea_register_custom_views' );

    mrentropy
    Participant

    @mrentropy

    Hi all,

    Is there a way to create a view that is limited to a specific forum?

    In reply to: New topics

    mrentropy
    Participant

    @mrentropy

    Is there a way to structure this so new views can apply to individual forums, too?

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