P.S .: now you want to change the file feed-template ( file /site/plugins/feed/template.php ) to fit your needs. Later remember to your changes in this file!
After I delete some chars, it now only feeds the images.
The rest should be to change the first code line in the file /site/templates/feed.php.
It should filter and sort the images instead of the pages to fit the needs…
[Added:]
And add the date and time of the oldes image, that shall be shown, in a new line of the the file /site/templates/feed.php to know it in the template. Add in the template an “if” condition to only show newer images.
Well, as @Thiousi said, thanks for contributing. However, we need to get the last 10 images based on their modification date. You can’t get them like that based on pages, I’m afraid.
Mhm, interesting idea. I’ve adapted your code to my needs/wishes and now the feed looks and acts like it should, which is a major breakthrough! It isn’t a “valid” feed though, according to several Feed Validators. The main problem seems to be the pubdate/lastBuildDate, which aren’t in the correct format. The <lastBuildDate> currently looks like this:
<lastBuildDate>1469470566</lastBuildDate>
Instead of being in a format that complies with RFC-822 date-time. Same problem for the <pubDate>, which currently is empty. Is there anything I can do to get a “proper” date for each item and the feed itself? I’m currently reading up on this topic and comparing my template with the Podcast Plugin, but both seem to work with pages instead of files, so I’m stuck again. I’ll also have to yet test the feed on my live site, just to be shure this solution works fine with IFTTT/Feedly. Still, this helped a lot, thank you so much for this (possible) solution!
(By the way, the guid/id itself wasn’t as big of a problem, I simply changed
Thank you for your detailed contribution! As the others have mentioned, this doesn’t really work for my case, but it’s an excellent resource for anyone who “just” wants to get all images.
Okay, I’ve tested the feed with various validators, readers and IFTTT, everything works fine! Thank you so much for your help, @texnixe (and @Thiousi and @anon77445132)!
For anyone else interested in creating such a feed, here’s a quick guide:
Add a folder named feed to the directory of your choice, for example: /content/screenshots/feed
Create a .txt file inside this folder, name it however you want, for example: screenshotfeed.txt
Create a .php file inside template, name it after your .txt, for example: /site/template/screenshotfeed.php
Paste the following content into the .php file and edit it if necessary:
It’s a little messy right now and I will continue to tweak and edit it (including adding the <media: content> tag), but it works. Again, thank you so much for your help, I would’ve never figured this out by myself.