Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 1,426 through 1,450 (of 3,869 total)
  • Author
    Search Results
  • #221279
    Henry Wright
    Moderator

    I’m not aware of a plugin that can do exactly that? Perhaps some of the guys on here know of one?

    To do it manually, you could hook a function to init and work from there. For example:

    function my_function() {
    
        if ( ! is_user_logged_in() && bp_is_current_component( 'messages' ) ) {
            // Current user is not logged in so don't let them see stuff. In this case, private messages 
            wp_redirect( home_url() );
            exit;
        }
            
        $flag = false;
        // Get current user info.
        $user = wp_get_current_user();
    
        if ( ! in_array( 'student', $user->roles ) ) {
            // The current member is not a student.
            $flag = true;
        }
    
        if ( $flag && bp_is_current_component( 'messages' )  ) {
            The currently logged-in member is not a student and is trying to view private messaging. Let's redirect them away.
            wp_redirect( home_url() );
            exit;
        }
    }
    add_action( 'init', 'my_function' );

    From that, you should be able to see how you can achieve what you’re trying to do without the need of a plugin.

    Refs:

    Template Tag Reference

    https://codex.wordpress.org/Function_Reference/wp_redirect

    danbp
    Participant

    Note to lazy people

    Definetly using the orange search button on the top right corner of this forum mostly brings good advice. But YOU have to search a bit before asking ! 😀

    https://buddypress.org/support/topic/making-buddypress-private/

    More ?
    https://buddypress.org/support/search/private/

    #220262
    danbp
    Participant

    Members are the heart of BuddyPress. When a user register on a BP activated site, this user is automatically a “member”.

    So i guess “they are not registering for the site, just the members area” is just impossible. Don’t know what you already did to get a “private” member area, but if you have an issue, it’s mostly because you did something wrong. 😉

    To confirm to readers what you already get to work:

    To modify the registration page, on which appears the login fields belonging to WP (user, username, email & password), BP adds his own additionnal fields, under condition you activated the xProfile component.

    By default, BP add only one field in the mandatory field group “Base”: NAME.

    When the admin add a new field, he can choose between different field status, and depending this status, you will see phrase such as “This field can be seen by: “.

    These settings are avaible in Dashboard > Users > Profile Fields

    #216996
    Paul Bursnall
    Participant

    To create a member only site, I would highly recommend this plugin – https://wordpress.org/plugins/jonradio-private-site/

    #214467
    bp-help
    Participant

    1.) For invites try: https://wordpress.org/plugins/wordpress-mu-secure-invites/
    To keep logged out visitors from accessing BP pages check out: http://bphelpblog.wordpress.com/2014/09/27/private-bp-pages/
    Usernames can’t be changed and if you don’t want users changing their password you would need to custom code it unless you can find a code snippet on the forum or on the net.
    2.) You can use filters and you can also try this plugin: https://wordpress.org/plugins/bp-profile-search/
    3.) Use bbPress: https://wordpress.org/plugins/bbpress/
    You will have to search the plugins directory, the forums, and google the rest for your requirements unless someone else would like to take over where I left off. Hope this is at least a start. Good luck!

    #213744
    b2marketing
    Participant

    Thanks danbp

    Really sorry to bother you again.

    I implemented this but it is not removing anyone from the loop. I looked at the gist you linked too and (with my limited php experience) combined with the text in the top

    Filter Members List Based On Profile Field – Female members are served a directory of males and male members are served a directory of females.

    then I am wondering if I have not explained myself properly.

    I want to hide/remove members from the loop who has chosen “private” in their profile. I don’t want any members to be able to see members who has chosen “private”.

    #213740
    danbp
    Participant

    Here’s a snippet to filter members list based on profile field.

    Remove your custom members-loop file first and revert to default one.

    The example use field ID 62 with value = public
    The field is called Privacy in xProfile and use a selectbox field type who shows 2 options: private and public.

    You’ll probably also have to remove, or to conditionnally show, the top navbar, search box, etc in the template (childtheme/buddypress/members/index.php)

    Add this snippet to bp-cutom.php.

    class BP_Custom_User_Ids {
    	private $custom_ids = array();
    	public function __construct() {
    		$this->custom_ids = $this->get_custom_ids();
    		add_action( 'bp_pre_user_query_construct', array( $this, 'custom_members_query' ), 1, 1 );
    		add_filter( 'bp_get_total_member_count', array( $this, 'custom_members_count' ), 1, 1 );
    	}
    	
    	private function get_custom_ids() {
    		global $wpdb;
    		// collection based on an xprofile field
    		$custom_ids = $wpdb->get_col("SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 62 AND value = 'Public'");
    		return $custom_ids;
    	}	
    	
    	function custom_members_query( $query_array ) {
    		$query_array->query_vars['include'] = $this->custom_ids;
    	}	
    	
    	function custom_members_count ( $count ) {
    		$new_count = count( $this->custom_ids );
    		return $count - $new_count;		
    	}
    }
    
    function custom_user_ids( ) {
    	new BP_Custom_User_Ids ();
    }
    add_action( 'bp_before_directory_members', 'custom_user_ids' );

    Props @shanebp (tip on github)

    #212544
    Henry Wright
    Moderator

    Hi @callumoberholzer

    BuddyPress allows you to have:

    • member profiles
    • an advanced member search (through the BP Profile Search plugin)
    • private messaging

    So it looks like your requirements are covered. My advice would be to set up a test install and try out all of the features to see if they meet your requirements.

    #206622

    In reply to: Username Dropdown List

    barchiola
    Participant

    By PM I mean Private Message and when I go to the Private Message screen to send one to a user, username suggestions do not appear in the box as I begin to type letters regardless of whether I start with an @ or not.
    So I guess that this feature doesn’t exist and that there are no plugins to make it work?

    #206288

    In reply to: Username Dropdown List

    Henry Wright
    Moderator

    Ah sorry, by PM I thought you may have been referring to public messaging (also known as @-mentions). Auto-complete should work on the private messaging compose screen too. Have you tested?

    #205264
    Myg0t
    Participant

    Nice, I was actually looking at that a couple of days ago. I had tried a few things out, but to no avail.

    Here’s where i’m at: I’ve commented the above edited section of members-loop.php.

    In my bp-custom.php i’ve copy/pasted the code from the link you sent, and have applied the following edits to it:

        private function get_custom_ids() {
            global $wpdb;
     
            // collection based on an xprofile field
    		// WP_User_Query arguments
    		$args = array (
    			'role'           => 's2member_level2',
    			'fields'         => array( 'id' ),
    		);
    
    		// The User Query
    		$user_query = new WP_User_Query( $args );	
    		//The User Loop
    		if ( ! empty( $user_query->results ) ) {
    			foreach ( $user_query->results as $user ) {
    				$custom_ids = $user.",";
    			}
    		} else {
    			// no users found
    		}
            //$custom_ids = $wpdb->get_col("SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 8 AND value = 'no'");
    		
            return $custom_ids;
        }  

    I also, made the lower two edits you suggested to the $query_array and return $new_count.

    currently i’m getting this error:

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/collegi8/public_html/wp-content/plugins/bp-custom.php on line 30

    line 30 is:

    $custom_ids = $user.",";

    Thanks for all your help man,

    M

    #203651
    Paul Wong-Gibbs
    Keymaster

    Short of giving your users extra hugs and re-assuring them that their WordPress usernames aren’t particularly private bits of data, you’re going to have to get your hands dirty. 🙂

    It might be down to how the other plugin creates user accounts. Most plugins that allow sign-in using other services’ authentication systems (such as Facebook) don’t “properly” create WordPress user accounts; they use MySQL statements directly instead of using WordPress’ APIs.

    This can cause problems with plugins that expect certain user record fields to be in a particular format (if some other plugin came along and just inserted something in a custom format in place). I am not saying that this is the case with this plugin, as I haven’t looked at its code, but I’ve seen this sort of thing before.

    If you can create a test account and then go into your DB’s wp_users table and find your test user, and let us know what the values of the user_login, user_nicename, display_name fields are — and which one of these @mentions is using, and which one you would like it to use.

    I built @mentions in the last BuddyPress release and while I’m not sure if it’s possible to get it to change how it behaves like this, understanding what you’d want different with real data from a test account will help us help you, and at worse, give a suggestion for ways we could make advanced customisations possible for this in future BuddyPress releases.

    #203567
    bp-help
    Participant

    @pfriem
    I have a premium plugin Private Community For BP that should do what you need if you are interested. You can ask any questions regarding this plugin you have here:
    Submit Comments, Tips or Tricks, or Job Inqueries

    #202524
    danbp
    Participant

    @vernontessio,

    it depends on how you use bbpress ! As standalone forum or as group forum.

    If you use buddypress’s group forums, you create a hidden group which will be only seen by the members who belongs to it and nobody else.

    If you use bbpress outside of BP as standalone forum, you can use Private Groups plugin.

    Remember also that Everything in a BuddyPress community revolves around its members.

    #201153
    Lars Henriksen
    Participant

    Hi @danbp, thanks for answering.

    OK, this is embarassing: I checked again and the forum was not set as private.

    and voila : A post in a private forum does not show up in public activity stream.

    Sorry about that one. 😉

    #199816
    vizcano
    Participant

    thanks for your answer shanebp.
    i didn’t understand all you said but it lead me to the solution. so thank you

    i am a rookie so i didn’t know the basics on how to use buddy press with bbpress…

    so maybe a rookie can find this helpfully

    this is what i did.

    i went to bbpress.
    i created a forum called general public and another called vip section

    then i went buddy press group section and i created a group called vip, here is the thing. the group doesn’t make a forum. you must make it firt. in this example i took the vip section forum.

    this were my steps

    1) in FORUM. i created:

    *general public forum (the one everyone must be able to see and participate) has the standard settings
    *vip section forum (the one only for the people of the vip group) has this settings: tipe: forum; State: Open; visibility: Private

    2) in GROUPS. i created a new group called VIP

    this were the settings, Is a Hidden Group. and invitations can only be given by admins and moderators

    in this way:
    – when people is not logged in they can only see the general public forum.
    – when they logging they can participate in the general public forum, they can see the private vip section forum but they cannot participated in it (i wanted that they would see it neither but this is how it works) in other words, they can see the group forum (vip section) but they cannot see what´s inside.
    – when a member of the vip group logging they can see and participated in bouth forums.

    #199313
    shanebp
    Moderator

    So you created a private group call ‘vip’.
    And added a forum to that group via ‘[your-site-url]/groups/vip/admin/forum/’
    And added some members to the forum via
    wp-admin/admin.php?page=bp-groups -> Edit – Add New Members

    And those added members cannot see the vip forum listed when visiting
    ‘[your-site-url]/forums/’ – correct?

    #198957
    danbp
    Participant

    I’m pretty sure that since BP 1.9 such issues won’t happen (on a correctly configured install).

    Private forums are…private and a topic posted in a private forum isn’t shown on the SWA. You can only see such an activity if you’re the author of the post (within (profile > activity) or on the private group.

    To be clear, you’re asking
    Is there any way to hide activity in private forums from activity stream?
    and cite as example an old post titled
    Private group posts appearing in Activity Stream to non-members.

    Hum ? It isn’t the same context i guess. 😉
    Do you want to hide private group activities or do you want to eliminate a wrong behaviour, like the second question relates to ?

    #193157
    Henry Wright
    Moderator

    Hi @pstidsen

    It sure is possible but you’ll need to write a custom function to handle the behaviour. The hook you’ll need is messages_message_sent. It fires after a private message has been sent successfully.

    #192184
    colabsadmin
    Participant

    Have you asked the BP Private plugin devs? Seems that you could edit their code to do a check of each required field. They’re probably only checking if a person is logged in.

    if (!bp_is_my_profile() && !bp_custom_get_member_list_xprofile_data('Company') && !bp_custom_get_member_list_xprofile_data('Location'))

    The unfortunate part of this is that check would have to be done on every page causing unnecessary processing time to every page load, unless you set a cookie or a single flag in the db. But then what happens if a user removes the information in one of the fields at a later date.

    #191866
    durkk
    Participant

    Overall I like the way it looks. There are however a view things that stand out: When resizing the window you get overlays and the menu start the look weird. The category archives look a bit untidy with the tag spacing and amount of non content space. On protected pages the sidebar under the login aligns to the left.

    I really like the group and profile banner but the little sidebar looks a bit weird when logged out imo, perhaps there is more info when logged in?

    The sidebar also looks weird on private groups in chrome: http://cultivators-forum.com/groups/seedism/

    Overal looking great tho, nice example of how much you can do with theming BP.

    #191024
    Ryan Hale
    Participant

    Thanks danbp. At this point, I’m just trying to solve for users with this new role type to have access to the Groups area in admin. Below are the capabilities that I’ve given the role. Unfortunately, in my testing so far, the only way I can get Groups (and Activity) to show up in admin is if I set manage_options to True, which is undesirable. But does that jive with your understanding that it needs to be True to make this work?

    (Quick note that this is non-multisite)

    Here is a screenshot showing the missing Groups admin area:

    https://www.dropbox.com/s/jyu4pign0aaghlt/Screen%20Shot%202014-09-09%20at%2010.13.46%20AM.png?dl=0

    And here are the capabilities for the user with the role that I’ve created:

    activate_plugins => false,
    delete_others_pages => true,
    delete_others_posts => true,
    delete_pages => true,
    delete_plugins => false,
    delete_posts => true,
    delete_private_pages => true,
    delete_private_posts => true,
    delete_published_pages => true,
    delete_published_posts => true,
    edit_dashboard => false,
    edit_files => false,
    edit_others_pages => true,
    edit_others_posts => true,
    edit_pages => true,
    edit_posts => true,
    edit_private_pages => true,
    edit_private_posts => true,
    edit_published_pages => true,
    edit_published_posts => true,
    edit_theme_options => false,
    export => true,
    import => false,
    list_users => true,
    manage_categories => true,
    manage_links => true,
    manage_options => false,
    moderate_comments => true,
    promote_users => true,
    publish_pages => true,
    publish_posts => true,
    read_private_pages => true,
    read_private_posts => true,
    read => true,
    remove_users => true,
    switch_themes => false,
    upload_files => true,
    update_core => false,
    update_plugins => false,
    update_themes => false,
    install_plugins => false,
    install_themes => false,
    delete_themes => false,
    edit_plugins => false,
    edit_themes => false,
    edit_users => true,
    create_users => true,
    delete_users => true,
    unfiltered_html => true,
    bp_moderate => true

    #190987
    danbp
    Participant

    @seeingblues2,

    i just tested bp default data as super-admin on a 2013 theme. Normally, super-admin can go and do anything, huh ?

    Went to the dashboard, opened one of the private group i’m not member of and added me as group member.
    WHAT ?!!! The following users could not be added to the group ! Incredible !

    Always from the dashboard, I created a new group. This directed me to the frontend where i registered my new group.

    Back to the dashboard, and from the new group, i added 2 members without any problem.
    Normal !

    I reoppened the first group who haven’t accept my membership, and tried again. This time it worked.

    I logged me out, cleared my nav cache, and retested by processing the same as previous within another group. Again i received the failure message. But i regisred my change and suddenly my name appeared in the group name…. Tried several more, with different behaviour. Sometimes it works immediatly, sometimes after a few seconds, sometimes not at all.

    No idea what make this happen. Perhaps some latency issue because of the name suggestion tool ?
    Maybe that the Default data plugin doesn’t handle this properly ? Maybe its the theme ?

    I thought guess it’s a little bp bug.

    Please open a ticket with some details and link to this topic.

    #190978
    SeeingBlueS2
    Participant

    No this is not a fresh install, it’s been working fine for the longest time like stated previously
    No it is not a local server
    Doesn’t matter if the group is public, private or hidden. It’s the dashboard I’m having an issue with.

    When installing BP Default Data it still doesn’t work. Here are some images I hope helps you to understand the issue.

    So if you look at these images you see the groups and users imported correctly, but when going into the edit menu the members are not listed.

    #190954
    Cartographer
    Participant

    Hi @hnla,

    I respect your approach but I can’t totally agree :-). Anyway, your suggestion about the statement in a set of terms & conditions is the solution I all ready choose.

    Of course there is always @danbp’s solution about deactivating the private message component. It will “break” the community spirit though.

    Thank you all for sharing your thoughts on this 🙂

Viewing 25 results - 1,426 through 1,450 (of 3,869 total)
Skip to toolbar