• Resolved bp-help

    (@bphelp)


    Great idea for a plugin but it doesn’t appear that it is working. I installed and activated the plugin and then logged out as admin, then logged in as test1 which is a subscriber in browser one. Then in another browser lets call it browser two, I logged in as test2 which is also a subscriber. Then in browser one, test1 goes to the members directory and blocks test2. Test2 then disappears off of test1’s members directory. Then in browser two, on test2’s members directory test1 is still visible, when test2 clicks on test1, test2 is taken to test1’s personal activity, then test2 clicks test1’s profile tab and test2 is taken to test1’s profile. Basically the plugin is ineffective! I understand this is in beta but I would never tag a beta plugin as 1.0 it would be more appropriate to name it 0.10 or something to that effect. Also your repository is a mess. You have an assets folder inside of your trunk. That folder shouldn’t even be there. The items in that assets folder belong in the assets directory of your repository. Because of this people who download your plugin are also downloading the assets which is unnecessary and only bloats the plugin. Also because of this your screenshots are not showing up on the plugins page. I hope you can eventually get this plugin working and I would also like to see it block items from the activity stream as well. Please don’t take this as negative, I just wanted to make you aware. Good luck!
    Edit: I am using latest version of WP/BP and bp-default theme. No other plugins or custom code as it is a fresh install.
    https://www.ads-software.com/plugins/bp-you-are-blocked/

Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author myCred

    (@designbymerovingi)

    No worries.

    I found the bp_get_member_latest_update filter which I then used to return an empty string if the user (with the activity) is blocking you as the viewer.

    Plugin Author myCred

    (@designbymerovingi)

    Found the issue.
    It seems I updated the wrong file and left out the function.

    In the bpb-queries.php file there should be in the end:

    /**
     * Block Activity View
     * If the user listed is blocking us, we will not be able to see
     * their activities.
     * @since 1.0
     * @version 1.0
     */
    function bpb_remove_activity_if_blocked( $update_content ) {
    	global $members_template;
    
    	if ( !empty( $members_template->member->id ) )
    		$user_id = $members_template->member->id;
    	elseif ( bp_displayed_user_id() )
    		$user_id = bp_displayed_user_id();
    
    	$users_list = bpb_get_blocked_users( $user_id );
    	if ( in_array( get_current_user_id(), $users_list ) && ! current_user_can( 'edit_users' ) )
    		return '';
    
    	return $update_content;
    }
    Thread Starter bp-help

    (@bphelp)

    Are you going to update the repository?

    Plugin Author myCred

    (@designbymerovingi)

    It should be updated

    Thread Starter bp-help

    (@bphelp)

    Still not working on the activity stream! ??

    Plugin Author myCred

    (@designbymerovingi)

    I only added the filter for the members list page. I see what you mean now, I forgot the activity page. I’ll get on it.

    Plugin Author myCred

    (@designbymerovingi)

    I pushed though one solution for now. It is not perfect and could use a better approach but it is 4AM here so I will not get it done without some sleep. Any suggestions on how to best filter activities are welcomed. When it comes to members it was pretty easy to just hook into BP_User_Query but I cant find a way to do similar stuff with activities.

    Thread Starter bp-help

    (@bphelp)

    Hi Gabriel,
    You are getting closer to resolving this. However there is no need for the block buttons on the activity or the message. Basically the entire activity needs to be blocked as if the person did not exist. That means no avatar of a blocked person, no message that they are blocked, and no button. I hope you get some rest and can figure this out when rested. You are so close to nailing this down. Thanks for the update, it definitely shows you are working to get this plugin on track!

    Plugin Author myCred

    (@designbymerovingi)

    After some good night sleep, I immediately found a way to hook in and filter our activities ??
    So in Beta5. You can no longer see activities you block and activities of those who block you.

    Also added a constant to allow you to set which capability to check for when it comes to who can not be blocked (as in admins).

    Thread Starter bp-help

    (@bphelp)

    Hi Gabriel,
    I just tested beta5 and if you block a persons activity then the person that has been blocked can no longer see the person who blocked them’s activity. However I noticed some strange behavior. After the person that has blocked someone starts posting on the sitewide activity stream, it makes the person who was blocked activity stream start to diminish to where the person that was blocked does even see their own activities or the other users activities that has not blocked them. Your getting closer though. Hopefully you can find a fix! Thanks!

    Thread Starter bp-help

    (@bphelp)

    @gabriel
    Hi just checking to see if you have found a solution to my last reply above? Thanks!

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Doesn't seem to work!’ is closed to new replies.