issue/feed: include reply count as thread metadata
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 4 Feb 2020 20:23:45 +0000 (21:23 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 30 Nov 2020 21:01:31 +0000 (22:01 +0100)
Possibly useful values for derived layouts.
Might be shown in overviews of some RSS readers.

issue/feed.inc.php

index 1c4202e1d63b250efb83327f0a9c12db84f03dfb..f5cf847b5b517a5d9cb5e60c8bdad73cb5e95583 100644 (file)
@@ -4,7 +4,8 @@ print '<?xml version="1.0" encoding="utf-8"?>';
 $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'];
 ?>
 
-<feed xmlns="http://www.w3.org/2005/Atom">
+<feed xmlns="http://www.w3.org/2005/Atom"
+      xmlns:thr="http://purl.org/syndication/thread/1.0">
        <title>Lijtweg.nl</title>
        <subtitle>Meldingen</subtitle>
        <id><?= $siteref ?>/</id>
@@ -20,6 +21,7 @@ while ($row = $query->fetch()) {
                <title><?= $row->subject ?></title>
                <published><?= $row->created ?></published>
                <updated><?= $row->updated ?></updated>
+               <link rel="replies" thr:count="<?= $row->replycount ?>" />
        </entry>
 <?php
 }