Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 6,651 through 6,675 (of 14,242 total)
  • In reply to: ID for Register Button

    @robin-w

    Moderator

    it has a class of ‘bbp-register-link’ – is there an issue with using this ?

    @robin-w

    Moderator

    ok

    @robin-w

    Moderator

    I dug into this a bit further

    The moderation in bbpress is looking for ‘<href…’ so if you just post links ie

    you post this

    https://bbpress.org/forums/topic/posts-with-3-or-more-links/

    not this

    <a href="https://bbpress.org/forums/topic/posts-with-3-or-more-links/">some link</a>

    then no check is done – it is looking for links not urls

    There is some capability in the code via

    $reply_content = apply_filters( 'bbp_new_reply_pre_content', $reply_content );

    to take out more than 2 links, but there is not an easy way to put 3 urls into moderation

    @robin-w

    Moderator

    great – glad to have helped.

    @robin-w

    Moderator

    untested but try

    if ( current_user_can( 'subscriber' ) ) {
    add_action('wp_before_admin_bar_render', 'rew_admin_bar_remove_wp_profile', 0);
    add_action('admin_bar_menu', 'rew_add_bbp_profile', 999);
    }
     
     
    function rew_admin_bar_remove_wp_profile() {
            global $wp_admin_bar;
    
            /* **edit-profile is the ID** */
            $wp_admin_bar->remove_menu('edit-profile');
     }
     
    
    function rew_add_bbp_profile($wp_admin_bar) {
    	
    			$current_user = wp_get_current_user();
    			$user=$current_user->user_nicename  ;
    			$user_slug =  get_option( '_bbp_user_slug' ) ;
    			if (get_option( '_bbp_include_root' ) == true  ) {	
    				$forum_slug = get_option( '_bbp_root_slug' ) ;
    				$slug = $forum_slug.'/'.$user_slug.'/' ;
    			}
    			else {
    				$slug=$user_slug . '/' ;
    			}
    			
    			$profilelink = '/' .$slug. $user . '/edit' ;
    			
    			$wp_admin_bar->add_node( array(
    				'parent' => 'user-actions',
    				'id'		=> 'bbp-edit-profile',
    				'title' => 'Edit Profile',
    				'href' => $profilelink,
    			) );
    
    }

    @robin-w

    Moderator

    do you really mean WordPress role subscriber or bbpress role participant ?

    @robin-w

    Moderator

    great

    @robin-w

    Moderator

    could be done, but beyond free help – sorry

    @robin-w

    Moderator

    no idea 🙂

    @robin-w

    Moderator

    just set yourself up a test account

    so create a user called say ‘myusertest’ and give it a fictitious email account – it has to be in the correct format so say ‘abc@def.com’ and set a password

    you can then log on as that user and you’ll get participant access to see.

    @robin-w

    Moderator

    This code will change the WordPress profile to bbpress profile

    add_action('wp_before_admin_bar_render', 'rew_admin_bar_remove_wp_profile', 0);
    
    function rew_admin_bar_remove_wp_profile() {
            global $wp_admin_bar;
    
            /* **edit-profile is the ID** */
            $wp_admin_bar->remove_menu('edit-profile');
     }
    
    add_action('admin_bar_menu', 'rew_add_bbp_profile', 999);
    
    function rew_add_bbp_profile($wp_admin_bar) {
    	
    			$current_user = wp_get_current_user();
    			$user=$current_user->user_nicename  ;
    			$user_slug =  get_option( '_bbp_user_slug' ) ;
    			if (get_option( '_bbp_include_root' ) == true  ) {	
    				$forum_slug = get_option( '_bbp_root_slug' ) ;
    				$slug = $forum_slug.'/'.$user_slug.'/' ;
    			}
    			else {
    				$slug=$user_slug . '/' ;
    			}
    			
    			$profilelink = '/' .$slug. $user . '/edit' ;
    			
    			$wp_admin_bar->add_node( array(
    				'parent' => 'user-actions',
    				'id'		=> 'bbp-edit-profile',
    				'title' => 'Edit Profile',
    				'href' => $profilelink,
    			) );
    
    }

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

    Code Snippets

    @robin-w

    Moderator

    probably – suggest you test with users of different capability if you want to be sure

    @robin-w

    Moderator

    great – lots of ways to do it 🙂

    @robin-w

    Moderator

    great

    @robin-w

    Moderator

    yes – that’s all correct. default bbpress role assigned on first login

    @robin-w

    Moderator

    agree line 2, and line 4 should be

    $user_id = $user->ID ;

    @robin-w

    Moderator

    no, I recommend that generally you should disable toolbar for all but admins, plenty of plugins do that.

    @robin-w

    Moderator

    This code (untested) should subscribe all current users to forum ID 3

    $list = get_users();
    if (empty (get_option ('rew_done')) {
    	foreach ($list as $user) {
    		$user_id = $user=>ID ;
    		$forum_id = 3 ;
    		bbp_add_user_forum_subscription( $user_id, $forum_id ) ;
    	}
    	update_option ('rew_done' , 'done' ) ;
    }

    Put this in your child theme’s function file – or use
    https://en-gb.wordpress.org/plugins/code-snippets/ and load a page, then remove it

    @robin-w

    Moderator

    hmmm, that function only fires when all plugins are loaded, suggest you try activating it again

    @robin-w

    Moderator

    do you have bbpress activated ?

    @robin-w

    Moderator

    in style pack, I just list plugins I have found and used on client sites, and were working at the Time of testing. I can’t say if they still work, and sorry don’t have time to test regularly 🙂

    @robin-w

    Moderator

    just looked, yes that seems to only apply to new users

    @robin-w

    Moderator

    I’d suggest you talk to your host provider, but also

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, 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.

    Then come back

    @robin-w

    Moderator

    plugins are open source so written for free. Plugin authors can get overwhelmed by support requests, and this often leads them to abandon plugins – that doesn’t mean that they don’t work or need updating – most work perfectly well.

    @robin-w

    Moderator

    bbp style pack

    lets you add an ‘edit profile’ to the menu see

    dashboard>settings>bbp style pack>login

    and also has a shortcode that you can put into a text widget in the sidebar

    [bsp-profile’ label=’Edit Profile’ edit=’y’]

    see

    dashboard>settings>bbp style pack>shortcodes

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