21/02/2023

2023/02/21#p1

0 comments: click to read or leave your own

The ability to reply to posts was something I wanted to add to PHP-MST from the beginning (and the wider ecosystem) but needed to flesh out the rest of the functionality beforehand. Today I felt that things were in a suitable position to implement it.

As posts in 'My Status Tool' instances are distributed by RSS there needed to be a way to indicate which post was being replied to. I felt that having an extra item level element was probably the best way to implement this so created a new 'mst' namespace. The namespace defines a single, optional item level element mst:reply which holds the permalink of the target post:

<mst:reply>https://colinwalker.blog/php-mst/page.php?t=1234567890</mst:reply>

When fetching a feed, the tool will check for this element and write it to the local storage file. Then, when displaying the timeline, it pulls that out along with the replies info from the local posts.

When logged in, each item will have a 'reply' icon next to it. An indicator of which items have replies will always be visible:

PHP-MST replies

Clicking the reply icon automatically adds the item permalink to a hidden input and takes you to the post form.

I'm thinking about refining this further but it works well enough for now.

Dev
 
Leave a reply



Cancel comment

You can also:

Reply by email Reply by email Send a webmention Send a Webmention

Colin Walker Colin Walker colin@colinwalker.blog