[buddypress-trac] [BuddyPress] #1427: followers

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Jan 29 16:17:42 UTC 2010


#1427: followers
------------------------+---------------------------------------------------
Reporter:  erich73      |       Owner:                
    Type:  enhancement  |      Status:  assigned      
Priority:  major        |   Milestone:  Future Release
Keywords:               |  
------------------------+---------------------------------------------------
Changes (by benfremer):

  * owner:  benfremer =>


Comment:

 Here is the psuedocode that should make it take like 1-2 hours to
 implement if you know your way around, or like 1 hour or less if you're
 Andy...I'm also going to un-assign this from myself as I'm waiting until
 the 1.2 final release before I dive into the latest code base.

 Here is the pseudocode:



 By changing the function get_friend_user_ids in buddypress/bp-friends/bp-
 friends-classes.php to not require  is_confirmed on the friends check
 query, we can instead get a list of who the user is following. This
 function is called by the various feeds to pull up the activity of who
 your friends are. Changing it this way would pull up the activity of who
 you are following (whether or not they have followed / friended you back).
 There is also apparently a wrapper function of this in buddypress/bp-
 friends.php that might need to get tweaked.

 An example setup would be to change it from


 function get_friend_user_ids( $user_id, $friend_requests_only = false,
 $assoc_arr = false )
 to
 function get_friend_user_ids( $user_id, $friend_requests_only = false,
 $followers_only = false, $following_only = false, $assoc_arr = false )


 The "Follow" (previously "Add as Friend") button SQL logic would need to
 be updated so that if the person declined to follow back before, that it
 checks if the person is following them and updates that row that the
 friendship is now confirmed, rather than making another friend / follow
 request. It should also probably send the "SoAndSo is following you"
 notification / email that I don't think happens currently if friend
 requests are just accepted rather than initiated. Alternatively, that
 email notification and Request creation (in the friends panel) could be
 turned off if "Followers" system is turned on.

 Turning the system to Following instead of Friending can be set in the
 admin with an option. People who follow eachother would be counted as
 friends.

 Having an option to show Friends and/or following and/or possibly also
 followers feeds I think would be the ideal implementation for optionality.

 Friend Request buttons would need their text optionally output different.
 On the requests page, the button text would change to "Follow Back"
 instead of "Accept", and "Not Now" instead of "Decline".

 The additional feeds are just copies of the Friend activity feeds, with a
 different function parameter called on get_friend_user_ids depending on if
 it is wanting to get a list of id's the person following or followers.

 Some terminology would also need to be changed in a few places (if you
 look for where it says "friends" for instance...etc. Also, I would like to
 see an option that shows "Followers" as well as who the person is
 "Following" where there are currently friends lists instead. Also,
 obviously, the tab name for those feeds would change from "My Friends", to
 "Following" and/or "Followers".

 This doesnt' affect the table schema at all. If the followers system is
 switched back to a friending system, it goes back to a friends system,
 with people who were following eachother are back to being set as friends.

 This no-tables-changing setup is also nice also because it keeps the
 "is_friends" function working just fine for various checks BP, like
 private messaging and group invitations.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1427#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list