Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 651 through 675 (of 14,243 total)
  • @robin-w

    Moderator

    untested, but possibly

    function add_signature_to_post($topic_id=0) {
    $content = get_post_field( 'post_content', $topic_id );
    $signature = '';
    
    if (isset($_POST) && $_POST['bbp_signature']!='')
    $signature = $_POST['bbp_signature'];
    
    $content = $content . $signature;
    
    $topic_data = array(
    		'ID'           => $topic_id,
    		'post_content'   => $content
    		);
    
    	// update topic
    	$topic_id = wp_update_post( $topic_data);
    }
    
    add_action('bbp_new_topic', 'add_signature_to_post', 10, 1);
    add_action('bbp_new_reply', 'add_signature_to_post', 10, 1);
    In reply to: Subscribe to Forum

    @robin-w

    Moderator

    ah great – thanks for the update 🙂

    @robin-w

    Moderator

    so are you saying that loop-topics is not working, but loop-single-topic and content-single forum are working?

    @robin-w

    Moderator

    Still comes across as very shouty and opinionated eg ‘it’s just mind blowing’ and ‘with this blatantly obvious chronic issue’, but let me try and answer you.

    I am just a moderator here, and not a bbpress author. I don’t get paid anything to do this, and I’m just a guy sat in his kitchen trying to help others.

    So a bit of background

    bbpress was written by the founder of WordPress Matt Mullenweg as a standalone product way before mobiles/cell phones did anything more than phone and text.

    It was added as a plugin to WordPress by John James Jacoby, who has done updates to it every so often as paid work by the WordPress foundation.

    It is up to the owners of plugins as to how much work they do on their products.

    The authors tend to release updates every few years, rather than more frequently.

    My personal view is that you should consider bbpress to be a ‘mature’ product, ie any releases will be to fix issues rather than add functionality.

    bbPress is used by WordPress on their support forums, and if you look at these, you will see that they show these columns in mobile, so that is clearly how WordPress wants it to work.

    That you might decide that this is not how they should show is your opinion, and with over 100,000 installations of bbpress I have not noticed over the 10 years I have been doing support here ‘a lot’ of requests. I’m sure there have been some.

    The bbpress concept is ‘We’re keeping things as small and light as possible while still allowing for great add-on features through WordPress’s extensive plugin system.’ This does have an implicit expectation that others will either have the code and css capabilities to change bbpress to suit themselves, or hope that others have done so through plugins.

    You seem to have found some answers, and say you have found one that does this with css, and I suspect I might have answered some doing exactly this.

    I do not plan to start from scratch, so maybe if you can give me a link to ‘there’s some people that use CSS but I haven’t seen where it actually works’, then I’ll see if I can help further.

    In reply to: Subscribe to Forum

    @robin-w

    Moderator

    @newtech1 – did you find the issue?

    In reply to: hide a specific forum

    @robin-w

    Moderator

    great – glad you are fixed

    In reply to: hide a specific forum

    @robin-w

    Moderator
    add_filter('bbp_before_has_forums_parse_args', 'rew_hide_forums');
    
    function rew_hide_forums($args='') {
     $args['post__not_in'] = array('31867');
    return $args ;
    }

    where 31867 is the ID of the forum you want to hide, you can do multiple using array('31867', '45655') etc.

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    In reply to: Subscribe to Forum

    @robin-w

    Moderator

    ok, so you need to work out what is causing this by disabling your code and plugins til you work out what combination is the issue

    @robin-w

    Moderator

    that error may be from GD bbPress Toolbox Pro by the look of it, suggest you raise with them

    @robin-w

    Moderator

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Profile

    and set it up for your choice

    In reply to: Bulk-move topics?

    @robin-w

    Moderator

    great – glad to have helped – it was an interesting challenge !

    In reply to: Bulk-move topics?

    @robin-w

    Moderator

    ok, so I’ve added this ability into my style pack plugin

    bbp style pack

    it is automatically there once you have activated the plugin, so just see SO TO BULK MOVE… below

    OTHERWISE IF YOU PREFER TO USE CODE then

    add_action( 'bulk_edit_custom_box',  'rew_quick_edit_fields', 10, 2 );
    
    function rew_quick_edit_fields( $column_name, $post_type ) {
    	switch( $column_name ) {
    		case 'bsp_topic_forum': {
    			echo rew_bulk_edit_forums () ;
    			break;
    		}
    		case 'bbp_topic_forum': {
    			echo rew_bulk_edit_forums () ;
    			break;
    		}
    	}
    }
    
    function rew_bulk_edit_forums () {
    	// Start an output buffer
    		ob_start();
    		
    	?>
    				<fieldset class="inline-edit-col-left">
    					<div class="inline-edit-col">
    						<p>
    							<label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></label><br />
    							<?php
                                                                    $no_forum_str = 
                                                                            /* translators: &mdash; is encoded long dash (-) */
                                                                            esc_html__( '&mdash; No forum &mdash;', 'bbpress' );
    								bbp_dropdown( array(
    									'show_none' => $no_forum_str,
    									'selected'  => bbp_get_form_topic_forum()
    								) );
    							?>
    						</p>
    					</div>
    				<?php
    			// Output the current buffer
    		$output =  ob_get_clean();
    	return $output ;
    }
    
    add_action( 'save_post', 'rew_bulk_edit_save' );
    
    function rew_bulk_edit_save( $post_id ){
    
    	// check bulk edit nonce
    	if ( ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'bulk-posts' ) ) {
    		return;
    	}
    
    	// update the forum
    	$forum_id = ! empty( $_REQUEST[ 'bbp_forum_id' ] ) ? absint( $_REQUEST[ 'bbp_forum_id' ] ) : 0;
    	remove_action( 'save_post', 'rew_bulk_edit_save' );
    
            // update the post, which calls save_post again.
            wp_update_post( array( 'ID' => $post_id, 'post_parent' => $forum_id ) );
    
            // re-hook this function.
            add_action( 'save_post', 'rew_bulk_edit_save' );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    SO TO BULK MOVE…

    go to dashboard>topics and use the tick boxes to the left of each topic to select the ones you want
    then above the topics use the ‘bulk actions’ to select ‘edit’
    and click ‘apply’ to the right of that

    You will the see a dropdown box labelled ‘forum’ which lets you set which forum to change those topics to,
    and click ‘update’

    @robin-w

    Moderator

    suspected that lacder was a spammer – just confirmed

    @robin-w

    Moderator

    this is the bbpress forum, you want support from either buddypress or buddyboss

    https://buddypress.org/support/

    https://support.buddyboss.com/support/home

    @robin-w

    Moderator

    this is the bbpress forum, you want support from either buddypress or buddyboss

    https://buddypress.org/support/

    https://support.buddyboss.com/support/home

    @robin-w

    Moderator

    bbpress users can create posts with tags as per this site.

    I’m not sure I understand your question?

    @robin-w

    Moderator

    just had a quick look, and for instance this function is used when moving a topic form one forum to another. The function makes sure that all replies (child ids of tne topic) are updated with the new forum_id in the reply postmeta, so that if restored later on, they remain correct.

    @robin-w

    Moderator

    I’m just a guy sat in his kitchen trying to help others, I am not paid to do this.

    It is entirely relevant in that they may well be a reason why trashed posts are added, without knowing when and why the function is called and how it is used, it is impossible to say that the code is wrong.

    I agree that a filter before that or variable passed would be helpful, but bbpress is not being actively worked on at the moment so it is unlikely that this would get updated.

    If you want to flag this, raise a ticket on https://bbpress.trac.wordpress.org/

    You might want to use bbp_get_public_child_ids or use the filter at the end of the function to as you say ‘override’ the setting, or if you are using this function directly, then simply create your own version of it.

    @robin-w

    Moderator

    so can you say in what context this function is called?

    In reply to: Bulk-move topics?

    @robin-w

    Moderator

    thanks, give me a day or 2 and I’ll see if that is easy to do

    @robin-w

    Moderator

    Not a plugin I have tried, the only reference I can find to it is on github?

    It is elsewhere? if so you need to reach out to their support.

    In reply to: Bulk-move topics?

    @robin-w

    Moderator

    so move bulk topics from one forum to another – yes?

    In reply to: Restrict post creation

    @robin-w

    Moderator

    I have not tested it with that plugin, so cannot say

    In reply to: Subscribe to Forum

    @robin-w

    Moderator

    great – glad you are fixed

    In reply to: Subscribe to Forum

    @robin-w

    Moderator

    ok the code above will not help, and should be removed.

    I’d guess that because the subscription messages are being sent from ‘noreply@’ you website, your email system is rejecting this as an invalid address.

    Try installing

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Subscription Emails

    and change the address in item 1 to the email address that you are getting valid site emails from, and see if that solves.

Viewing 25 replies - 651 through 675 (of 14,243 total)