Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,576 through 1,600 (of 32,481 total)
  • Author
    Search Results
  • #222236

    In reply to: Customize Groups URL

    r-a-y
    Participant

    For the ‘forum’ and ‘topic’ slug in a BuddyPress groups URL, see: https://buddypress.trac.wordpress.org/ticket/3745#comment:13

    You cannot remove it, but you can potentially rename it via code.

    #222231

    In reply to: Customize Groups URL

    r-a-y
    Participant

    When you set up BuddyPress, you had to set up a WordPress page that is associated to Groups.

    Go to the admin dashboard and visit “Pages”. Next, find the Groups page and edit the slug for the page to dev and that will fix the issue for you.

    #222188

    Topic: Add emoticons

    in forum Troubleshooting
    Ricsca2
    Participant

    I migrated a forum from vbulletin but now the customized smileys do not appear but I only see their code such as the writing: cgrd: or: by2:, how can I connect their codes to the smileys that I upload in ftp?

    Thank

    #222187
    o2disegno
    Participant

    The footer of the page was broken when I enter any page of the forum but the rest of the page works perfectly, only when I enter the pages of the forum it broke. I use wpbakery to build the page.

    The only page of the forum that works well is the one that I created by placing the shortcode: https://dermomen.com/foros-dermomen/ the rest of the pages break the footer and show it in text.

    Image of the problem:
    Captura-de-pantalla-2021-07-25-213806

    Preguntas de los novatos

    I hope you can help me. Thanks.

    #222152
    lolataylor1
    Participant

    WordPress 5.8
    bbPress 2.6.6
    BuddyPress 9.0.0
    Astra Theme 3.6.5

    Help! I have read every forum post about creating new custom roles in bbPress, but it still isn’t working for me. The created role names are displaying on my Users page in my Admin dashboard, but the roles themselves are not working as intended. When I assign a user a forum role, it is adding it under the “Roles” [i.e., Subscriber (WP Role), Founder (bbPress Role)] and not “Forum Roles.” I tested the different user role settings and they, too, are not working.

    Am I missing something or doing something wrong? I’m new to bbPress and very frustrated after spending hours trying to get this to work.

    This is the code I have create and placed in my Code Snippet plugin. The forum is being added to a paid members only website, so the URL would not be useful.


    function authorready_add_new_roles( $bbp_roles ) {
    $bbp_roles['bbp_probation'] = array(
    'name' => 'Probation',
    'capabilities' => custom_capabilities( 'bbp_probation' )
    );

    $bbp_roles['bbp_subscriber'] = array(
    'name' => 'Subscriber',
    'capabilities' => custom_capabilities( 'bbp_subscriber' )
    );

    $bbp_roles['bbp_founder'] = array(
    'name' => 'Founder',
    'capabilities' => custom_capabilities( 'bbp_founder' )
    );

    $bbp_roles['bbp_leader'] = array(
    'name' => 'Group Leader',
    'capabilities' => custom_capabilities( 'bbp_leader' )
    );

    $bbp_roles['bbp_moderator'] = array(
    'name' => 'Moderator',
    'capabilities' => custom_capabilities( 'bbp_moderator' )
    );

    $bbp_roles['bbp_administrator'] = array(
    'name' => 'Administrator',
    'capabilities' => custom_capabilities( 'bbp_administrator' )
    );

    return $bbp_roles;
    }

    add_filter( 'bbp_get_dynamic_roles', 'authorready_add_new_roles', 1 );

    function authorready_add_role_caps_filter( $caps, $role )
    {
    /* Only filter for roles we are interested in! */
    if( $role == 'bbp_probation' )
    $caps = custom_capabilities( $role );

    if( $role == 'bbp_subscriber' )
    $caps = custom_capabilities( $role );

    if( $role == 'bbp_founder' )
    $caps = custom_capabilities( $role );

    if( $role == 'bbp_leader' )
    $caps = custom_capabilities( $role );

    if( $role == 'bbp_moderator' )
    $caps = custom_capabilities( $role );

    if( $role == 'bbp_administrator' )
    $caps = custom_capabilities( $role );

    return $caps;
    }

    add_filter( 'bbp_get_caps_for_role', 'authorready_add_role_caps_filter', 10, 2 );

    function custom_capabilities( $role )
    {
    switch ( $role )
    {

    /* Capabilities for 'probation' role */
    case 'bbp_probation':
    return array(
    // Primary caps
    'spectate' => true,
    'participate' => false,
    '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' => false,
    'read_hidden_forums' => false,

    // Topic caps
    'publish_topics' => false,
    'edit_topics' => false,
    'edit_others_topics' => false,
    'delete_topics' => false,
    'delete_others_topics' => false,
    'read_private_topics' => false,

    // Reply caps
    'publish_replies' => false,
    'edit_replies' => false,
    'edit_others_replies' => false,
    'delete_replies' => false,
    'delete_others_replies' => false,
    'read_private_replies' => false,

    // Topic tag caps
    'manage_topic_tags' => false,
    'edit_topic_tags' => false,
    'delete_topic_tags' => false,
    'assign_topic_tags' => false,
    );

    /* Capabilities for 'subscriber' role */
    case 'bbp_subscriber':
    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' => false,
    'edit_topics' => false,
    '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' => true,
    '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,
    );

    /* Capabilities for 'founder' role */
    case 'bbp_founder':
    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' => false,
    'edit_topics' => false,
    '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' => true,
    '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,
    );

    /* Capabilities for 'group leader' role */
    case 'bbp_leader':
    return array(
    // Primary caps
    'spectate' => true,
    'participate' => true,
    'moderate' => true,
    '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' => false,
    'edit_topics' => false,
    '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' => true,
    'delete_replies' => true,
    'delete_others_replies' => true,
    'read_private_replies' => true,

    // Topic tag caps
    'manage_topic_tags' => false,
    'edit_topic_tags' => false,
    'delete_topic_tags' => false,
    'assign_topic_tags' => true,
    );

    /* Capabilities for 'moderator' role */
    case 'bbp_moderator':
    return array(
    // Primary caps
    'spectate' => true,
    'participate' => true,
    'moderate' => true,
    'throttle' => true,
    'view_trash' => true,

    // 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' => true,
    'delete_others_replies' => true,
    'read_private_replies' => true,

    // Topic tag caps
    'manage_topic_tags' => false,
    'edit_topic_tags' => true,
    'delete_topic_tags' => true,
    'assign_topic_tags' => true,
    );

    /* Capabilities for 'administrator' role */
    case 'bbp_administrator':
    return array(
    // Primary caps
    'spectate' => true,
    'participate' => true,
    'moderate' => true,
    'throttle' => true,
    'view_trash' => true,

    // Forum caps
    'keep_gate' => true,
    'publish_forums' => true,
    'edit_forums' => true,
    'edit_others_forums' => true,
    'delete_forums' => true,
    'delete_others_forums' => true,
    'read_private_forums' => true,
    'read_hidden_forums' => true,

    // Topic caps
    'publish_topics' => true,
    'edit_topics' => true,
    'edit_others_topics' => true,
    'delete_topics' => true,
    'delete_others_topics' => true,
    'read_private_topics' => true,

    // Reply caps
    'publish_replies' => true,
    'edit_replies' => true,
    'edit_others_replies' => true,
    'delete_replies' => true,
    'delete_others_replies' => true,
    'read_private_replies' => true,

    // Topic tag caps
    'manage_topic_tags' => true,
    'edit_topic_tags' => true,
    'delete_topic_tags' => true,
    'assign_topic_tags' => true,
    );

    break;

    default :
    return $role;
    }
    }

    #222151

    In reply to: Help with Forum Roles

    mairag
    Participant

    Thank you Robin.

    I did the change but didn’t solve the issue, let’s see if OP had more luck.

    This is my updated code for the new role Crochetera.

    // bbPress custom role
    
    add_action ('wp_loaded' , 'load_new_roles') ;
    function load_new_roles () {
    	add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
    	add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
    }
     
    function add_new_roles( $bbp_roles ){
        /* Add a role called crochetera */
        $bbp_roles['bbp_crochetera'] = array(
            'name' => 'Crochetera',
            'capabilities' => custom_capabilities( 'bbp_crochetera' )
            );
     
        return $bbp_roles;
    }
     
    function add_role_caps_filter( $caps, $role ) {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_crochetera' )
            $caps = custom_capabilities( $role );
     
        return $caps;
    }
     
    function custom_capabilities( $role ){
        switch ( $role ) {
     
            /* Capabilities for 'crochetera' role */
            case 'bbp_crochetera':
                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'   => false,
                    'read_hidden_forums'    => false,
     
                    // Topic caps
                    'publish_topics'        => false,
                    'edit_topics'           => false,
                    'edit_others_topics'    => false,
                    'delete_topics'         => false,
                    'delete_others_topics'  => false,
                    'read_private_topics'   => false,
     
                    // 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'     => false,
                );
     
                break;
     
            default :
                return $role;
        }
    }
    myblackf150
    Participant

    Hello,

    I copied the code forms-topic to create a very simple form for use in only one forum.
    How I may please pre-select the forum from the drop-down that selects which forum to post by default? I’d assume it would require the forum ID but I do not know how to make it select to that forum by default.

    Thank you for any assistance.

    #222145

    In reply to: Help with Forum Roles

    Robin W
    Moderator

    If that is not clear, post your code and I’ll give back the correct version.

    #222144

    In reply to: Help with Forum Roles

    Robin W
    Moderator

    ok, thanks.

    It is a load order issue, so we need to add the filters once everything is loaded.

    So for @techinbermudas example we would have

    add_action ('wp_loaded' , 'load_new_roles') ;
    
    function load_new_roles () {
    	add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
    	add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
    }
    
    function add_new_roles( $bbp_roles )
    {
        $bbp_roles['bbp_gcamdev'] = array(
            'name' => 'GCam Developer',
            'capabilities' => custom_capabilities( 'bbp_gcamdev' )
            );
         $bbp_roles['bbp_romdev'] = array(
            'name' => 'ROM Developer',
            'capabilities' => custom_capabilities( 'bbp_romdev' )
            );
        $bbp_roles['bbp_kerneldev'] = array(
            'name' => 'Kernel Developer',
            'capabilities' => custom_capabilities( 'bbp_kerneldev' )
            );
        $bbp_roles['bbp_modder'] = array(
            'name' => 'Modder',
            'capabilities' => custom_capabilities( 'bbp_modder' )
            );
        $bbp_roles['bbp_member'] = array(
            'name' => 'Member',
            'capabilities' => custom_capabilities( 'bbp_member' )
            );
     
        return $bbp_roles;
    }
    
    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_gcamdev' )
            $caps = custom_capabilities( $role );
     
        if( $role == 'bbp_romdev' )
            $caps = custom_capabilities( $role );
     
        if( $role == 'bbp_kerneldev' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_modder' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_member' )
            $caps = custom_capabilities( $role );
    
        return $caps;
    }
     
    
     
    function custom_capabilities( $role )
    {
        switch ( $role )
        {
            case 'bbp_gcamdev':
                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,
                );
    
            case 'bbp_romdev':
                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,
                );
    
            case 'bbp_kerneldev':
                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,
                );
    
            case 'bbp_modder':
                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,
                );
     
    
            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'        => false,
                    'edit_topics'           => false,
                    '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;
        }
    }

    which adds the filter once the theme and all plugins are loaded.

    #222142
    r-a-y
    Participant

    How are you setting up the forum for your BuddyPress group?

    You might want to check out this guide:

    Installing Group and Sitewide Forums

    #222138

    In reply to: Help with Forum Roles

    Robin W
    Moderator

    @techinbermudas @mairag where are you putting this code?

    #222133
    r-a-y
    Participant

    You don’t need to import. That codex page is referring to an older version of bbPress (v1.0) when it was required to do an import to bbPress v2.0.

    #222131
    ShadowKatmandu
    Participant

    WordPress version 5.8
    BuddyPress version 9.0.0
    bbPress version 2.6.6

    I have attempted to import from BuddyPress by going to Tools > Forums, Import Forums. I entered all of the needed information and clicked Start. The progress box reported nothing was imported, but our BuddyPress Groups has 1 forum with a fair number of messages.

    I found documentation at https://codex.bbpress.org/getting-started/importing-data/import-forums/bbpress-1-x-buddypress-group-forums/ which purports to be documentation for importing from BuddyPress groups but only links to what appears to be a possibly out-of-date article about importing from an older version of bbPress.

    What is the best method to migrate from BuddyPress 9.0 to bbPress 2.6.6?

    r-a-y
    Participant

    Technically, an image is a link so that would count as a hyperlink.

    This is a legitimate problem because bbPress inherited the discussion settings from WordPress in bbPress 2.6.0. I created a ticket to perhaps create separate forum moderation settings, which would address this. See https://bbpress.trac.wordpress.org/ticket/3352.

    A workaround is to bump the link limit to a higher number or use some code to bypass moderation.

    #222064
    Robin W
    Moderator

    nothing I know of doe this at the moment

    If it’s a fixed list then just cascade eg

    [bbp-single-topic id=4096]
    [bbp-single-topic id=4097]
    [bbp-single-topic id=4099]
    [bbp-single-topic id=4099]

    if you’re doing it programmatically then just do the ‘echo_shortcode’ in a foreach loop

    or crack open /inclues/common/shortcodes and you can use the code form there to create what you want

    #221877
    pave1
    Participant

    I’m trying to move “Favorites” page to Ultimate Member Profile page by running bbp_get_template_part( 'user', 'favorites' ); on that page, but I get “Nothing to show” message. Do I need to preload/initialize something before calling that? Thanks

    #221862
    Robin W
    Moderator

    that’s not code from bbpress.

    it could be a theme or plugin issue

    Themes

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

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    #221857
    Robin W
    Moderator

    This should do it

    add_filter( 'bbp_get_breadcrumb', 'rew_remove_xx_breadcrumb' , 10 , 4) ;
    
    function rew_remove_xx_breadcrumb ($trail, $crumbs, $r, $args) {
    	if (strpos($trail,  'Forum Name') !== false) {
        $trail = '' ;
    	}
    	return $trail;
    }

    replace ‘Forum Name’ with the name of the forum you want to exclude

    but it would also get rid of the breadcrumb in any forums for a topic with the forum name as the topic title – ie it is just searching for any occurrence of the text in the breadcrumb string !!

    #221838
    purityboy83
    Participant

    Hi

    I want to exclude “breadcrumb” from the topic list output screen of a specific forum.

    i use to plugin’s bbp style pack, bbP shortcodes

    thanks

    #221822
    rdcurbow
    Participant

    I’m new to bbPress so please excuse what has been asked before, but a lot of the answers seem obsolete.

    I’ve created several forums, with descriptions yet the descriptions never appear when a user views the forum. Various article I’ve read here suggest you have to go edit “your functions file” (see https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/) but when I search for bbpress.php, forum.php, etc. I can’t find them. There’s nothing under wp-content/themes/astra or anywhere else I can find. Anyone got any hints?

    It’s frustrating that so much of the documentation on bbPress seems to have been written years ago and not necessarily updated as changes have been made.

    My site is kusamurabonsai.org – but the forums are only visible to logged in users.
    I’m running WP 5.7.2 and bbPress 2.6.6

    #221784
    digiloop
    Participant

    I’m having problems with the root of the forum board.

    I have the forum root slug(s) setup exactly as the installation instructions recommend:
    -forum root = forums
    -forum prefix is checked
    -the root shows “forum index”
    -forum single slug = forum

    I created a page with the slug forum and the shortcode added to it. When you go to the page, the forums shows exactly as it should. However, let’s say you have the following showing in breadcrumbs:

    Home>Forums>Discussion

    When you click on “forums” to go back one (e.g. the main page for the forum) it produces a paragraph of content with the forums listed in it. You cannot get back to the main board, unless you click on a link that contains the forum slug (.e. https://mysite.com/forum)

    Can anyone help me on what I’m doing wrong. I’ve tried different things to see if I could manipulate it, including swapping the root and single slugs, unchecking the prefix, changing what the root shows, etc. I’ve even changed the page slug to forums instead of forum, and it does the same thing. Instead of showing the main forum board, it gives this paragraph summary of topics and forums the board contains.

    what shows when you click on the root slug for the forum
    this is what it should show for the main page of the forum, but once you look at a topic and click forums to go back to the main board, it reverts to the summation of all topics/forums -- as the previous image shows

    #221755
    budget101
    Participant

    @Joedolson

    This is a fix that should really be implemented. I would have noted it sooner if I’d realized that the work I did that many years ago was unused.

    They half-ass applied it, several of the templates were edited, and some areas still need to be commented out or removed entirely.

    src/includes/forums/template.php

    line #2491 (used to be)
    <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select"<?php echo $tab; ?>>

    except now the line is #2393 and has become:
    <select name="<?php echo esc_attr( $r['select_id'] ) ?>" id="<?php echo esc_attr( $r['select_id'] ) ?>_select" class="<?php echo esc_attr( $r['select_class'] ); ?>"<?php bbp_tab_index_attribute( $r['tab'] ); ?>>

    so – which part do we remove? see also line #2479 (same code)

    #221710
    diegop78
    Participant

    Hi, i’ve searched a lot but i didn’t find any answer. On bbpress website i’ve built 2 differnt type of forum, 1 is private and 1 is public. Now i need to deny access only to public forum to a certain wp user role (already set).
    I think i have two ways, but how to do them?
    1. Turn public forum to a private forum and automatically assign to a every new-subscriber the access to this forum, so i can exclude user assign them a different role.
    2. Block the access only to public forum to a certain role (i’ve tried with many plugins as content control or user access registration but it seems that doesn’t work.)

    Any suggestions? Even php code to implement for me would be ok. Thanks.

    #221692

    In reply to: login issues

    sociallyxceptional
    Participant

    I would also like to get people automatically redirected to a page inside the forum instead of the WP dashboard, but it is not working.

    I have tried using Peters Login Redirect and that has not worked. I have also tried using this code inside the Snippets, which isn’t working either:

    // Send new users to a special page
    function redirectOnFirstLogin( $custom_redirect_to, $redirect_to, $requested_redirect_to, $user )
    {
    // URL to redirect to
    $redirect_url = ‘https://arianegoodwin.com/forums/curiosity-cocktails-topic-map/&#8217;;
    // How many times to redirect the user
    $num_redirects = 1;
    // If implementing this on an existing site, this is here so that existing users don’t suddenly get the “first login” treatment
    // On a new site, you might remove this setting and the associated check
    // Alternative approach: run a script to assign the “already redirected” property to all existing users
    // Alternative approach: use a date-based check so that all registered users before a certain date are ignored
    // 172800 seconds = 48 hours
    $message_period = 172800;

    /*
    Cookie-based solution: captures users who registered within the last n hours
    The reason to set it as “last n hours” is so that if a user clears their cookies or logs in with a different browser,
    they don’t get this same redirect treatment long after they’re already a registered user
    */
    /*

    $key_name = ‘redirect_on_first_login_’ . $user->ID;

    if( strtotime( $user->user_registered ) > ( time() – $message_period )
    && ( !isset( $_COOKIE[$key_name] ) || intval( $_COOKIE[$key_name] ) < $num_redirects )
    )
    {
    if( isset( $_COOKIE[$key_name] ) )
    {
    $num_redirects = intval( $_COOKIE[$key_name] ) + 1;
    }
    setcookie( $key_name, $num_redirects, time() + $message_period, COOKIEPATH, COOKIE_DOMAIN );
    return $redirect_url;
    }
    */
    /*
    User meta value-based solution, stored in the database
    */
    $key_name = ‘redirect_on_first_login’;
    // Third parameter ensures that the result is a string
    $current_redirect_value = get_user_meta( $user->ID, $key_name, true );
    if( strtotime( $user->user_registered ) > ( time() – $message_period )
    && ( ” == $current_redirect_value || intval( $current_redirect_value ) < $num_redirects )
    )
    {
    if( ” != $current_redirect_value )
    {
    $num_redirects = intval( $current_redirect_value ) + 1;
    }
    update_user_meta( $user->ID, $key_name, $num_redirects );
    return $redirect_url;
    }
    else
    {
    return $custom_redirect_to;
    }
    }

    add_filter( ‘rul_before_user’, ‘redirectOnFirstLogin’, 10, 4 );

Viewing 25 results - 1,576 through 1,600 (of 32,481 total)
Skip to toolbar