Opened 14 years ago
Closed 13 years ago
#2380 closed enhancement (fixed)
Blog posts don't recognize @username
Reported by: | paulhastings0 | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Blogs | 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)
#2
@
14 years ago
- Type changed from defect to enhancement
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
@
14 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
@
14 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.
Duplicate of #2372 - btw this is an enhancement rather than a defect as this currently isn't supported.