[buddypress-trac] [BuddyPress] #4046: @mentions not working in blog posts

buddypress-trac noreply at wordpress.org
Thu Nov 7 11:51:56 UTC 2013

#4046: @mentions not working in blog posts
 Reporter:  will_c         |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Notifications  |     Version:  1.5.2
 Severity:  normal         |  Resolution:
 Keywords:                 |

Comment (by boonebgorges):

 It's *possible* that we might be able to do with the notifications table.
 The only trick then is that Activity would be dependent on Notifications,
 which is a sort of straightforward dependence that we try to avoid in most

 In any case, to store this info in Notifications, it'd look something like

 - When a blog post (or any other item, I guess) is stored, look for
 - For each one, store a notification item:
     'user_id' => $user_id,
     'item_id' => $mentioned_user_id,
     'component_name' => 'activity',
     'component_action' => 'mention',
     'secondary_item_id' => $activity_item_id
 - Mentions queries would then look like: `SELECT * FROM
 {$bp->notifications->table_name} WHERE item_id = {$displayed_user_id} AND
 component_name = 'activity' AND component_action = 'mention'. The results
 would then be fed into `bp_has_activities()`.
 - When the source items are updated, re-parse

 We'd need a proof-of-concept to show that this scales properly. It'd
 surely be better than the existing `LIKE` query, but it would still
 involve a number of queries.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4046#comment:3>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list