Rant of the moment:

How long has WordPress been out? like 20 something years? And the native comments still don’t have threaded inline forum style replies…

All I want is for individual comments to be like pagelets where I can inject some code and make and replies inline instead of needing to create a whole new post. This would be a hell of a lot easier with threaded comments allowing custom post types. But now I gotta do what @janboddez did and wrestle with making a micro plugin… And my knowledge of PHP is rustier than the hood of an ’88 Chevy Corsica right now.

Someone correct me if there’s a better way I could be doing this…

10 responses
  1. From what I recall the WordPress webmention plugin uses a fake reply page (which redirects to the actual comment) so that an endpoint can correctly pull out the right info, otherwise things get confused and the right h-card etc. don’t get picked up. I copied that for my site. Are you using that or your own solution?

    1. Starrwulfe.xyz

      Nah, nothing like that– I’m trying to figure out if I can even do it by hand coding everything with u-in-reply-to h-cite, in-reply-to tags like an animal, then running the webmention parser trigger by hand to get it sent out. If there’s a programmatic way to do this once I can understand what’s being done, let me know!

      1. I think the problem might be that endpoints don’t know where to pull from. All you’re doing with a webmention is parsing a URL, if that URL doesn’t adequately define where the mention is the endpoint will likely get screwed up.

        Take this for example:

        https://starrwulfe.xyz/2024/01/wordpress-comments-fail/?replytocom=634

        The ?replytocom=634 parameter tells your WordPress where to scroll to but an endpoint will just see https://starrwulfe.xyz/2024/01/wordpress-comments-fail meaning that it will start looking from the top of the page and pull the wrong details.

        I think you need to be sending a more literal URL like https://starrwulfe.xyz/2024/01/wordpress-comments-fail/#comment-635 to explicitly tell an endpoint where to look.

        I could be wrong.

        1. I see. I think it’s also about telling it where to stop too? As in if I’m missing a div tag somewhere, it’ll put the whole last part of the post in there too.
          There’s no good markup examples to tell me how to do this, so it’s just been nothing but cat & mouse…

    2. Starrwulfe.xyz

      I finally got the coding figured out; here’s the last webmention that I had to type into the backend in code mode on my side:

      https://starrwulfe.craft.me/DhLT4d0YcuTbDW

      …Even just making a template that could pop up here would help but WordPress still has no custom post types for the comments section, so I’ll need a crash course in PHP and whatever else makes things happen on this side…

  2. Yeah, it’s messy. That’s why I’ve not gone deeper than a single level of replies in comments 😉 I could try to work it out at some point but 🤷‍♂️

    1. ok one laaaaassstt test here. @pfefferle updated the AP plugin to include threaded comments; @janboddez contributed so that might mean webmentions are also covered too? Please? 🤞🏾

      BTW, My site keeps getting your reply-to post as https://colinwalker.blog/reply.php?c=3:1965. That’s not right– Am I parsing something wrong here?

      🗣️💬👍🚀♻️ ➡️

  3. Does the new comment mod with web Bridgy and federate comments back into ATProto? (No because @snarfed.org hasn’t turned on 🌉 → 🦋 support…🔜❓)

  4. WordPress native comments can definitely be threaded! That option has been there for a long time, it may just not be on by default. Settings => Discussion, “Other comments settings” section, “Enable threaded (nested) comments.”

    1. Ryan Barrett

      WordPress native comments can definitely be threaded!

      That part, yes — but the ability for ActivityPub to nest into the comment threads… Maybe not. I know it spazzes out on me after 2 levels of comments.

      🗣️💬👍🚀♻️ ➡️