Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 7,601 through 7,625 (of 14,261 total)
  • @robin-w

    Moderator

    there is no function bb_get_topic_tags()

    but there is

    bbp_get_topic_tag_names

    is that what you want ?

    @robin-w

    Moderator

    can you show me all the settings for roots in dashboard>settings>forums

    @robin-w

    Moderator

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>freshness display and set it there

    @robin-w

    Moderator

    dashboard>settings>forums and set the root to what you want

    @robin-w

    Moderator

    that seems to be the only time that message is shown

    @robin-w

    Moderator

    this should do it – make sure anonymous is turned on to allow creation, then this stops topics being created – ie the topic form being shown

    add_filter ( 'bbp_current_user_can_publish_topics', 'rew_prevent_anonymous' );
    
    function rew_prevent_anonymous ($retval) {
    	// prevent topic creation if user is not logged in
    	if ( !is_user_logged_in()) {
    		$retval = false;
    	}
    
    return $retval;
    
    }

    if you don’t know how to add to the functions file, use this plugin and put the code in there

    Code Snippets

    @robin-w

    Moderator

    do you know how to add a function to a function file if I gave you the code ?

    @robin-w

    Moderator

    @robin-w

    Moderator

    this message appears if users post topics ir replies with words that are in the wordpress blacklist

    the list is in dashboard>settings>discussion

    this list will catch fragments so ‘class’ will be blacklisted if you have ‘ass’ in the blacklist

    In reply to: Spam Forum Topics

    @robin-w

    Moderator

    @illuminstr

    If you do not have caching software that might be not accepting the change to the settings, then

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

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

    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.

    Then come back

    @robin-w

    Moderator

    ok, I think you’ll need to raise this with your hosting company.

    @robin-w

    Moderator

    so only be able to reply, not create a topic?

    @robin-w

    Moderator

    you’ll need to do some fault finding

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

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

    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.

    Then come back

    In reply to: Spam Forum Topics

    @robin-w

    Moderator

    are these posts topics or replies or both ?

    @robin-w

    Moderator

    from memory, if you make two categories, and place each of the forums into one of these two as sub forums, so you end up with two categories as ‘indexes’ and their relative forums under them

    then use

    [bbp-single-forum id=$forum_id] with the category being the forum_id

    you will get two forum lists.

    Come back if that doesn’t work

    @robin-w

    Moderator

    ok, can’t help you further, suggest you post on

    https://wordpress.slack.com/messages/bbpress/

    and see if one of the devs can help

    @robin-w

    Moderator

    yes that ‘*’ says that anything that starts with should not be cached

    eg

    /forums*

    will not cache

    /forums/my-forum

    and

    /topics*

    will not cache

    /topics/how-is-the-weather-today

    @robin-w

    Moderator

    wow, that’s one to remember !! thanks for posting back 🙂

    @robin-w

    Moderator

    bbpress does not set any pending.

    I don’t know if buddypress does, or if you are using another plugin to do pending?

    @robin-w

    Moderator

    go to

    bbPress

    and select Advanced view on the right hand side

    and at the bottom of the page you will find ‘previous versions’

    you can select and download from there

    @robin-w

    Moderator

    thanks for posting your solution

    @robin-w

    Moderator

    most themes and plugins do not lose settings if you just deactivate, but as theme and plugin authors can write any code they like, I cannot guarantee that !

    @robin-w

    Moderator

    I’m not sure exactly what help you are looking for here. do you need to know what form, or how within a form you do that or what help do you want?

    @robin-w

    Moderator

    post it in the text editor not visual and it should work

    @robin-w

    Moderator

    ok, I presume you meant this code

    //code to add tutor role 
     
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called tutor */
        $bbp_roles['bbp_tutor'] = array(
            'name' => 'Tutor',
            'capabilities' => custom_capabilities( 'bbp_tutor' )
            );
     
        return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
     
    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_tutor' )
            $caps = custom_capabilities( $role );
     
        return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
     
    function custom_capabilities( $role )
    {
        switch ( $role )
        {
     
            /* Capabilities for 'tutor' role */
            case 'bbp_tutor':
                return array(
                    // Primary caps
                    'spectate'              => true,
                    'participate'           => true,
                    'moderate'              => false,
                    'throttle'              => false,
                    'view_trash'            => false,
     
                    // Forum caps
                    'publish_forums'        => false,
                    'edit_forums'           => false,
                    'edit_others_forums'    => false,
                    'delete_forums'         => false,
                    'delete_others_forums'  => false,
                    'read_private_forums'   => true,
                    'read_hidden_forums'    => false,
     
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => false,
                    'delete_topics'         => false,
                    'delete_others_topics'  => false,
                    'read_private_topics'   => true,
     
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => false,
                    'delete_replies'        => false,
                    'delete_others_replies' => false,
                    'read_private_replies'  => true,
     
                    // Topic tag caps
                    'manage_topic_tags'     => false,
                    'edit_topic_tags'       => false,
                    'delete_topic_tags'     => false,
                    'assign_topic_tags'     => true,
                );
     
                break;
     
            default :
                return $role;
        }
    }

    so with that code loaded to my site, if I go to

    dashboard>users>all users and edit a user, I can change them to the tutor role, and back again and it saves.

    Can you confirm you are using the above code, and that it does not save if you perform the above ?

Viewing 25 replies - 7,601 through 7,625 (of 14,261 total)