Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 4,201 through 4,225 (of 14,181 total)
  • @robin-w

    Moderator

    this option is in

    bbp style pack

    dashboard>settings>bbp style pack>Topic/Reply Display>item 17

    if you want to see the code it is in that plugin

    \bbp-style-pack\trunk\includes\functions.php

    starting at line 2066

    @robin-w

    Moderator

    please do not be sorry, I was truly thanking you for taking then time to post, and please continue to do so šŸ™‚

    @robin-w

    Moderator

    just tried a registration, process is as I remember it

    so page with [bbp-register]

    enter username and email, says check email, then I have to click the link in the email to go to the page to enter a password, then I have to login to complete.

    @robin-w

    Moderator

    I am not one of the devs, so unless you can say what they changed, it is hard to help

    @robin-w

    Moderator

    maybe in pending in dashboard>topics

    @robin-w

    Moderator

    ok

    @robin-w

    Moderator

    you could just untick the ‘automatically give’ in the forums settings and then add it yourself on login eg untested

    add_action('wp_login', 'rew_assign_role_on_login', 10, 2);
    
    rew_assign_role_on_login ($user_login, $user) {
    $user_id = $user->ID ;
    $role = bbp_get_user_role( $user_id );
    	if ( empty( $role ) ) {
    		bbp_set_user_role( $user_id, bbp_get_participant_role() );
    	}
    }

    @robin-w

    Moderator

    that’s great.

    You might want to take a look at bbp_new_topic_handler which I took this code from and gives you checks for all the parameters.

    which is in

    bbpress 2.6.6\includes\topics\functions.php line 96 onwards

    to see what checks bbpress does to the data before processing. This function is used by the new topic form.

    the content is hooked to 4 functions, 3 of which are removed for capable uses on line 140 etc.

    presuming that you are creating the content so will not be trying to break or do naugthy things, then you can probaby ignore these.

    bbpress does one more it calls the function bbp_code_trick from the filter on line 173

    which is this in bbpress 2.6.6\includes\common\formatting.php

    function bbp_code_trick( $content = '' ) {
    	$content = str_replace( array( "\r\n", "\r" ), "\n", $content );
    	$content = preg_replace_callback( "|(<code>)(.*?)</code>|",      'bbp_encode_callback', $content );
    	$content = preg_replace_callback( "!(^|\n)<code>(.*?)</code>!s", 'bbp_encode_callback', $content );
    
    	return $content;
    }

    If you’re trying things, then I’d suggest you create some draft items in bbpress and then see what content is in the database to see what you would need to save there.

    @robin-w

    Moderator

    quick question, – is this a new installation of this plugin, or update of an old one?

    @robin-w

    Moderator

    ok.

    Do the registration fields already exist?

    @robin-w

    Moderator

    you don’t say how technical you are, but if you can do basic coding, the guts of creating a topic is

    $topic_data = array(
    		'post_author'    => $topic_author,
    		'post_title'     => $topic_title,
    		'post_content'   => $topic_content,
    		'post_status'    => $topic_status,
    		'post_parent'    => $forum_id,
    		'post_type'      => bbp_get_topic_post_type(),
    		'tax_input'      => $terms,
    		'comment_status' => 'closed'
    	) ;
    
    	// Insert topic
    	$topic_id = wp_insert_post( $topic_data, true );
    //this updates counts subscriptions etc,
    do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );

    so you could wrap the above in a function and create a 2nd function that creates the above variables, and then loops round the 8 forum_id’s to create 8 topics

    @robin-w

    Moderator

    I think this is a change between 2.5 and 2.6.

    what issue is this causing you ?

    @robin-w

    Moderator

    @karado58 – thanks for your help – this is exactly what we need šŸ™‚

    There are very few helpers here, but this is community software.

    I am just a bbpress user who tries to help others as I was helped when I started, but I cannot get to every post.

    @robin-w

    Moderator

    may need some tinkering, but something like

    add_filter( 'bbp_get_topic_permalink', 'rew_add_forum_id', 10, 2) ;
    
    function rew_add_forum_id ($topic_permalink, $topic_id ) {
    	$forum = bbp_get_topic_forum_id( $topic_id) ;
    	if ($forum == '2925') {
    		//append ?id etc.
    		$topic_permalink.= '?id=2925' ;
    	}
    return $topic_permalink ;
    }

    @robin-w

    Moderator

    so profile works – yes, but only when you click the ‘edit’ link on profile do you get 404?

    @robin-w

    Moderator

    what wordpress and bbpress levels does a sample user who can do this have?

    In reply to: create a un function

    @robin-w

    Moderator

    Great – glad you are fixed !! šŸ™‚

    In reply to: create a un function

    @robin-w

    Moderator

    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

    add_filter( 'bbp_get_reply_content', 'rew_add_class' , 10 , 2) ;
    
    function rew_add_class ($content, $reply_id ) {
    	$content.='<div class="frenchlemans">I’m superman</div>' ;
    return $content;
    }
    In reply to: create a un function

    @robin-w

    Moderator

    ok, will I’m superman be the same everytime ?

    In reply to: create a un function

    @robin-w

    Moderator

    ok, let us try and get to what you want.

    so if the content of a reply was ‘hello how are you ?’

    then at the moment bbpress would show

    <div class="bbp-reply-content">
    hello how are you ?
    </div>

    what would you like it to show?

    In reply to: create a un function

    @robin-w

    Moderator

    the above was a question – what do you want it to look like? I was trying to help you, but you’ll find the function in

    includes/replies/templates it has a filter you can use.

    @robin-w

    Moderator

    that seems to be an error in your buddyboss theme which has amended the loop-single-reply template

    loop-single-reply.php in bbpress only has 55 lines.

    I would suggest you post this in the buddyboss support forums

    In reply to: Cant post

    @robin-w

    Moderator

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    In reply to: create a un function

    @robin-w

    Moderator

    so if you currently have

    <div class="bbp-reply-content">
    
    This is the content
    
    </div>

    what do you want it to look like ?

    @robin-w

    Moderator

    you can repeat the breadcrumb using

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Breadcrumbs

Viewing 25 replies - 4,201 through 4,225 (of 14,181 total)