Closed fatuuse closed 1 year ago
This button to an external feed reader is not exactly a format. Maybe something like this instead?
diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php
index 9ee4aeea..5b634820 100644
--- a/formats/HtmlFormat.php
+++ b/formats/HtmlFormat.php
@@ -53,6 +53,20 @@ class HtmlFormat extends FormatAbstract
'linkTags' => $linkTags,
'uri' => $extraInfos['uri'],
'buttons' => $buttons,
+ 'readers' => [
+ [
+ 'name' => 'FreshRSS',
+ 'url' => 'https://feeds.example.net/i/?c=feed&a=add&url_rss=' . $url
+ ],
+ [
+ 'name' => 'Feedly',
+ 'url' => 'https://feedly.com/i/subscription/feed/' . $url,
+ ],
+ [
+ 'name' => 'Inoreader',
+ 'url' => 'https://www.inoreader.com/?add_feed=' . $url,
+ ],
+ ],
'items' => $items,
]);
// Remove invalid characters
diff --git a/templates/html-format.html.php b/templates/html-format.html.php
index f8aa4b61..5464f8a2 100644
--- a/templates/html-format.html.php
+++ b/templates/html-format.html.php
@@ -37,6 +37,12 @@
<button class="rss-feed"><?= $button['value'] ?></button>
</a>
<?php endforeach; ?>
+
+ <?php foreach ($readers as $reader): ?>
+ <a href="<?= e($reader['url']) ?>">
+ <button><?= $reader['name'] ?></button>
+ </a>
+ <?php endforeach; ?>
</div>
Or perhaps a new format FeedReaderFormat
which is an html page with links to a bunch of feed readers?
The buttons in the top är great! Maybe they could be populated from custom settings in config file?
I made a button of the html-format page to add a atom url to FreshRSS without copy paste.
Feel free to use!