Skip to:
Content
Pages
Categories
Search
Top
Bottom

Request: Secured Profiles Option


  • energynet
    Participant

    @energynet

    It would be great if there were a way to keep prying eyes away from profiles and activity streams. I’m noticing that a number of bots as well as live spam artists are looking at profiles and activity streams of my bp users, and especially mine as the admin.

    Just as Facebook allows a member to hide their profiles and activity from the general public so that only friends can see what they are doing, this same option is urgently needed. That is its already available and I’ve not noticed how to use it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • a simple method of preventing access to profiles would be to open up members/single/profile/profile-loop.php and wrap the contents in a is_user_logged() check something like:

    `

    `
    and end the file with:
    `

    You need to be logged in to a view members profile

    `


    energynet
    Participant

    @energynet

    I could probably handle cutting and pasting the above code, however, I couldn’t find the file you suggest that I edit. Wasn’t located in buddypress’ plugin editor, nor do I have a file by that name located in bp-members plugin subfolder…

    ? bp-members plugin what’s that ? the file I refer to is in the bp-default theme and ought to exist in child themes


    energynet
    Participant

    @energynet

    Sorry, was looking inside the buddypress plugin rather than the theme.

    I’m not using the default theme but a compatible theme called elbee-elgee and am using a child theme that only has functions.php and style.css as editable files.

    As long as you ensure that the profile-loop file matches or doesn’t conflict with your themes markup – and it’s just the loop so should present no issues then make folders /members/single/profile/ in your child theme and copy the profile-loop into it and make the changes to that copied file.


    energynet
    Participant

    @energynet

    Not sure how to ensure that it doesn’t conflict. Here’s the EE profile-loop.php page below… Since I’m a bit new to this, I could certainly copy the original profile-loop.php file into the child theme, but am a bit concerned about me just pasting this new code into it as I don’t know how to identify conflicts other than it not working etc.
    `

    <div class="bp-widget “>

    <tr>

    `


    energynet
    Participant

    @energynet

    I tried to do your code on the Themes original profile-loop.php file. I got the following error back:

    Parse error: syntax error, unexpected $end in /wp-content/themes/elbee-elgee/members/single/profile/profile-loop.php on line 58

    Line 58 is the last line of the file where your code ” ” is…

    Please use backticks to surround pasted code – backticks rather than commas.

    As I can’t see what you actually tried I can only guess at what happened – did you copy verbatim what I posted as that will break it’s intended as an example of where the new lines need to be inserted so you don’t want the last line in that first block I showed as that already exists and you don’t want the first line of the second block as that too already exists.


    energynet
    Participant

    @energynet

    Thanks Hugo. That worked.

    I imagine it would be a bit trickier to do the same to block out activity streams the same way…

    Couldn’t hurt to ask though ? :)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Request: Secured Profiles Option’ is closed to new replies.
Skip to toolbar