Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 8,851 through 8,875 (of 14,232 total)
  • @robin-w

    Moderator

    no problem, glad you are fixed !!

    @robin-w

    Moderator

    so you want you to be able to create topics and replies, but your users to just read?

    @robin-w

    Moderator

    so who do you want to see the forum page – just you?, just registered users or who?

    @robin-w

    Moderator

    ahh!!

    7.1 has some issues with bbpress (or visa versa)

    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.13 in includes/forums/functions.php
    change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );
    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );
    and change line 1796 from
    $post_stati = $posts_query->get( 'post_status' );

    to

    $post_stati = $posts_query->get( ‘post_status’ ); 
    if (!is_array($post_stati)){
                                                 $post_stati = array($post_stati);
    }

    @robin-w

    Moderator

    ok, can I have a link to the working site?

    @robin-w

    Moderator

    ok, you have two choices

    either use the default wordpress lost password and register

    http://mysite.com/wp-login.php?action=lostpassword
    http://mysite.com/wp-login.php?action=register

    obviously changing the ‘mysite.com’ to your sites name

    or create pages within your site and use the bbpress shortcodes
    and then reference the page url

    eg create a page called ‘password’ and have it’s permalink as say ‘password’ and put
    [bbp-login] as the page content (you can precede this with any text you like, or have text after) eg

    Lost you password?- enter your email and we'll send a new one straight to you
    [bbp-login]

    Then in the widget you would put

    http://mysite.com/password/
    

    you can do the same with [bbp-register] to display the register screen.

    @robin-w

    Moderator

    can you check what versions of php each is using.

    If you can’t immediately tell from your host details, this plugin will add it to the dashboard

    Display PHP Version

    @robin-w

    Moderator

    ok, you’ll need to do some elimination

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    @robin-w

    Moderator

    @cocktail5555

    so you dev site is working finem, but the live site isn’t – correct?

    Is the dev site a local installation?

    @robin-w

    Moderator

    @daltmc

    Try

    dashboard>settings>permalinks

    and just click save
    this resets the permalinks, and sometimes gets sites going

    In reply to: Blank Pages

    @robin-w

    Moderator

    Also, when clicking on a forum from the forum index on the frontend, I get a blank page:
    http://hatchnutrition.com/forum/

    that works fine – do you still have a problem?

    @robin-w

    Moderator

    I am sure you know, there are plugins that do that for the WordPress comments, so that even commenters who do not have a WordPress account on that site can check a box to receive email alerts of new comments.

    wasn’t aware of that.

    I don’t know of any plugin that does this for bbpress.

    @robin-w

    Moderator

    presume you are fixed as it looks left aligned – if not please give us a link to a specific example and state which element

    @robin-w

    Moderator

    if a user is logged out, then wordpress does not know who they are, so I am struggling to understand how it would know which user to subscribe ??

    @robin-w

    Moderator

    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.13 in includes/forums/functions.php
    change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );

    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );

    and change line 1796 from
    $post_stati = $posts_query->get( 'post_status' );

    to

    $post_stati = $posts_query->get( ‘post_status’ ); 
    if (!is_array($post_stati)){
                                                 $post_stati = array($post_stati);
    }

    @robin-w

    Moderator

    great – glad you are fixed

    In reply to: Cant access forum

    @robin-w

    Moderator

    great – glad you are fixed !

    In reply to: Cant access forum

    @robin-w

    Moderator

    Suspect you are using php 7.1
    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.13 in includes/forums/functions.php
    change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );
    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );
    and change line 1796 from

    $post_stati = $posts_query->get( 'post_status' );
    

    to

    $post_stati = $posts_query->get( ‘post_status’ ); 
    if (!is_array($post_stati)){
        			$post_stati = array($post_stati);
    }
    

    @robin-w

    Moderator

    kicked it round some more, and got to this as a better answer

    add_filter( 'bbp_get_caps_for_role', 'rew_moderator', 10, 2);
    
    function rew_moderator ($caps, $role) {
    	if ($role == bbp_get_moderator_role() ) {
    		$caps['edit_others_forums'] = true ;
    		$caps['delete_forums'] = true ;
    		$caps['delete_others_forums'] = true ;
    	}
    return $caps ;
    }
    
    add_filter ('bbp_map_forum_meta_caps', 'rew_mod', 10,4) ;
    
    function rew_mod ( $caps, $cap, $user_id, $args) {
    	switch ( $cap ) {
    	
    	case 'bbp_forums_admin'  :
    		if ( user_can( $user_id, 'moderate' ) ) {
    				$caps = array( 'moderate' );
    		}
    		
    	case 'edit_forums'         :
    	case 'edit_others_forums'  :
    	
    		if ( user_can( $user_id, 'moderate' ) ) {
    				$caps = array( 'moderate' );
    		}
    	
    	}
    	
    return $caps ;
    }

    @robin-w

    Moderator

    ok, I’ve been kicking this around for the last 3 hours!!

    Capabilities are spread all over the files in bbpress, so it’s taken a while to get to something.

    But I’ve learnt some good stuff along the way !!

    This is close to a perfect solution, and seems workable

    add_filter ('bbp_register_forum_post_type', 'rew_change') ; 
    
    function rew_change () {
    	$rew = array(
    				'labels'              => bbp_get_forum_post_type_labels(),
    				'rewrite'             => bbp_get_forum_post_type_rewrite(),
    				'supports'            => bbp_get_forum_post_type_supports(),
    				'description'         => __( 'bbPress Forums', 'bbpress' ),
    				'capabilities'        => bbp_get_topic_caps(),
    				'capability_type'     => array( 'forum', 'forums' ),
    				'menu_position'       => 555555,
    				'has_archive'         => bbp_get_root_slug(),
    				'exclude_from_search' => true,
    				'show_in_nav_menus'   => true,
    				'public'              => true,
    				'show_ui'             => current_user_can( 'moderate' ),
    				'can_export'          => true,
    				'hierarchical'        => false,
    				'query_var'           => true,
    				'menu_icon'           => ''
    			) ;
    	return apply_filters( 'rew_change', $rew );
    }
    
    add_filter( 'bbp_get_caps_for_role', 'rew_moderator', 10, 2);
    
    function rew_moderator ($caps, $role) {
    	if ($role == bbp_get_moderator_role() ) {
    		$caps['edit_others_forums'] = true ;
    		$caps['delete_forums'] = true ;
    		$caps['delete_others_forums'] = true ;
    		$caps['publish_forums'] = true ;
    		$caps['read_private_forums'] = true ;
    		$caps['read_hidden_forums'] = true ;
    		$caps['edit_forums'] = true ;
    				
    	}
    
    return $caps ;
    	
    }

    The line

    'capabilities' => bbp_get_topic_caps(),

    should say

    'capabilities' => bbp_get_forum_caps(),

    and my 2nd filter should then make that work, but for whatever reason it doesn’t.

    But as it gives the topic permissions which for a moderator are what you want for forums, it should be fine.

    @robin-w

    Moderator

    try this in the additional css of the theme

    dashboard>appearance>customise>additional css

    .entry-header, .entry-content, .entry-summary, .entry-meta {
        max-width: 604px;
       }

    and amend max width to whatever you want

    @robin-w

    Moderator

    you need to get bbpress to use the correct theme template

    see

    Step by step guide to setting up a bbPress forum – Part 1

    item 8

    @robin-w

    Moderator

    bbp capabilities are allocated against bbpress roles, so suspect that it would be easier to add forums to the moderator role

    I think the capability you need to add is

    bbp_forums_admin

    so set to user to moderator and add the above capability to preferably the moderator role but could be the editor role

    @robin-w

    Moderator

    If you set them as moderators, then they don’t get forums in the dashboard

    In reply to: group forum slug

    @robin-w

    Moderator

    sorry that sounds buddypress to me, so I’ll back out

Viewing 25 replies - 8,851 through 8,875 (of 14,232 total)