Hi @jaykdoe
You could try this:
function my_private_profiles() {
// Bail if not a profile page.
if ( ! bp_is_user_profile() )
return;
// Allow admin users.
if ( current_user_can( 'manage_options' ) )
return;
// Allow the profile owner.
if ( bp_loggedin_user_id() == bp_displayed_user_id() )
return;
// If we get to here, redirect to homepage.
bp_core_redirect( home_url() );
}
add_action( 'init', 'my_private_profiles' );
You can copy and paste it into your theme’s functions.php file. Please note I haven’t tested.
I would like all member profiles to be completely private. Members should only be able to access their own profile and nobody elses. Admin accounts should have access as well, but all profiles should be completely private to all other members.
I have done some research and have found a few people looking for similar solutions, but none exactly like this. Additionally, it appears there may have been some plugins in the past that would have helped but I can no longer find them in the wordpress plugin repository.
Does anyone know of any plugins or custom code I could add to bp-custom.php to accomplish this?
Thanks in advance!
Hello,
I found one topic here about that, but it didn’t have any changes for me.
And here is my code in bp-custom.php:
<?php
function my_filter_group_stati( $stati ) {
if( $key = array_search( ‘hidden’, $stati ) ) {
unset( $stati[$key] );
}
return $stati;
}
add_filter( ‘groups_valid_status’, ‘my_filter_group_stati’ );
?>
Any suggestion? And i would like to have only private group.
That should not be an issue whatsoever with 2 John Smiths, two should should up and you click on whichever one you want. Most people I know actually deactivate the activity system. When they message the private message by clicking on profile, most communities are not the type everyone knows everyone, its actually the other way around, those types are in minority and buddypress seems to cater to them.
Its actually a very simple solution, implement an option, with username and another one first and last name.
The username serves multiple purposes:
- It’s needed internally for use in URLs etc. First name and surname won’t play nicely in this context because you can’t have spaces etc in URLs.
- It’s used as a ‘friendly’ unique identifier. What happens when you have 2 members named John Smith? How do you private message the first John Smith without private messaging the second?
- There are probably more purposes I’m missing?
mine says define(‘WP_DEBUG’, false);
and script_debug is not found in my wp-config.php
With my issue, I am not getting any error message, and there is no error message on the server either. When I try to change a profile photo using BuddyPress, it just does not allow me to change it. It kind of “blinks” instead of bringing up the crop screen.
Similarly, when I try to send a private message in BuddyPress, it lets me compose the message, but when I try to send it, it “blinks” with no error message but does not send the private message. The private message disappears and does not go into my sent folder, either.
thank you @mercime I did try the 2015 theme after deactivating all plugins except BuddyPress, and same issue. Yes I can upload images and see thumbnails with 2015 theme and with my BuddyBoss theme. I still have the problem with profile images not working. I also have a new issue where private messages no longer work from inside BuddyPress. I am hosted with inmotion.
Default Privacy:
Private
Friends
Logged in Users
Public
I would assume this is who can see the profile, but changing the fields does not do anything.
How is this supposed to work or what is it supposed to do?
So default privacy has 4 options:
private
friends
logged in users
public
when I switch to friends or private, people who are not friends can still see the profile.
how does this work?
I am trying to have more than one forum in bbp assigned to a group, however the group forum selector will only allow to select only one. I need this as I have group members located in more than one city and I don’t want to make a new group for each city.
What is happening is non group members are able to access private forums even though I placed them as a sub forum of the group forum.
http://mydomain.tld/forums/forum/groups/group-forum/ – No Access
http://mydomain.tld/forums/forum/groups/group-forum/sub-group-forum/ – Access!
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! 🙂
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
Hello @Henry Wright
Yes Im redirected to compose message, but I want is the recipient will automatically added to send to fields like when you go to someone’s page then clicked the Private Message.
Anyway, thankyou so much!
Try placing this in your member’s profile template:
<a href="<?php bp_send_private_message_link(); ?>" title="Private Message">Private Message</a>
Oops, I just noticed I supplied you with an add friend button; nothing to do with private messages, so sorry about that. Let me take a look to see if I can find something.
Hi support team, recently posted this issue one week ago, but may be in the wrong forum. Hope you can help me.
Hi,
I’m using Buddypress (version 2.2.3.1).
All the groups in my community are displayed in the group list/directory but unfortunately I’m not able to open to the single group pages as well as create a new group. In both cases, the error 404 is presented.
I recently installed the new Boss Theme (version 1.1.5) on my homepage but it is the same problem as a tried it with the former theme (buddyboss version 4.1.9).
The permalink structure is based on the post name: it is like https://sport-und-ms.phil.fau.de/community/gruppen/sherlock-holmes/ (as example for single group page)
The support team of the buddyboss theme considered a slug issue or another hierarchical issue
Additionally, we are translating some of the *.po files of buddypress into german. Could this be a reason? I reran the original language file in (http://deckerweb.de/sprachdateien/buddypress/) but the problem still exists.
Buddypress runs in conjunction with bbpress (2.5.7), and buddypress…private activity (1.3.6), follow (1.2.1), wall (0.9.4), group documents (1.9.3.1)
Wordpress version 4.2.1
kind regards, René
This is the code linking to the specific member I wanted to send a message.
<a href="/members/<?php echo bp_core_get_username( get_the_author_meta( 'ID' ) ); ?>/">
but the question is, how can I go directly to the Private Message?
Thank you!
This is the code linking to the specific member I wanted to send a message.
<a href="/members/<?php echo bp_core_get_username( get_the_author_meta( 'ID' ) ); ?>/">
but the question is, how can I go directly to the Private Message?
Thank you!
Hi !
I’m using a wp template based on twig file and I want to add a Private message button on post which are create by Buddypress user.
I found this code “bp_core_get_userlink() ” but I don’t know how to write it in my twig file…
I try that but it doesn’t work, someone can help me ?
{% set url = bp_core_get_userlink() %}
<FORM ACTION="{{url}}">
<INPUT TYPE="SUBMIT" VALUE="Envoyer un message au propriétaire"></FORM>
See documentation about group roles.
If you allow not logged-in users to see what hapens in a private group, the group privacy is very compromised. In this case make it public.
Hi, I have I PRIVATE Group and I want the non-login users and the non-members of the group to be able to see (not to post) the topics and posts of that PRIVATE group Forum.
Is this possible with a piece of code or with a plugin.
Thanks
Once a group forum is activated, he inherits the group privacy setting.
If group is set to public, his forum is public. If group is private, the forum is private.
I’m not aware about post for group.
Thanks for the advice. Do you know how I could allow groups to choose if their forum is public or private?
I did play with creating a post for a group, then pulling in that posts comments / comment form to the group page. I guess if it automatically created a post for each group when a group is created it could work.
Hi @pssawhney
Site notices and private messages are separate; so there’s no need to populate every member’s inbox.