Hi,
With the help of your own FB-Like User Activity plug-in and the essential but buggy BuddyPress Activity Privacy plug-in (I resorted to using an older version and modifying it), I am finally close to achieving my dream of having proper social networking on my site. The only thing I need now is Activity as Wire, BUT I want it to be restricted to the poster’s friends only, rather than all logged-in users. How can I achieve this? I’m not afraid to hack the plug-in itself if necessary (please note that I need it to be BP1.8 compatible).
Hi Lee,
Thank you for asking. It is good to know you are finally nearing the completion.Please change this line
https://github.com/sbrajesh/bp-activity-as-wire/blob/master/bp-activity-as-wire.php#L44
to
if ( is_user_logged_in() && friends_check_friendship( bp_displayed_user_id(), bp_loggedin_user_id() ) && bp_is_user() && ! bp_is_my_profile() && ( ! bp_current_action() || bp_is_current_action( 'just-me' ) || bp_is_current_action( 'mentions' ) ) ) { bp_locate_template( array( 'activity/post-form.php' ), true ); }
Please do let me know if that works for you or not?
Thank you
BrajeshYes! It works! I’ll have to remember that friends_check_friendship( bp_displayed_user_id(), bp_loggedin_user_id() ) function – could come in handy for a lot of things.
BTW, the function you posted late last year to allow friends AND followers in the FB-Like User Activity Stream works as well (this was another holy grail for me). I’ve finally got the social networking on my site working the way I want!
You must be logged in to reply to this topic.