Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 15 years ago

#2380 closed enhancement (fixed)

Blog posts don't recognize @username

Reported by: paulhastings0 Owned by:
Priority: normal Milestone: 1.6
Component: Blogs Version:
Severity: normal Keywords:
Cc:

Description

WPMU 2.9.2
BP 1.2.3

When leaving a comment on a blog post @username is recognized and automatically converted into a link to @username's profile. However when writing a blog post @username is not recognized and it just comes out as plain text.

An example is here with @kasian4110.

Change History (9)

#1 @DJPaul
16 years ago

  • Resolutionduplicate
  • Status newclosed

Duplicate of #2372 - btw this is an enhancement rather than a defect as this currently isn't supported.

#2 @boonebgorges
16 years ago

  • Type defectenhancement

I don't think this is a duplicate of #2372 - that ticket is about BP notifications, while this one is about autolinking.

The answer is to put

add_filter( 'the_content', 'bp_activity_at_name_filter' );

somewhere. paulhastings0, it'll work in bp-custom.php.

#3 @r-a-y
16 years ago

@boonebgorges - I'm afraid a little bit more needs to be done. That filter will only parse usernames and add the @ sign in front of the username.

A notification function will need to be created and hooked when a blog comment is posted.

@paulhastings0 - View the bp_activity_at_message_notification() in bp-activity-notifications.php for hints, then combine with Boone's filter snippet above.

#4 @boonebgorges
16 years ago

Good point @r-a-y. It's even more complicated, because if the mention is early enough in the blog post (so that it gets included in the activity excerpt) a notification will get sent with the activity item. So you can either hook something to blog posts that cancels out the activity notification, or fix activity items so that they cache the entire content. Presumably the same thing will happen with forum posts, btw.

#5 @DJPaul
16 years ago

  • Resolution duplicate
  • Status closedreopened

Oops!

#6 @apeatling
16 years ago

  • Milestone 1.2.41.3

#7 @boonebgorges
16 years ago

  • Milestone 1.31.4

#8 @boonebgorges
15 years ago

(In [5609]) Run the_content through bp_activity_at_name_filter so that @-mentions are recognized. See #2380

#9 @boonebgorges
15 years ago

  • Keywords @username blog posts removed
  • Resolutionfixed
  • Severitynormal
  • Status reopenedclosed

In r5609, I added auto-linking for blog posts. For the broader issue of sending notifications, see #2372.

Note: See TracTickets for help on using tickets.