Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 4,251 through 4,275 (of 14,243 total)
  • In reply to: More link on body

    @robin-w

    Moderator

    πŸ™‚

    @robin-w

    Moderator

    πŸ™‚

    @robin-w

    Moderator

    great – so you are fixed – yes ?

    @robin-w

    Moderator

    πŸ™‚

    In reply to: More link on body

    @robin-w

    Moderator

    2. I can’t publish topic or reply with the public link, ad example

    you should be able to – I cannot say why this is not possible for you

    In reply to: More link on body

    @robin-w

    Moderator

    1. It is possibile to enble partecipant to remove own topic/reply?

    bbp style pack

    once activated go to

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

    and look at items 18 & 19

    In reply to: More link on body

    @robin-w

    Moderator

    ok,

    dashboard>settings>discussion>comment moderation and set the number of links to the value you want

    @robin-w

    Moderator

    bbpress just uses wordpress in the background for login. When login fails wordpress seems to take over.

    I added some code in

    bbp style pack

    dashboard>settings>bbp style pack>login failure

    to try and overcome this

    @robin-w

    Moderator

    I’d not spotted that it did that, it should just display on the topic !

    I’ll release a new style pack with a correction.

    If you have used my code, then this is the change at line 2098, with the lines before and after

    if ( empty( $topic ))
    		return;
    		
    //if not a topic but a reply to that topic, then return
    if (bbp_get_reply_id() != bbp_get_topic_id( (int) $r['id'] ) ) return  ;
    	
    //if participant and not their own topic, then return
    In reply to: More link on body

    @robin-w

    Moderator

    do you you mean the numbers of links, or that participants can add any links?

    @robin-w

    Moderator

    great – glad you are fixed !!

    @robin-w

    Moderator

    ok so

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php

    transfer this to your pc and edit

    find

    <?php do_action( 'bbp_theme_before_forum_title' ); ?>
    
    		<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
    
    		<?php do_action( 'bbp_theme_after_forum_title' ); ?>

    and replace with

    <?php do_action( 'bbp_theme_before_forum_title' ); ?>
    		
    		<?php if  (!bbp_is_forum_category( bbp_get_forum_id())){ ?>
    
    		<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
    		
    		<?php } else { ?>
    		
    		<div class="bbp-forum-title"> <?php bbp_forum_title();?> </div>
    		<?php }
    		?>
    		
    		<?php do_action( 'bbp_theme_after_forum_title' ); ?>

    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/loop-single-forum.php

    bbPress will now use this template instead of the original

    you will probably need to add some styling to the class “bbp-forum-title”

    @robin-w

    Moderator

    ok, sorry too site specific a question to be able to answer.

    @robin-w

    Moderator

    ok, so one user one post.

    Not sure I can fix that without a set of repeatable steps.

    @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

Viewing 25 replies - 4,251 through 4,275 (of 14,243 total)