Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '+.+default+.+'

Viewing 25 results - 1,476 through 1,500 (of 6,794 total)
  • Author
    Search Results
  • #180647
    wautersandreas
    Participant

    Hi, i had a big problem with bbpress in the sense that it crashed (fatal error) every time i tried to administrate it by clicking the “forums” tab.

    I found out that the below function was the problem, and in particular that i needed to change to:
    $post_stati = bbp_get_public_status_id();
    from
    $post_stati[] = bbp_get_public_status_id();

    for some reason the straight brackets broke everything, i don’t understand why, so i wanted to flag this for future updates. i’m a complete newb so yeah 😀

    error code:

    Fatal error: Uncaught Error: [] operator not supported for strings in /customers/f/9/9/simzone.net/httpd.www/HQ/wp-content/plugins/bbpress/includes/forums/functions.php:1800 Stack trace: #0 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query)) #1 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #2 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/plugin.php(515): WP_Hook->do_action(Array) #3 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp-query.php(1681): do_action_ref_array('pre_get_posts', Array) #4 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp-query.php(3238): WP_Query->get_posts() #5 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp.php(617): WP_Query->query(Array) #6 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/class-wp.php(735): WP->query_posts() #7 /customers/f/9/9/simzone.net/httpd.www/HQ/wp-includes/functions in /customers/f/9/9/simzone.net/httpd.www/HQ/wp-content/plugins/bbpress/includes/forums/functions.php on line 1800'
    
    adjusted function: 
    
    

    function bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) {

    // Bail if all forums are explicitly allowed
    if ( true === apply_filters( ‘bbp_include_all_forums’, false, $posts_query ) ) {
    return;
    }

    // Bail if $posts_query is not an object or of incorrect class
    if ( !is_object( $posts_query ) || !is_a( $posts_query, ‘WP_Query’ ) ) {
    return;
    }

    // Get query post types array .
    $post_types = (array) $posts_query->get( ‘post_type’ );

    // Forums
    if ( bbp_get_forum_post_type() === implode( ”, $post_types ) ) {

    // Prevent accidental wp-admin post_row override
    if ( is_admin() && isset( $_REQUEST[‘post_status’] ) ) {
    return;
    }

    /** Default ***********************************************************/

    // Get any existing post status
    $post_stati = $posts_query->get( ‘post_status’ );

    // Default to public status
    if ( empty( $post_stati ) ) {
    $post_stati = bbp_get_public_status_id();
    # $post_stati[] = bbp_get_public_status_id();

    // Split the status string
    } elseif ( is_string( $post_stati ) ) {
    $post_stati = explode( ‘,’, $post_stati );
    }

    /** Private ***********************************************************/

    // Remove bbp_get_private_status_id() if user is not capable
    if ( ! current_user_can( ‘read_private_forums’ ) ) {
    $key = array_search( bbp_get_private_status_id(), $post_stati );
    if ( !empty( $key ) ) {
    unset( $post_stati[$key] );
    }

    // …or add it if they are
    } else {
    $post_stati = bbp_get_private_status_id();
    #$post_stati[] = bbp_get_private_status_id();
    }

    /** Hidden ************************************************************/

    // Remove bbp_get_hidden_status_id() if user is not capable
    if ( ! current_user_can( ‘read_hidden_forums’ ) ) {
    $key = array_search( bbp_get_hidden_status_id(), $post_stati );
    if ( !empty( $key ) ) {
    unset( $post_stati[$key] );
    }

    // …or add it if they are
    } else {
    $post_stati = bbp_get_hidden_status_id();
    #$post_stati[] = bbp_get_hidden_status_id();
    }

    // Add the statuses
    $posts_query->set( ‘post_status’, array_unique( array_filter( $post_stati ) ) );
    }

    // Topics Or Replies
    if ( array_intersect( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ), $post_types ) ) {

    // Get forums to exclude
    $forum_ids = bbp_exclude_forum_ids( ‘meta_query’ );

    // Bail if no forums to exclude
    if ( ! array_filter( $forum_ids ) ) {
    return;
    }

    // Get any existing meta queries
    $meta_query = $posts_query->get( ‘meta_query’ );

    // Add our meta query to existing
    $meta_query[] = $forum_ids;

    // Set the meta_query var
    $posts_query->set( ‘meta_query’, $meta_query );
    }
    }

    /**
    * Returns the forum’s topic ids
    *
    * Only topics with published and closed statuses are returned
    *
    * @since bbPress (r2908)
    *
    * @param int $forum_id Forum id
    * @uses bbp_get_topic_post_type() To get the topic post type
    * @uses bbp_get_public_child_ids() To get the topic ids
    * @uses apply_filters() Calls ‘bbp_forum_query_topic_ids’ with the topic ids
    * and forum id
    */’

    Robin W
    Moderator

    Quick one on your NOTE: Yes that was a previous version of the plugin that no longer exists.

    user creation is a wordpress thing – bbpress is not involved. It only allocates the default role on first login.

    Would be worth you googling ‘wordpress register email not working’, but it can be a host thing, and is worth talking to your host provider about.

    #180601

    In reply to: Background Color

    scottwiggins17
    Participant

    that code changed all my background color for my blog and pages black when it used to be white. Now I cant see anything and deleting the code did not set it back to normal. What do I do to get my site back to the way it was?

    I use X theme and now it’s all messed up. It has black background with black font on ALL my blog posts.

    For now I changed my whole sites default background to white, the header white, and the header menu font to black so you can read it. It was the opposite, and I like the black header background better the way I had it. I don’t know what that code did, but it messed a lot of stuff up.

    #180584
    Robin W
    Moderator

    ok, something has changed, it could be a theme or plugin update

    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

    #180518
    Robin W
    Moderator

    ok, so something must have happened to make you lose them. Have you installed other plugins or changed themes?

    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

    #180517
    Robin W
    Moderator

    ok, having all results on one page might give you issues.

    bbpress will by default show the number of replies per page that is set in

    dashboard>settings>forums>Topics and Replies Per Page>Replies

    You could up that to say 100, so that you get a decent chuck. But this would change it for forums as well.

    However if you wanted that just for search, so not affecting forums, then you could set it as a filter in your functions file – if you know how to add code to your functions file, then come back and I’ll give you some code. Again I would recommend that you set a limit but it can be as high as you like.

    #180516
    Robin W
    Moderator

    The reply form has an element which says

    Notify me of follow-up replies via email

    By default this is unticked, so unless you tick it, you are unsubscribed from the topic.

    So remembering to tick it makes sure you stay subscribed.

    You can change this default to make it ticked by default by using

    Reply Subscribed

    or using my style pack plugin which has lots of other extras

    https://wordpress.org/plugins/bbp-style-pack/

    Robin W
    Moderator

    ok, so

    create a directory on your childtheme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your childtheme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-reply.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-reply.php
    bbPress will now use this template instead of the original
    and you can amend this

    so amend this file – copy it to your Pc and use norepad or similar

    around line 70 you will see

    <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>

    replace this with

    <?php
    	$user_id = wp_get_current_user()->ID;
    	$topic_id = bbp_get_topic_id() ;
    	$topic_author = bbp_get_topic_author_id( $topic_id ) ;
    	$is_topic_author = ($topic_author == $user_id ? true : false) ;
    	if ( bbp_allow_topic_tags() && current_user_can('assign_topic_tags' ) && ($is_topic_author || bbp_is_user_keymaster() ) : ?>

    This is untested, and if it doesn’t work – do come back !

    Robin W
    Moderator

    ok, I’ve just loaded your code to my test site, and I can set a user to member and it holds

    Suspect either theme or other plugins

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    kajzh
    Participant

    Hello,

    I am running bbPress v2.5.12 on WordPress 4.7 with a child theme I’ve developed based on Imaginem Themes’ Sentric Theme.

    The problem:
    In my child theme’s functions, I have added the following code to make two custom roles, Professional and Member, for my Q&A/”Ask the Expert”-style forum called “Ask a Professional.” Essentially, Members can make threads asking questions, but only screened Professionals have the ability to reply and provide answers.

    I want everyone to automatically be assigned the Member role upon registration. Then I can manually “upgrade” their roles to Professional once they’ve been successfully screened. However, when a user registers and logs in, they inherit Member capabilities, but are not assigned the Member role. Manually selecting the user and assigning them the Member role doesn’t work; their role immediately reverts back to “— No role for these forums —”
    screenshot

    When I select the user and manually assign the Participant role, the role “sticks” — meaning, it doesn’t revert back to “No Role.” However, the “Member” capabilities remain.

    screenshot

    Does anyone know why this problem persists and how to fix it? This is the final thing that needs to be ironed out before my site goes live. 🙂 Thank you!

    //code to add custom roles 
     
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called professional */
        $bbp_roles['bbp_professional'] = array(
            'name' => 'Professional',
            'capabilities' => custom_capabilities( 'bbp_professional' )
            );
     
        /* Add a role called member */
        $bbp_roles['bbp_member'] = array(
            'name' => 'Member',
            'capabilities' => custom_capabilities( 'bbp_member' )
            );
     
        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_professional' )
            $caps = custom_capabilities( $role );
     
        if( $role == 'bbp_member' )
            $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 'professional' role */
            case 'bbp_professional':
                return array(
                     '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'    => true,
     
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => false,
                    'delete_topics'         => true,
                    'delete_others_topics'  => true,
                    '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'     => true,
                    'edit_topic_tags'       => true,
                    'delete_topic_tags'     => true,
                    'assign_topic_tags'     => true,
                );
     
                /* Capabilities for 'member' role */
            case 'bbp_member':
                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'       => false,
                    'edit_replies'          => false,
                    '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'     => false,
                );
     
                break;
     
            default :
                return $role;
        }
    }

    Troubleshooting:

    1. I’ve tried to disable plugins and see if any of them are causing this issue. This hasn’t yielded any different results.
    2. I’ve checked with the Twenty Sixteen and Twenty Seventeen theme.
    #180392
    Robin W
    Moderator

    yet unbelievably there seems to be no-one who has a solution after all the years of BBpress being around.

    I suspect that this is because it is the symptom of many problems.

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    #180386

    In reply to: bbpress link error

    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    #180354
    oyegigi
    Participant

    In case someone wants to use the code who is using pretty links.

    
    // Generate BBporess Edit Profile Link in a shortcode
    // [bbp_edit_profile text="Edit My Profile" class"my-link-style"]
    
    function bbp_edit_profile_link($atts) {
    	extract(shortcode_atts(array(
    		'text' => "",  // default value if none supplied
    		'class' => "" //Style class for link
        ), $atts));
        
        if ($text) {
    		$current_user = wp_get_current_user (); 
    		$user=$current_user->user_login;
            return '<a class="'. $class . '" href="/forums/users/' . $user . '/edit">' . $text. '</a>';
            
        } 
    }
    add_shortcode('bbp_edit_profile', 'bbp_edit_profile_link');
    
    #180333
    Barry
    Participant

    To enable default REST API support for topics you could use a snippet like this one:

    add_action( 'bbp_register_post_types', function() {
    	register_post_type( bbp_get_topic_post_type(), [ 'show_in_rest' => true ] );
    }, 11 );

    This waits until bbPress has registered its post types, then modifies the properties of the topic post type so that it is exposed via the REST API. You could of course extend it to cover forum and reply posts, too. With that in place, you should find URLs like the following work as expected:

    http://bbpress.site/wp-json/wp/v2/topic

    #180298
    roquec
    Participant

    Dear Friends,

    I’m using WP 4.7 and bbPress 2.5.12. I’m using the importer under Tools->Forums->Import forums to import a MyBB Forum (version 1.6), with 4000 topics, 50.000 messages, and 3000 users.

    The performance is Ok, it takes two hours more or less. The problem, is that at certain point, the message Conversion complete is displayed, and certainly, the users / topics count is the right one. And then, without my interaction, it starts again.

    I’m not sure if this “second pass” is the normal procedure, or it is an error.

    Any help would be very appreciate.

    That’s the output of my last attempt

    Calculating forum hierarchy (0 - 999)Converting forums (0 - 999)Delete users WordPress default passwords (5000 - 5999)Delete users WordPress default passwords (4000 - 4999)Delete users WordPress default passwords (3000 - 3999)Delete users WordPress default passwords (2000 - 2999)Delete users WordPress default passwords (1000 - 1999)Delete users WordPress default passwords (0 - 999)Converting users (2000 - 2999)Converting users (1000 - 1999)Converting users (0 - 999)<strong>Conversion Complete</strong>No reply_to parents to convertConverting replies (3000 - 3999)Converting replies (2000 - 2999)Converting replies (1000 - 1999)Converting replies (0 - 999)No tags to convertNo super stickies to stickCalculating topic stickies (0 - 999)Converting topics (51000 - 51999)Converting topics (50000 - 50999)Converting topics (49000 - 49999)Converting topics (48000 - 48999)Converting topics (47000 - 47999)Converting topics (46000 - 46999)Converting topics (45000 - 45999)Converting topics (44000 - 44999)Converting topics (43000 - 43999)Converting topics (42000 - 42999)Converting topics (41000 - 41999)Converting topics (40000 - 40999)Converting topics (39000 - 39999)Converting topics (38000 - 38999)Converting topics (37000 - 37999)Converting topics (36000 - 36999)Converting topics (35000 - 35999)Converting topics (34000 - 34999)Converting topics (33000 - 33999)Converting topics (32000 - 32999)Converting topics (31000 - 31999)Converting topics (30000 - 30999)Converting topics (29000 - 29999)Converting topics (28000 - 28999)Converting topics (27000 - 27999)Converting topics (26000 - 26999)Converting topics (25000 - 25999)Converting topics (24000 - 24999)Converting topics (23000 - 23999)Converting topics (22000 - 22999)Converting topics (21000 - 21999)Converting topics (20000 - 20999)Converting topics (19000 - 19999)Converting topics (18000 - 18999)Converting topics (17000 - 17999)Converting topics (16000 - 16999)Converting topics (15000 - 15999)Converting topics (14000 - 14999)Converting topics (13000 - 13999)Converting topics (12000 - 12999)Converting topics (11000 - 11999)Converting topics (10000 - 10999)Converting topics (9000 - 9999)Converting topics (8000 - 8999)Converting topics (7000 - 7999)Converting topics (6000 - 6999)Converting topics (5000 - 5999)Converting topics (4000 - 4999)Converting topics (3000 - 3999)Converting topics (2000 - 2999)Converting topics (1000 - 1999)Converting topics (0 - 999)Calculating forum hierarchy (0 - 999)Converting forums (0 - 999)Delete users WordPress default passwords (2000 - 2999)Delete users WordPress default passwords (1000 - 1999)Delete users WordPress default passwords (0 - 999)Converting users (2000 - 2999)Converting users (1000 - 1999)Converting users (0 - 999)Starting Conversion

    maxc246
    Participant

    When I first set up my BBPress forum at libertydebater.com, I was the keymaster of the forum. I could see options to edit posts, trash them, move them and a number of other options.

    At some point (I’m not clear when) I lost the ability to do practically anything as the keymaster on my forum. When I try to reply to a post, I get an error that says “ERROR: You do not have permission to create new topics.”

    Also, where I used to see moderating options above each post, I no longer see those. I’ve spent the last 3 days searching for a fix and trying everything I’ve found. So far I’ve tried:

    – disabling all plug-ins, testing, then re-enabling them and testing. The problem persisted even when all plugins were disabled.

    – Running every tool under Tools > Forums.

    – Changing the Forum roll of that user to Participant and then back to Keymaster.

    – Changing my theme (currently Tortuga) to the default 2014 theme. It made no difference so I changed it back.

    – Restoring the database back to the oldest copy I had available.

    – I made a test user account. The test user can post and reply, even as Keymaster, but didn’t have the ability to Edit, Move, Trash posts.

    I have also seen suggestions of getting rid of the Yoast plug-in as a solution, but I don’t have that plug in.

    This was all working fine and then one day it wasn’t. I’m a total newb to Word Press, so please go easy on me. If you have any suggestions, some guidance on how to implement them would be most appreciated.

    Thanks!

    #180241

    In reply to: Can not open Forum

    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    #180199

    In reply to: Guest Posting Question

    Anonymous User
    Inactive

    Mike,

    I have just stumbled upon the thread from 3 years ago and it led me to finding yours here. Is this really not resolved?

    I recently got bbPress up and running and I also needed this. I went ahead and found the solution… here goes…

    It’s in the template. Seriously. Let’s take the previous answer (sorry for no reference) that souneone suggested to “tell the users to use anon@example.com”, and we’ll make it even easier for the user.

    Make sure to copy the default bbpress template “form-anonymous.php” to /wp-content/themes/your-theme/bbpress/

    Open up form-anonymous.php from your theme and find the following code section:

    <p>
    			<label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
    			<input type="text" id="bbp_anonymous_email"   value="<?php bbp_author_email(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_email" />
    		</p>

    Delete that. In fact, replace it with the following:

    <input type="hidden" id="bbp_anonymous_email" value="anon@yourdomain.com" tabindex="-1234" name="bbp_anonymous_email" />

    Save it out, close it out. You’re done!

    Now you don’t require names.. it forces the “anon@yourdomain.com” as the value.
    Developers can still change it 😉

    remember to change yourdomain.com to your actual domain in the values I gave above.

    if you have further questions or anything reach out on skype joshuasadler4550

    #180195
    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    #180149
    CMB70
    Participant

    I am having trouble importing from SimplePress to bbpress. I’m not sure what the table prefix is supposed to be. I tried wp_ and that didn’t import anything. I tried wp_sf (I think that is the beginning of tables for SimplePress but get this error

    Repair any missing information: Continue
    WordPress database error: [Specified key was too long; max key length is 1000 bytes]
    CREATE TABLE wpzu_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key(191), meta_value(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;

    Is there anything I can do to get this import done?

    Robin W
    Moderator

    bbpress has its own permissions – you need to configure the bbpress role

    if you go into

    dashboard>users>all users and edit a user you will find their forum role near the bottom. If you don’t want them to create topics and replies, then set it to spectator

    if you want the default to be spectator, then go to

    dashboard>settings>forum>auto role and set this to what you want

    #180119
    Laura N
    Participant

    I am working in local, but the problem with follow is when someone writes a new post, he can add spam in the content and I want bydefault mark the links as nofollow.

    thank you for your help.

    AITpro
    Participant

    WordPress 4.7
    bbPress 2.5.12
    Site: https://forum.ait-pro.com/
    Custom bbPress/BuddyPress Theme & tested switching to WP Twenty Seventeen Theme
    Tried creating a bug ticket on trac, but was not allowed to login and do so.

    Issue: In previous versions of bbPress this code below worked fine in my Theme functions.php file. As of bbPress 2.5.12 this code is no longer working in my Theme functions.php file. I checked output and bbPress Core code and did not see anything obvious. Output was good. ie $role and $caps, but it appeared that the filter was not being processed in time when the Activity template loaded. So I moved this code to the BuddyPress /plugins/bp-custom.php file and this code works fine. So obviously this some kind of init or loading order type of issue. ie the filter is being processed too late.

    // bbPress Disable Topic Tags for Participants
    function aitpro_get_caps_for_role_filter( $caps, $role ) {
    	
    	if ( $role == 'bbp_participant' )
    		$caps = aitpro_get_caps_for_role( $role );
    
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'aitpro_get_caps_for_role_filter', 10, 2 );
    
    function aitpro_get_caps_for_role( $role ) {
    	switch ( $role ) {
    		/* Disable Topic Tags for Participants */
    		case 'bbp_participant':
    			return array(
     
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => false, // Using false disables allowing Participants to create Topic Tags
    
    			);
    			break;
    		default :
    
    		return $role;
    	}
    }
    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    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

    Bruce
    Participant

    bbpress Version 2.5.12
    wordpress Version 4.6.1
    TwentyThirteen-Child theme

    You’ll see I don’t know what I’m doing here. What follows is what I tried.

    I put the following into my 2013 child theme:
    1. a folder titled “bbpress” which contained the following all copied from the bbpress plugin folder:
    2. a folder titled “bbpress”
    3. a folder titled “css”
    4. a folder titled “extras”
    5. a folder titled “js”
    6. a file titled “bbpress-functions.php

    I replaced the top of the bbpress.css file which was in the “css” folder with this:

     /*
    Theme Name: bbpress bbpress-child
    Theme URI: http://neighborsconnect/neighborsnation/wp-content/themes/twentythirteen-child/bbpress-child/
    Description: bbpress-child theme for bbpress
    Version: 1.0
    Author: Bruce Wilson
    Author URI: http://neighborsnation.org/
    Template: bbpress-default
    Tags: bbpress, bbpress-child
    */ 

    Then I increased the font-size for the bbpress forums from 12 px to 20px and other such changes to see if it worked.

    Surprise! Surprise! It didn’t work.

    What do I need to do to make it work?

    ~ Bruce

Viewing 25 results - 1,476 through 1,500 (of 6,794 total)
Skip to toolbar