I like to show the total number of favorites for each individual activity post next to the favorite button just like it shows the number of comments right next to the comment button. Is this possible to implement?
|
Unfortunately, it's not really feasible, based on the current implementation of activity favorites in BuddyPress. BP stores this data in a piece of usermeta called 'bp_favorite_activities', which is an array of activity ids. That makes it easy and fast to pull up a list of a given member's favorite activity items; but it makes it almost impossible to pull up a list of the members who have favorited a given activity item, since the data is stored in serialized arrays and can't be reliably or quickly queried properly. If this is something that your site really needs, you might consider writing a small plugin that does the following:
I bet this would be a very popular plugin if you wrote it up and made it publicly available. If you wrote something really nifty, you might also consider submitting it as a BuddyPress patch. |
|||
|
|