After seeing this post from @manton tonight, I worked up a very quick-and-dirty WordPress filter to auto-linkify @-names in posts, now that Micro.blog will convert them into official Mentions: ardisson.org
After seeing this post from @manton tonight, I worked up a very quick-and-dirty WordPress filter to auto-linkify @-names in posts, now that Micro.blog will convert them into official Mentions: ardisson.org
@solari "Replies" as in comments made directly on your blog posts, or something else?
For the former, survey says…just on posts themselves—but it looks like it should be able to be hooked up to comment_save_pre to do the same thing for ccomments, e.g. just add
add_filter( 'comment_save_pre', 'linkify_microdotblog_names', 10, 1 );
right after the other add_filter statement.
@smokey That could work. However, I noticed replies to comments on the blog itself are not sent back to micro.blog. I can understand why given that not everyone on the blog are micro.blog users. Wonder if there's some sort of workaround for this as it would be pretty gratifying to be able to have replies on the blog synched up with micro.blog. This may be beyond @manton's vision for such, though.
@solari I think there's a way to have a native WordPress comment send a Webmention back to Micro.blog and show up in the conversation thread there. I still have not gotten around to digging into Webmentions, though. @colinwalker or @PhoneBoy might know.
@smokey Er, to apply that to WordPress comments, you need a separate-but-nearly idenetical function, too, because you have to run the regex on $comment instead of $content. Helps to re-read the code before commenting ;-)
@colinwalker @PhoneBoy @smokey I can confirm it works for the most part. It also automatically wraps the micro.blog username to the proper user in the comment box. The only caveat I'm seeing is when replying to comments on the blog, it doesn't quote the micro.blog username so I have to be sure to type "@username" (of person I am replying to) to be sure it triggers them. I'm sure that's a pretty easy fix though. The other caveat is for this to work, one must reply to an existing comment on the blog (rather than make a new one as it won't come through.
Sidenote: I noticed today's update to Webmentions WP plugin now recommends uninstalling webmentions-for-comments plugin, so I'm not sure what the deal is.
@solari @phoneboy @smokey The new version now includes the webmention for comments functionality.
@colinwalker @phoneboy @smokey Ah gotcha, I'll try mucking about with it later tonight. Thanks for the heads up!
@colinwalker @phoneboy @smokey It looks like the updated webmentions plugin still doesn't seem to handle comments unless I turned webmentions-for-comments plugin back on then it worked. FYI.