Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 16 replies - 1 through 16 (of 16 total)
  • @caniwigirl

    Participant

    Hi @testla01,

    Just clarifying that you added the last snippet of code I posted into a file called bp-custom.php?

    Sorry, I can’t help you. Perhaps @bphelp or @shanebp can?

    @caniwigirl

    Participant

    No worries. Editing them from the back end is the quickest way to do it.

    @caniwigirl

    Participant

    Hi @minglonaire,

    The forum part is easy because that is built into bbPress in the first place. If you read the “Getting Started with bbPress” page https://codex.bbpress.org/getting-started-with-bbpress/ you will note that there are three settings for forum visibility:

    Public – Anyone can see these forums
    Private – Only logged in registered users can see these forums
    Hidden: Only Moderators/Admins can see these forums

    I made my base forum (which is actually a category) Private, and the majority of sub-forums Public – but tied into the BuddyPress groups so you required membership to each particular group to access each of the forums. This only works if BuddyPress is hidden from logged out users.

    If you don’t want to use BuddyPress groups… just make all your forums Private.

    Note that BuddyPress defines Public, Private and Hidden slightly differently than bbPress

    I had issues with my theme not displaying Hidden Groups to the people it should… If this is an issue for you, check out another thread… https://buddypress.org/support/topic/hidden-groups-and-forums-not-showing-for-members-of-them/

    All the best! 🙂

    @caniwigirl

    Participant

    Good news everyone. My theme developers and I have solved this issue on the theme I am using!

    The first tricky hurdle was discovering a !important directive in the main.css of the theme for handling .hidden so I removed it to become .hidden{display:none;visibility:hidden} so styling in my child theme would work.

    In my child theme, I did an ‘inspect element’ to discover that the hidden groups were listed as:

    <li> class='odd hidden is-admin is-member">_</li>
    <li> class='even hidden is-admin is-member">_</li>

    So, I added the following code to my style.css in the child theme

    .odd.hidden.is-admin.is-member {
    display: block;
    visibility: visible;
    }
    
    .even.hidden.is-admin.is-member {
    display: block;
    visibility: visible;
    }

    This worked for admin, but not members of the groups who weren’t admins so… Logged in as one of those and using ‘inspect element’ I found that private groups were listed as:

    <li> class='odd hidden is-admin is-member">_</li>
    <li> class='even hidden is-admin is-member">_</li>

    Applying the same logic as above, I added the following code to my style.css

    .odd.hidden.is-member {
    display: block;
    visibility: visible;
    }
    
    .even.hidden.is-member {
    display: block;
    visibility: visible;
    }

    And now everything works 🙂

    I don’t know if anyone at BuddyPress support can help tidy up my code, but it does the trick and I hope it helps you @bewitchingfiction @donalconlon @olay And thanks for your help @danbp

    @caniwigirl

    Participant

    Hi @bewitchingfiction,

    That is what my screen looks like… I have passed on the message from @danbp to my theme’s developers to look into.

    <b>Have you updated the WordPress themes to the absolute latest?</b> They issued updates earlier this week. The previous versions resulted in the same problem, but the current ones worked fine for me.

    My site is a relatively big one… with lots going on. But, my host advised me not to use Jetpack because they have found a number of conflicts/issues with some of the components. Hence, I have to find, test and use other plugins to get the functionality I am after.

    @caniwigirl

    Participant

    Thanks @danbp

    I’ve just tried it on twenty thirteen (the latest update yesterday) and the groups work perfectly, even for my test user who is a forum participant and contributor for WordPress AND member of two hidden groups. I had tested it previously, but it did’t work on the previous version of the theme. I didn’t even have to deactivate any plugins.

    I then tested it with all the themes from 2011-2015 and they all work too.

    So… It looks like I need to take this back to my theme developers… Can you please give me so info that I can relay to them so they can get the hidden groups displaying correctly? Or, is it possible to copy the appropriate BuddyyPress files from one of the WordPress themes and put it somewhere in the child theme of the theme I am using? If so… Which ones and where would I find them?

    The theme I am using integrates BuddyPress in it, but not in any great detail.

    @caniwigirl

    Participant

    Hi @danbp, Thanks for joining this discussion.

    When I first looked into running BuddyPress on my site a couple years ago, Hidden groups did appear for members of them as outlined by BuddyPress. However, this is no longer the case.

    Yes, members can access them if they have the URL for the Hidden Groups’s activity stream…

    Yes, members can access them via the forums…

    BUT hidden groups do not appear to members of them, moderators, admins or keymasters in any of the group directory pages or member/user profile pages or menus which link to ‘All Groups’ or ‘My Groups’. However, the group count increases to show the number of all groups, be they public, private or hidden.

    From https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    List of Groups created in the site including time active stamp, group description, number of members and group privacy setting. Only Public and Private Groups are seen in list by regular members. Super/Site Admin sees all groups including Hidden groups. – NOT working

    My Groups… List of Groups you are a member of – Public, Private and Hidden (only by you and Super Admin) – NOT working

    Is this what you are experiencing @bewitchingfiction?

    @caniwigirl

    Participant

    Hi @bewitchingfiction,

    How many groups like this do you have?

    Another solution would be to provide the members with the direct URL to the group… Again, you could look at using a plugin which will only show to users that meet certain credentials (either via menu or a sidebar widget).

    When I tested, members of the group could still see the activity stream, it just doesn’t show up in the directory of groups or under ‘My Groups’

    To find the group URL… Make sure it is allocated to your forum, then look at all your forums, click on the particular one you are after and, at the top of the screen, you will see that it is associated with a hidden group. Click on the avatar for the croup, and you go to the group’s activity stream. Copy the URL and use it either as a link in the menu, on a button, or whatever else suits your format… If you don’t want it to be visible to other users, use a widget or plugin that allows you to show it only to who you want to see it.

    @caniwigirl

    Participant

    Hi @bewitchingfiction,

    I tried it on some of the default WordPress themes and couldn’t get it to work… and it no-longer works on the previous theme used two years ago when I first configured BuddyPress on our site.

    My suggested work-around for you until someone is able to get it going again would be to create a password-protected or private page in WordPress for your mods to chat via the comments function. If you use a plugin that allows menu items to only be shown to mods, then no one will know the page even exists.

    I use Nav Menu Roles to manage the visibility of menu items on my site. Unfortunately, it’s not compatible with my theme’s menu… so every time I want to add or change a menu item’s visibility, I have to change to another theme to use it , then change back. Clumsy, but it works! https://wordpress.org/plugins/nav-menu-roles/screenshots/

    @caniwigirl

    Participant

    Hi @donalconlon,

    Have you tried going into the group via the back-end instead of editing them from the front-end? This works on my site.

    From the Dashboard, select Groups then edit the group you wish to change.

    In the Discussion Forum box in the right column, below the Settings box, tick the box Yes, I want this group to have a forum. Then, if you click in the Group Forum: selection box directly below that says (No Forum) A list of all your existing forums (public, private and hidden) should appear for you to select from. Click Save Changes and it should be working.

    If you aren’t familiar with the back-end editing or groups, you might be interested to know that you can Add New Members to the group and Manage Member roles here too. Those parts are directly below the Name and Description box. If you can’t see any of these options, you might have to select screen options in the top right and tick their selection boxes to get them to show below.

    Hope this helps!

    @caniwigirl

    Participant

    I first installed BuddyPress on our site a couple years ago and all worked as expected. However, it was decided we wouldn’t pursue BuddyPress as part of our solution at the time. Earlier this year, we decided to re-instate it, which is when I noticed this new behavior…

    There have been a lot of updates in WordPress, BuddyPress and bbPress during this time, so I’m guessing something somewhere along the line, but may not have been addressed yet. I haven’t found any fixes online for it, which is why I have posted here.

    Just to clarify, HIDDEN FORUMS appear for Keymasters and Moderators, but not to members of them who haven’t been assigned to either of these roles. They can, however, access the forum if they have the URL for it. So, at the moment, I am having to make all members of hidden forums be moderators in order to keep my site navigation clean.

    Perhaps @bphelp could shed some light?

    @caniwigirl

    Participant

    Awesome, Thanks!

    @caniwigirl

    Participant

    Thanks. So, to summarize for others wanting to do the same… The code to add to the functions.php file in the theme (or child theme) would be:

    function bp_guest_redirect( $name ) {
    
        if( ! is_user_logged_in() ) {
    
            if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() ) 
                wp_redirect( get_option('siteurl') . '/wp-login.php/' );
    
        }
    
    }
    add_action( 'get_header', 'bp_guest_redirect', 1, 1 );

    @caniwigirl

    Participant

    Don’t know why but… It is working again. Perhaps it was the latest update?

    Here is another version of the code that can go into the functions.php that I first stumbled on… and is the one I am currently using.

    function bp_guest_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // enter the slug or component conditional here
    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option('siteurl') . '/wp-login.php/' );
    } // user will be redirect to any link to want
    }
    }
    add_filter('get_header','bp_guest_redirect',1);

    Also, I have set my base category for forums to ‘Private’ so that people must be logged in to get access to the forums under that category, but it still allows me to make those forums ‘Public’. The reason? I don’t want members to have to wait for moderators to approve their request to join each of our discussion forums.

    @caniwigirl

    Participant

    Forgot to add tags…

    @caniwigirl

    Participant

    With further testing I have resolved that HIDDEN FORUMS will show for Moderators and Keymasters (as per bbPress documentation).

    HIDDEN GROUPS not showing for anyone (keymasters, moderators of group members) in BuddyPress under ‘All Groups’ or ‘My Groups’ tabs. Only Public and Private groups show. The count of groups indicates the appropriate numbers however…

Viewing 16 replies - 1 through 16 (of 16 total)
Skip to toolbar