Scroll to top

21/02/2023


2023/02/21#p1

0 comments: click to leave a comment

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
 
No comments yet
Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



Close