Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Members’ privacy: how can I hide members’ profiles? (31 posts)

Started 1 year ago by: George

  • Profile picture of George George said 1 year ago:

    Hi everybody
    I am thinking of creating a social network in which members (and their profiles as well) will be visible
    ONLY to other members who are already logged in, like in Facebook or Linked-In.
    I don’t want visitors to bump into my website and see a list of members.

    I know that there have been talks of introducing plug-ins that would address this problem, but it seems that no such plug-ins have yet materialized.

    So, can anyone suggest me how to modify the relevant BP code or any other action that can help me solve this problem?

  • Profile picture of nit3watch nit3watch said 1 year ago:
    <?php if (is_user_logged_in()) { ?>
    the thing you want to hide
    <?php } ?>
  • Profile picture of pcwriter pcwriter said 1 year ago:

    @italiancroydoner

    I know I`m tooting my own horn here ;-) , but my BuddyBuilder theme enables you to allow user access to individual BP components and WP pages/posts depending on logged-in/logged-out status. It also provides an optional Site Lockdown feature with/without a Splashpage on the frontpage, and an optional custom redirect page if Site Lockdown is enabled. See the bottom of the right-hand column on this page for all the Privacy features available: http://buddylite.com/buddybuilder-options/

  • Profile picture of George George said 1 year ago:

    Yes, pcwriter, I have visited the website, it offers quite a few worthwhile solutions, thanks a lot.

  • Profile picture of George George said 1 year ago:

    Hi there nit3watch
    Thanks a million for the reply.
    However (sorry, I am just a beginner), where precisely can I find this function, is_user_logged_in() , in which folder and in which file exactly?

  • Profile picture of George George said 1 year ago:

    And it seems to me that with the son to be released BP 1.3, there will be the in-built option to hide members’ profile from visitors (just like in Facebook or Linked-In), am I right?

  • I’ve been using S2member. Works Great! I think you’ll find it does what you need, and then some.

  • Profile picture of dude dude said 11 months ago:

    yeh George I too would like to know where to place that code tweek that nit3watch mentioned, I’m trying to keep my members profiles from being viewed by the public and tried with no avail to find where to write that edit.

  • Profile picture of pcwriter pcwriter said 11 months ago:

    @pinhit

    The file you want to edit is members/single/home
    Make sure you edit the file in your child-theme, not bp-default, or you will lose your changes when you update Buddypress.
    Add the following just after the opening padder div tag (change the text to suit your site/users):

    <?php if ( !is_user_logged_in() ) : ?>
        <p><?php echo 'You must be logged-in to view this content.' ?></p>
    <?php else : ?>

    Then add this to close the conditional just before the closing padder div tag:

    <?php endif; ?><!--is_user_logged_in-->

  • Profile picture of dude dude said 11 months ago:

    thanks for the reply @pcwriter

    If you don’t mind I need a little more assistance with this (as I’m not code savvy)

    how do I find this ‘child-theme’ you mention
    do I go to cpanel..? or in my admin (dashboard)

    Also, I do not want to restrict ‘members’ viewing, only their ‘profiles’

  • Profile picture of naijaping naijaping said 11 months ago:

    You have to create a child theme by yourself.

    follow this steps. http://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/

  • Profile picture of dude dude said 11 months ago:

    hi nailaping thanks for the reply
    ok im gonna attempt to this, although this may seem simple for some, believe me this is a big deal for me so ill need this broken down

    ok i go to cpanel, logged in..now where do i go to begin the child theme construction..?

    Home Directory
    Web Root (public_html/www)
    Public FTP Root (public_ftp)
    or
    Document Root for: ?

  • Profile picture of Hugo Hugo said 11 months ago:

    Where are your main site files located Kenny?

    Looking through those folders would answer the question. On a Web server you can only serve public site files from one directory the web root variously referred to as ‘www’, ‘public_html’. All your WP files are in there WP themes are held in the directory ‘themes’ under ‘wp-content’ you must create a new folder called whatever you like in that you create a file named style.css and in that file you add the text shown in the guide and from this point on you need to follow the guide explicitly.

    You might be wise to allocate a little time to a quick read of some of the basics in the WP codex which may help your understanding of how WP works ( child themes are a WP construct)

  • Profile picture of dude dude said 11 months ago:

    by jove i think ive got it !!

    put pcwriters code in and hey presto ;)

    I edited in ‘code edit’ instead of edit..is this right?

    well it worked anyway lol

    big thanks !!

  • Profile picture of dude dude said 11 months ago:

    just realised I need to restrict my members activity posts to registered users..

    using hindsight if I use the same code and principle in: members/single/activity/permalinks

    this will prevent non-members from viewing registered/logged-in members posts right..?

    or am I jumping the gun a bit here

    * update* – just tried it..didn’t work

    maybe I need to edit in: members/single/activity.php..? is this right anyone? thanks