Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Show favourite count after each activity?


ousep
Participant

@ousep

Related question:

How do I show a list (or avatars) or users who’ve favourited the activity?

Here’s how I’m about to attempt to do it:

The first time an activity is favourited, I add a new row to wp_bp_activity_meta with activity_id, a meta_key named my_activity_faved_by, and the user_id as its meta_value.

With every additional favouriting, I update the corresponding meta_value with the new user_id at the end (using CONCAT?).

And in the frontend, I throw out a list of avatars of users who’ve favourited that activity.

Is that the best way about it, or is there something simpler I could be doing?

Skip to toolbar