Closed jasontucker closed 1 year ago
The way Semantic Linkbacks---I think (?), it's one of the other/older IndieWeb plugins---does this, is offer the option to group Likes and Reposts above regular comments, in a "facepile"---i.e., just people's avatars, kind of like Twitter likes?
See also https://github.com/janboddez/indieblocks/issues/25.
But a block is a good idea, hadn't really thought of that!
Thought we could use pre_get_comments
to add a meta query (webmention types are stored in comment metadata) and filter out likes and reposts, but meta queries screw up the comment count that is used to determine whether to show the comments block at all ...
What might work is use the comment type after all, and not just add webmention
but, e.g., also webmention_like
, etc.
Think the Webmention plugin just fetches them all and just skips over likes etc. it encounters, but I'm not sure if that wouldn't screw up pagination etc.
I think something like this would allow for people to see the activity relating to their content on the fediverse on their own website. True, Semantic Linkbacks has that facepile functionality so having something similar either in the form of a list of people that liked and reshared the content would be helpful or some other form of presenting the activity or even encouraging more of it.
Thought we could use
pre_get_comments
to add a meta query (webmention types are stored in comment metadata) and filter out likes and reposts, but meta queries screw up the comment count that is used to determine whether to show the comments block at all ...
Maybe we could try this here filter: https://github.com/pfefferle/wordpress-webmention/blob/4b1c1dfaf0480d7280afa0cd31fd297658926302/includes/class-comment-walker.php#L20
Latest GitHub version has a "Interactions" block for this.
To avoid comments showing up twice (i.e., as a regular comment and inside the Interactions block), enable the "Facepile" setting (under Settings > IndieBlocks > Webmention).
Caveat: the Interactions block won't display more than 25 reactions/avatars. I'll address that later on. Also, there's no preview inside the block editor (yet).
Quick screenshot (from https://indieblocks.xyz/stream/481ebec3c6/):
How it works:
Of note: It uses custom fields to filter out these mention types, and does not yet support the Webmention plugin. (Only "IndieBlocks'" webmentions are supported right now.)
I kinda want to still add a bit of CSS to make clear which avatars represent likes and which ones are reposts, etc. (There is currently no way of separating these out, i.e., having different "kinds" of "Facepile" blocks in one template.)
It is possible to change the heading to "Interactions" or "Engagement" or whatever else, or delete it.
Closing this as the Facepile block is now live (there’s smaller issues with it, still, but we’ll address those elsewhere).
Using the Full Site Editor to edit the comment section on my website I'm wondering if there is a good way to be able to separate the links and reshares so they can be stylized differently. I'm not sure about removing them from the other comments, maybe by comment type?