[buddypress-trac] [BuddyPress Trac] #5644: Activity Favorites: alternative management & new features

buddypress-trac noreply at wordpress.org
Thu May 15 23:51:13 UTC 2014


#5644: Activity Favorites: alternative management & new features
-------------------------+-----------------------------------
 Reporter:  imath        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  2.1
Component:  Activity     |    Version:  2.0
 Severity:  normal       |   Keywords:  has-patch 2nd-opinion
-------------------------+-----------------------------------
 I really like the "Favorite" activity feature, it helps "bookmarking" the
 activities that we are interested in.
 But i think as this [http://buddypress.org/support/topic/list-of-all-of-
 the-users-favorites/ bp.org forum] suggested, this feature would be even
 more powerful if we were able to have some complementary infos about
 favorites :
 - an easy way to figure out who favorited my activities or other members
 activities.
 - the amount of time an activity has been favorited by community members.
 - a new filter to list all favorited activities so that we have some way
 of "highlighting" the activities the community find interesting.

 So i've been working on a patch to include these suggested features. To
 achieve it, i've made some change in the way favorites are managed:

 1. Use bp_activity_add_meta to store favorited instead of the
 'bp_favorite_activities' user_meta.

 Thanks to this function introduced in 2.0, it's now possible to add as
 much as user ids for a meta_key and an activity_id, so i moved the user
 meta into an activity meta 'user_favorites'. One of the advantage is that
 the "favorite count bug" if a favorited activity is deleted does not exist
 anymore (See #4327, #3794)

 2. Use of an activity meta query to get user's favorites (compare => '=',
 value => user_id) or all users favorites (compare => 'exists')

 3. Adapt the UI to include a nav to toggle comments / favorites for each
 activity, see following screenshots ;)

 [[Image(https://farm8.staticflickr.com/7454/14194963945_6b72319107_z.jpg)]]

 If an activity hasn't been favorited yet, the favorites tab is not
 showing. By Default the "Replies" tab is active, to see the favorites,
 user needs to click on the corresponding tab

 [[Image(https://farm8.staticflickr.com/7398/14008358487_75477b4bd1_z.jpg)]]

 When the favorites tab is active, the user avatars who favorited the
 activity are listed.

 I haven't build the eventual upgrate routine yet, and this first patch
 surely need some improvements. What is your opinion about it ?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5644>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list