Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 8,201 through 8,225 (of 13,566 total)
  • In reply to: Cant access forum

    Robin W
    Moderator

    @robin-w

    great – glad you are fixed !

    In reply to: Cant access forum

    Robin W
    Moderator

    @robin-w

    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

    @robin-w

    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

    @robin-w

    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

    @robin-w

    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

    @robin-w

    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

    @robin-w

    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

    @robin-w

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

    In reply to: group forum slug

    Robin W
    Moderator

    @robin-w

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


    Robin W
    Moderator

    @robin-w

    @mrapino

    I wish a plugin developer would chime in here, but that doesn’t seem likely.

    I’m not sure how often they visit, but looks like you done some great stuff here.

    I’ve made a note of this thread and I’ll post a trac ticket (bug report) shortly

    Can you just confirm what version of bbpress you are using, and if not bbPress 2.6 Release Candidate 3, can you just check that the code is not improved in this – you’ll do this much faster than me.

    In reply to: group forum slug

    Robin W
    Moderator

    @robin-w

    @triixx – not sure what you are asking. The solution is listed in my response

    Dashboard>settings>forums>etc.


    Robin W
    Moderator

    @robin-w

    no problem, thanks for updating us

    In reply to: group forum slug

    Robin W
    Moderator

    @robin-w

    silly question, but why not just change it in

    Dashboard>settings>forums>etc.

    and you are using a buddypress hook, not a bbpress one – bbpress is bbp_init and all your code refers to buddypress.


    Robin W
    Moderator

    @robin-w

    no problem !!


    Robin W
    Moderator

    @robin-w

    it’s do-able but would require some code

    in essence you need to hook to an action

    ‘bbp_template_after_topics_loop’

    install bbp-style-pack

    and then code to [bsp-display-topic-index show=’5′ forum =’10’] with a list of forum ID’s for each category.

    I’m out of time to attempt this before my holidays, but above to remind me if you want to bump this topic in a few weeks time, I’ll see if I can fund some time to code


    Robin W
    Moderator

    @robin-w

    It’s all tied up with the theme’s page code

    This all gets very code oriented, hence suggestion to go to theme provider

    however if you’re a bit into code try

    Getting Started in Modifying the Main bbPress Template

    In reply to: Avatar freshness

    Robin W
    Moderator

    @robin-w

    ok, so ‘are you certain that you have tested with a vanilla theme and no other plugins?’ means without wplms.

    I remain fairly sure that the issue is wplms


    Robin W
    Moderator

    @robin-w

    hmm…. your theme is using lots of clever functions within the theme to do the page layout, which means I can’t say what you need to alter.

    I’d suggest you contact your theme provider for help.

    In reply to: Avatar freshness

    Robin W
    Moderator

    @robin-w

    Can you tell me where this setting is? I do not know of one in the base set-up, which makes me suspect you have something else, which may well also be causing the avatar not to display.

    If you could answer in terms of go to dashboard>settings etc. that would be helpful.

    In reply to: Can not open Forum

    Robin W
    Moderator

    @robin-w

    sorry – don’t know what to suggest next.

    Maybe contact you host provider


    Robin W
    Moderator

    @robin-w

    ok, you’ll need to be using the right template – see

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

    item 8

    In reply to: Multiple Forum Indexes

    Robin W
    Moderator

    @robin-w

    sorry – I’m not the right person to ask – I just support and leave the dev to others. Can’t comment on performance.

    Sounds unhelpful – but not meant to be 🙂

    In reply to: How to add a sidebar

    Robin W
    Moderator

    @robin-w

    looks like you’ve succeeded – do you still need help?


    Robin W
    Moderator

    @robin-w

    looks like you’ve succeeded – do you still need help?

    In reply to: Crash Victim

    Robin W
    Moderator

    @robin-w

    you will need to define what ‘all things have failed.’ means

    Is you site at all accessible?

Viewing 25 replies - 8,201 through 8,225 (of 13,566 total)