Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 5,776 through 5,800 (of 14,283 total)
  • @robin-w

    Moderator

    this

    Function reference

    suggests

    pll_register_string($name, $string, $group, $multiline);
    ‘$name’ => (required) name provided for sorting convenience (ex: ‘myplugin’)
    ‘$string’ => (required) the string to translate
    ‘$group’ => (optional) the group in which the string is registered, defaults to ‘polylang’
    ‘$multiline’ => (optional) if set to true, the translation text field will be multiline, defaults to false

    so maybe

    pll_register_string( 'slug_users', '_bbp_user_slug', 'polylang' );

    @robin-w

    Moderator

    it’s a computer, they do that !

    @robin-w

    Moderator

    great – glad you are fixed

    @robin-w

    Moderator

    ok try

    dashboard>tools>forums>repair forums

    and start with

    Recalculate parent forum for each topic and reply

    but if that doesn’t work, run each one in turn

    @robin-w

    Moderator

    @selvaperux – can you raise a fresh topic, and explain further what you are after – thanks

    @robin-w

    Moderator

    admins don’t get subscription emails by default either

    @robin-w

    Moderator

    without knowing precisely how you want your forum to work, then no

    you create groups, uses belong to groups and forums belong to groups, so if

    forum a and forum b both allow group 1, then any user in group 1 can access both forums

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    but if you really want this box gone then,

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

    transfer this to your pc and edit to remove

    <?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
    
    						<p>
    							<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> />
    
    							<?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?>
    
    								<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    
    							<?php else : ?>
    
    								<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
    
    							<?php endif; ?>
    						</p>
    
    						<?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?>

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php

    bbPress will now use this template instead of the original

    then repeat for form-reply.php removing

    <?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?>
    
    						<p>
    
    							<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> />
    
    							<?php if ( bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() ) ) : ?>
    
    								<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    
    							<?php else : ?>
    
    								<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
    
    							<?php endif; ?>
    
    						</p>
    
    						<?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?>

    @robin-w

    Moderator

    this box is not ticked by default

    @robin-w

    Moderator

    add this to your theme’s custom css settings

    .bbp_topic_subscription {
    display : none !important ;
    }

    @robin-w

    Moderator

    can you a specific example of one that is wrong?

    @robin-w

    Moderator

    '_bbp_user_slug' => 'users', // User profile slug

    is definately the slug

    so is the context right – maybe ‘polylang’ which seesm to be the default?

    and possibly change it’s hook to ‘plugins_loaded’ to make sure bbpress and polylang have both loaded before firing

    but i’m guessing 🙂

    @robin-w

    Moderator

    depends on why you are getting them at the moment.

    You can turn off all subscriptions for the whole site in

    dashboard>settings>forums>Allow users to subscribe to forums and topics

    If you just mean for you as a user or admin, then just unsubscribe from forums and topics in your profile

    additionally you may have other bbpress plugins that are sending you emails.

    @robin-w

    Moderator

    It isn;t on my site, so a css thing with your theme.

    but glad it works, and thanks for testing !!

    @robin-w

    Moderator

    great – glad you are fixed

    @robin-w

    Moderator

    you can only merge topics in bbpress, so yes merge two topics

    @robin-w

    Moderator

    the variable mismatch fix now does both split and merge

    @robin-w

    Moderator

    thanks, contact me via

    Contact me

    @robin-w

    Moderator

    found a slot whilst waiting for a client to respond !

    @robin-w

    Moderator

    @randrcomputers sinvce my code only runs on new topics – would be worth running a test with it enabled and disabled, and see if it makes a difference – if it does then come back.

    @robin-w

    Moderator

    found and fixed.

    I’ve put the fix in my style pack plugin version 4.5.0

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>bug fixes

    or put this in your child theme’s function file – or use

    Code Snippets

    add_filter ('bbp_get_topic_merge_link', 'rew_get_topic_merge_link' , 10 , 3) ;
    add_filter ('bbp_is_topic_merge' , 'rew_is_topic_merge' ) ;
    
    function rew_get_topic_merge_link( $args = array() ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'merge_text'   => esc_html__( 'Merge', 'bbpress' ),
    		), 'get_topic_merge_link' );
    
    		// Get topic
    		$topic = bbp_get_topic( $r['id'] );
    
    		// Bail if no topic or current user cannot moderate
    		if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) {
    			return;
    		}
    
    		$uri    = add_query_arg( array( 'action' => 'bbp-merge-topic' ), bbp_get_topic_edit_url( $topic->ID ) );
    		$retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-merge-link">' . $r['merge_text'] . '</a>' . $r['link_after'];
    
    		// Filter & return
    		return apply_filters( 'rew_get_topic_merge_link', $retval, $r, $args );
    	}
    
    function rew_is_topic_merge() {
    
    	// Assume false
    	$retval = false;
    
    	// Check topic edit and GET params
    	if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'bbp-merge-topic' === $_GET['action'] ) ) {
    		return true;
    	}
    
    	// Filter & return
    	return (bool) apply_filters( 'rew_is_topic_merge', $retval );
    }

    @robin-w

    Moderator

    no problem in naming – there are thousands of plugins, and there is always the risk that 2 will use similar name and collide.

    I’ll take a look, but maybe a day or 2

    @robin-w

    Moderator

    that code only runs when a new topic is posted, and should not be resource heavy.

    Is it in your functions file or code snippets or elsewhere?

    @robin-w

    Moderator

    so in

    dashboard>setting>forums I presume you have

    Allow users to mark topics as favourites

    set ?

Viewing 25 replies - 5,776 through 5,800 (of 14,283 total)