AmauryPi great!
I can help with testing, will do that tomorrow.

By the way, please tell me your paypal address. If you don't want to share it here, just send it to [EDITED].

    Awesome guys !
    I don't need the RSS feature (at least for now), but I appreciate @deseven's offer and the fact that he wants it to be open-source.
    Congratulations to @AmauryPi too, I am sure it is a great work done.

    I tested it in real conditions and everything is working well (here using FreshRSS on a test server, yes I know the UI is in French but you got the idea).

    There's two troughs I wanted to share.

    1. Currently, the RSS feeds are served using the current logged in user permissions. But most RSS readers will not be logged-in. I thought of a (long) token added to the feeds URLs to identify the user, long so it's very hard to guess (security is a concern here because this gives access to private sections...). Something like the GitHUb private RSS feeds URLs (see the link). If there are downsides I missed, don't hesitate to mention them!

    2. Currently, I made the /rss, /atom, /t/{tg}/rss, /t/{tag}/atom feeds behave just like the discussions list: one entry per discussion, the discussion with the last post being the first. This means when a discussion is updated, according to the RSS reader point of view, an item of the feed is moved. Maybe we should ensure that an item is instead added, keeping one entry per post? I think it would be better and I will change that that way, but if you disagree, feel free to answer.

    Another thing, regarding to the per-discussion and per-user feeds, I currently can't make them accessible due to the Flarum routes being too unspecific. /d/{id}/rss is being captured by the internal route to a specific post, as example, so I cannot add my feed. I'll see what I can do (excluding the “change URL” option). This said they are indeed implemented, just, inaccessible.

    P.-S. I implemented both RSS and Atom feeds, but you really should use Atom feeds as they are better, include authorship attributes, etc.


    deseven By the way, please tell me your paypal address. If you don't want to share it here, just send it to [EDITED].

    You can find it here, or a direct donation button here (page in French but the names doesn’t change ?). I don't write it directly to avoid spambots scanning web pages. Thanks! ?

      AmauryPi Currently, the RSS feeds are served using the current logged in user permissions.

      Yeah, but if user isn't logged in they should be served with a guest permissions. That's totally ok and makes sense.
      Private feeds can be a nice addition, but that's kinda out of scope for the initial task. It's up to you whether to do it or not ?

      AmauryPi Maybe we should ensure that an item is instead added, keeping one entry per post?

      Not sure about that. What's the point to have two or more entries for the same discussion? I thought that discussion feeds are about discussions, not about posts. I believe that when someone adds a new post to a discussion, you have to change the item's pubDate, leaving its guid intact (because it's the same discussion, not a new one). It's up to the feed reader how to interpret the fact that pubDate has changed.

      AmauryPi Another thing, regarding to the per-discussion and per-user feeds, I currently can't implement them due to the Flarum routes being too unspecific.

      Well, it's not a big deal. You can change it to something like that:
      /rss - for global feed
      /rss/t/{tag} - for tag feed
      /rss/d/{id} - for discussion feed
      /rss/u/{user} - for user feed
      Just keep everything in one style and that's it ?

      By the way, i've sent you $40. Please confirm ?

        AmauryPi P.-S. I implemented both RSS and Atom feeds, but you really should use Atom feeds as they are better, include authorship attributes, etc.

        Yeah, i know, that's for compatibility only. It's nice to have different options.

        deseven It's up to the feed reader how to interpret the fact that pubDate has changed.

        I actually made some research, looks like many feed readers have an option to show updated items (something like "Mark updated articles as new"). Some of them do that by default.

        deseven I believe that when someone adds a new post to a discussion, you have to change the item's pubDate, leaving its guid intact (because it's the same discussion, not a new one).

        Well, it's the current behavior so I'll keep it as is ?

        deseven Well, it's not a big deal. You can change it to something like that:
        /rss - for global feed
        /rss/t/{tag} - for tag feed
        /rss/d/{id} - for discussion feed
        /rss/u/{user} - for user feed
        Just keep everything in one style and that's it ?

        That's clever, don't know why I didn't think about this. I'll use that!

        deseven By the way, i've sent you $40. Please confirm ?

        I confirm. Thanks again! ?

        deseven Private feeds can be a nice addition, but that's kinda out of scope for the initial task. It's up to you whether to do it or not ?

        I probably will.

          AmauryPi deseven Private feeds can be a nice addition, but that's kinda out of scope for the initial task. It's up to you whether to do it or not ?

          I probably will.

          If you end up doing this ensure you don't add the user's Auth token but create your own tokens.

          Also, I read over your code and you did a good job!

            deseven changed the title to [DONE] RSS/Atom extension for $40 .

            Davis I was going to generate a dedicated token anyway (I agree using the auth token is not a good idea).

            AmauryPi Well, it's the current behavior so I'll keep it as is ?

            If you don't agree with me, please feel free to argue. I'm trying to use common sense, but of course there may be flaws in my logic.

            Thanks for your work ?

            jordanjay29 @AmauryPi If you want you can put up a new topic in Extensions (assuming you're making this public).

            I will as soon as I will consider the extension to be completely ready (there still a few things to do in my opinion). That was planned ? .

            Davis Also, I read over your code and you did a good job!

            That was not (by far) my first PHP project, but my first Flarum one, so I'm glad I made something correct. Thanks c: .

              AmauryPi That was not (by far) my first PHP project, but my first Flarum one, so I'm glad I made something correct. Thanks c:

              I'm sure youll find more difficulty in the Javascript side of things. I wish you good luck!

              I've taken the liberty of removing the email address from a couple of the preceding posts.

              In the future, I recommend exchanging such information via Gitter private chat, etc.

                Dominion I've taken the liberty of removing the email address from a couple of the preceding posts.

                There is no need for that, i do understand the consequences. I have my own private mail server which uses many anti spam techniques (DNSBL, greylisting, etc) and i don't really suffer from spam problems. My email address is available in many places for many years.
                But still, thanks for your care.

                  deseven Keep in mind that what we are trying to do here is not just for you, but for all community members here at Flarum. Not everyone has system capability to safeguard their emails just like yours.

                  We always encourage members to exchange emails privately.

                  So.
                  I tried to live-update the RSS links as the page change, but sadely it's not possible due to this 2007 Firefox bug. If this bug is one day fixed, I'll re-add the code (stored in Git) for autodiscovery live update. For now, the links are in the static HTML code, to avoid this. At least it work for the first page and RSS readers.

                  This said, it's complete now I think. And translated in French, too.

                  And I noticed I forgot to give this pretty useful information (but that can be guessed):

                  composer require amaurycarrade/flarum-ext-syndication

                  Feel free to report any problem ? .

                   
                  Update: extension official thread published.

                    AmauryPi @deseven Thank you to both sides of this, I have been really interested in seeing an RSS feature in Flarum.

                    I just gave this a shake and wanted to report back with some debug info:

                    Notice: Undefined index: PATH_INFO in /home/user/public_html/forum/vendor/amaurycarrade/flarum-ext-syndication/src/Listener/AddClientAssetsAndLinks.php on line 83
                    

                    Thank you again!

                      f0r3v3r Try an update, I probably fixed that in the last release (0.1.2). Thanks for reporting this (wasn't happening on my two test servers, both PHP integrated one and Apache).