tzeldin88 (@tzeldin88)

Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

  • tzeldin88
    Participant

    @tzeldin88

    Which plugin caused the conflict?


    tzeldin88
    Participant

    @tzeldin88

    Agreed. I’d prefer to use the_content(). But I don’t know how to get the original filters restored, after bbPress removes them.


    tzeldin88
    Participant

    @tzeldin88

    I found a solution: if my template uses get_the_content() instead of the_content(), then I can apply the normal content filters — wpautop() and wptexturize() — directly to the raw content, untouched by bbPress.
    $raw_content = get_the_content();
    echo wptexturize(wpautop($raw_content));


    tzeldin88
    Participant

    @tzeldin88

    Hi JJJ. Another thought on this.

    Even here at bbPress.org, the header, sidebar, and footer all create new WP_Query objects without any issues.

    The header, sidebar, and footer on bbPress.org don’t seem to have any paragraph breaks, so it’s not clear that wpautop() is actually working on them, right?

    I just need to figure out how to add the normal wp content filters — wpautop() and wptexturize() back onto the_content, after bbPress has had its way with it.


    tzeldin88
    Participant

    @tzeldin88

    Hey JJJ, thanks for helping out again.

    Hmm. When I comment out line 633 in bbpress/includes/core/theme-compat.php,
    //bbp_remove_all_filters( 'the_content' );
    the problem is fixed — the custom WP_Query’s all have the correct paragraph breaks. So it still seems related to me somehow. But of course I don’t want to just keep it commented out. I’m sure it’s there for a reason, and I don’t want to edit core files.

    Also, I just added is_main_query() and in_the_loop() to the templates that do my custom WP_Query queries. And even those show is_main_query = TRUE, which seems weird, huh. Though in_the_loop = False, as it should be, so I’m not sure why that wouldn’t prevent the problem.

    Any further insight much appreciated!


    tzeldin88
    Participant

    @tzeldin88

    Wow! Bingo! THANK YOU JJJ. Super simple fix too. Here’s what I did, if this helps anyone else:

    add_filter('bbp_get_user_role_map','my_bbPress_role_map');
    function my_bbPress_role_map($role_map){
    $role_map['student'] = bbp_get_participant_role();
    return $role_map;
    }

    This is added to my functions.php.


    tzeldin88
    Participant

    @tzeldin88

    Hi JJJ, thanks for the rapid reply! Just to clarify:

    I’m already using this custom role (Student) in other ways throughout the site, so I can’t scrap it. Participating in the Forum was one of the things a Student could do, and participation in the Forum was restricted to ONLY Students.

    I don’t actually have many Students yet, so I can actually just delete and re-add them, to fix any wrong/old capabilities, and avoid any “resetting”.

    The issue is really more about simplifying the process for my client (the site admin) — so he doesn’t need to set a Student’s role in two different fields, in the admin: the normal wp Role field, and now this new Forum Role drop-down (which is at the bottom of the profile screen).

    So I think I need the DEFAULT bbPress Role to be Spectator (for public / non-logged-in users, and another custom role, called Schools), so they can’t participate.

    And I’d like my Student role to have the same (EFFECTIVE) Capabilities as a Participant, so the site-admin doesn’t need to set that separately. But it sounds like you’re saying that’s just not really possible, even though the Members plugin SEEMS able to assign the capabilities correctly.

    Thanks again for your time and attention.
    -Todd


    tzeldin88
    Participant

    @tzeldin88

    To clarify my question above — According to this (https://bbpress.org/forums/topic/spectator-and-visitor-someone-can-explain-this-roles/) the Capabilities of a Participant are:
    – assign_topic_tags
    – edit_replies
    – edit_topics
    – participate
    – publish_replies
    – publish_topics
    – read_private_forums
    – spectate

    So I assigned those same Capabilities to a different role — a custom role called Student — but the Student still can’t actually participate in the forum.

    (I used Justin Tadlock’s Members plugin to create the custom role, and assign the capabilities.)

    Thanks! -Todd


    tzeldin88
    Participant

    @tzeldin88

    I have a similar problem (though not related to s2member). I have a custom Site Role (called “Student”), which I had enabled to participate in the Forums, by assigning the necessary Capabilities (using the Members plugin from Justin Tadlock). This worked fine in bbPress v2.1.2.

    But I just updated to bbPress v2.2.1, and now bbPress has a new concept of Forum Roles, separate from (but somehow related to) Site Roles. So now all my Student users are unable to participate anymore!

    I do NOT want to have to manually set the new Forum Role for each Student. Instead, I tried using the Members plugin to (again) add the necessary Capabilities to my Student role, to match those of bbPress’s new Participant role. I did this by matching the checkboxes displayed by the Members plugin. But this did not work. In fact the Members plugin shows that a Participant has 28 Capabilities, though only 8 are actually “checked”. So are some of a Participant’s capabilities somehow HIDDEN? Can I somehow tell bbPress to use my Student role?

    Hoping for help on this.


    tzeldin88
    Participant

    @tzeldin88

    I solved this with some CSS. First, in WP-Admin > Appearance > Menus, i added a custom CSS class to my tabs (at least my Forum tab and News tab). If you don’t see the CSS-classes field, toggle it on in the Screen-Options. For my Forums tab, i set a CSS class of “nav1-forum” and my News tab got “nav1-news”.

    Then in my CSS file (style.css), i added this to my Active-tab styles
    .bbPress #main-menu #menu-main-menu li.nav1-forums a,
    which makes the Forum tab highlighted whenever bbPress is “on” (based on the body class “.bbPress”.

    And I added this to my Inactive-tab styles:
    .bbPress #main-menu #menu-main-menu li.nav1-news a,
    which forces my News tab (which is for my normal “posts” post-type, the blog area of my site), to appear as Inactive, even though its element actually does incorrectly have the class “current_page_parent”.

    Of course you may need to adjust the IDs in the css, to match your html.

    In reply to: Page in Menu

    tzeldin88
    Participant

    @tzeldin88

    I did this, but the menu tab does not seem to get the “current_page_parent” (or similar) class, to use to highlight the tab when in the forum.


    tzeldin88
    Participant

    @tzeldin88

    Has a solution been found for this yet? When viewing any page of my Forum, my Menu (from wp_nav_menu) actually shows my NEWS tab (the LI element) (the normal “posts” post-type, for the blog section) with the “current_page_parent” class. So my forum looks as if it’s in the News section. I do have a Forum tab in my menu, but it is the Forum index page (using a shortcode). I suppose i can just use CSS to fix all this, but i would think bbPress would be able to avoid incorrectly triggering the “current_page_parent” class on the wrong element.


    tzeldin88
    Participant

    @tzeldin88

    @Shane – Hey, thanks for responding, i appreciate the help. I finally found the issue. It was a conflict with the Slug i had entered in WP-Admin > Settings > Forums > Archive Slugs > Forums Base. I had it as “forums” — i guess that’s the same name as the CPT used by bbPress. So when i changed my slug to “theforum”, the problem was solved.

    • This reply was modified 11 years, 5 months ago by tzeldin88.
Viewing 13 replies - 1 through 13 (of 13 total)