Scroll to top

Mar 23, 2021

The home on the web of Colin Walker.
Find out more on /about, say /EHLO, or tune in to the daily RSS feed.

Mar 23, 2021#p2

After yesterday's eureka moment regarding comment replies I think I'm there and am now able to have webmentions sent when a comment is replied to.

I created a new reply template – a pseudo-page for comments, just like the WordPress plugin, that uses a similar principle to linking directly to comments. When a reply is submitted the source URL is built from the post number and comment ID giving a false address in the format /reply.php?date=2021-03-21&c=2:333 (21st March, second post, comment ID 333).

The reply template takes the details from the URL and builds the comment page so that a remote endpoint can extract the required details. If the link is followed it auto-redirects to the actual comment in situ and I have tweaked the comment linking function to work for links in both 'post:comment number' and 'post:comment ID' formats.

I've done some testing and, fingers crossed, it seems to work okay – it had better as it is live. Replies locally are okay and I have also replied to a couple of webmentions from micro.blog and they have shown up correctly.