Giter Club home page Giter Club logo

feed-on-feeds's Introduction

About

FeedOnFeeds is a lightweight server-based RSS aggregator and reader, allowing you to keep up with syndicated content (blogs, comics, and so forth) without having to keep track of what you've read. Being server-based means all of your feeds and history are kept in one place, and being lightweight means you can install it pretty much anywhere without needing a fancy dedicated server or the like.

FeedOnFeeds was originally written by Steve Minutillo, this fork strives to stay up-to-date with changes to PHP while improving security, usability, multiuser support, and overall design.

For a complete list of contributors see the end of this file.

Features

  • subscribe to RSS feeds, reddits or YouTube channels
  • automatic updating for new entries
  • tagging of items or feeds
  • blacklist for unwanted item content
  • automatic item purging based on similarity (e.g. for getting rid of reposts)
  • different sidebar layouts
  • multi user capable
  • public compilations to share tagged content with others
  • search stored feed entries
  • Support for WebSub push notifications

YouTube integration

You can also use FeedOnFeeds for keeping track of your favourite YouTube channels without having to register with Google. Just activate the integrated YouTube plugin and add subscriptions to the channels you want to follow.

Reddit integration

While reddit doesn't advertise its RSS feeds you can still subscribe to reddits or users. An integrated Reddit plugin also tries to optimise the tiny thumbnail images served by the feed by replacing them with their original images if possible.

Installation

Requirements

FeedOnFeeds requires:

  • A web server running PHP
  • Access to a PDO-capable database (MySQL and SQLite are currently supported, and more are easy to add)
  • Specific features may require specific PHP extensions; it is highly recommended (but not required) that you have Xlib, cURL, and iconv.

To install, simply download a snapshot or clone from your favorite git repository. Then copy fof-config.php.dist to fof-config.php and edit it as appropriate for your setup. If you're on shared hosting, be sure to point FOF_DATA_PATH to somewhere in your home directory.

After that, point a web browser to install.php. For example, if you've installed FeedOnFeeds at http://example.com/fof, go to http://example.com/fof/install.php and then everything should be set up automatically.

Which database backend should I use?

Most of the time, SQLite is what you want. You should only consider MySQL if you're going to support many concurrent users (i.e. 10 or more people using the app simultaneously), as SQLite has much lower administrative overhead and makes it easier to port your data to a new webhost. This is the case even if you already have a working MySQL installation, and using SQLite will not interfere with your existing MySQL in any way.

Upgrading

Upgrading to a newer FeedOnFeeds usually just involves downloading a new snapshot or issuing a git pull, and then pointing a browser at install.php again.

Setting up automatic updates

FeedOnFeeds works best if you have it set to automatically update your feeds on-the-fly. The best way to do this is to set up a cron job like so:

 * * * * * curl http://example.com/fof/update-quiet.php

Don't worry about updates occurring too frequently - FeedOnFeeds will only update feeds which are due for an update. By default it will update every feed at most once an hour, but if you enable dynamic update intervals in the admin preferences, it will adjust the polling update for feeds based on their historical update frequencies.

If you're on Dreamhost, you can set up your cron job from the "goodies" section of the panel, and create a new cron job with the following:

  • Command to run: curl http://path/to/fof/update-quiet.php (setting the URL appropriately)
  • When to run: Custom
  • Minutes: Every 10 minutes
  • Hours: Every Hour
  • Day of month: Every Day
  • Month: Every Month
  • Day of Week: Every Day of Week

FAQ/troubleshooting

I'm having an error message during installation

couldn't open logfile /path/to/fof-data/fof-install.log

You need to set the value of FOF_DATA_PATH in fof-config.php. Also the file has to be writable for the web server process. You can set it to chmod 0777, or if you have root access you can do something like chown -R www-data /path/to/fof-data/ with www-data being the user under which the web server process is running. Depending on your configuration it may also be httpd or something else entirely. Check your server config for the correct user name.

Syntax error or access violation after "Cannot upgrade table: [CREATE TRIGGER ...

This occurs if you're on MySQL shared hosting and you don't have access to trigger creation, which is fairly common. Find the following in fof-config.php:

// define('SQL_NO_TRIGGERS', 1);

and remove the // at the beginning of the line.

How do I delete a feed?

In the feeds list there's a little menu symbol (≡). Hover over it and enjoy the context menu. If you've set the UI theme to "simple," just click on the d in the feed list.

Note: By unsubscribing from a feed you also delete all its tagged and starred items.

WebSub isn't working

Are you running it on a private network? WebSub can only work if your instance is visible to the Internet at large, and needs to be reachable using the hostname that you're connecting via.

If you're using the nginx webserver, you need to make sure that URL paths are passed correctly; for example, this should be how you enable PHP script support in your nginx configuration file:

        location ~ \.php(/|$) {
              include snippets/fastcgi-php.conf;

              # With php-fpm (or other unix sockets):
              fastcgi_pass unix:/var/run/php/php-fpm.sock;
       }

as opposed to the common, but incorrect, location of \.php$.

Legal

FeedOnFeeds is distributed under the GPL.

Contributors

ordered by date of first contribution:

feed-on-feeds's People

Contributors

fluffy-critter avatar iantearle avatar misel228 avatar romansixty avatar sorenpeter avatar thylacine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feed-on-feeds's Issues

PDO driver error ?

when i installing time .. ]
Its shows

Trouble encountered:
missing implementation for pdo driver
Trying to continue...

Error FATAL: couldn't open logfile /var/fof-data//fof-install.log

Hi, I can't install this on my server :(

Warning: fopen(/var/fof-data//fof-install.log): failed to open stream: No such file or directory in /srv/users/mypathsite/public/fof/fof-main.php on line 85
FATAL: couldn't open logfile /var/fof-data//fof-install.log

In fof-config.php I have added Database connection information (localhost, database name user password), chose a backend: define('USE_MYSQL', 1); and tried with define('SQL_NO_TRIGGERS', 1); commented and uncommented..doesn't work, always errors :(

I try to install it also on locale with xampp but nothing, same error code.

How can I install it? Thank you in advance

Needs PHP 5.3.6 or higher as it uses 'saveHTML' with a parameter in plugin/item_targets.php

Install needs to checck for PHP 5.3.6 or higher (or the plugin does? if they are meant to be separately installable?).

First Screen shows...

[« previous 50] [all-at-once]

Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in /usr/local/home/httpd/vhtdocs/idltd/apps/fof/plugins/item_targets.php on line 36

Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in /usr/local/home/httpd/vhtdocs/idltd/apps/fof/plugins/item_targets.php on line 36

Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in /usr/local/home/httpd/vhtdocs/idltd/apps/fof/plugins/item_targets.php on line 36

File authorship information needs updating

Most of the files in the source only refer to Steve Minutillo's contributions and copyright, but there are a bunch of other people who have worked on it since then. And how much of the original code even remains at this point?

We should probably go through and update the copyright of the source files to include all the contributors thereof to properly credit everyone. How does this even work with the GPL, anyway?

Configure plugins as default enabled/disabled

It would be nice if certain plugins could be set to be disabled by default. For example, the new plain.php plugin (which also really should be a render plugin, not an item plugin) makes the default RSS-reading experience quite unpleasant, and isn't a very good thing to have enabled by default for new users.

Some requests not using data compression (Accept-Encoding)

Seeing in our logs that FoF SimplePie is trying to get retrieve our RSS feed. That goes well.

Then it follows with two requests. Both are blocked, as we don't allow uncompressed requests (Accept-Encoding).

Is the handler that pulls in the / URL and the favicon using a different set of options (HTTP protocol is different as well)?

2024-04-18T18:12:43+00:00 200 1.2.3.4 "GET /feed/ HTTP/2.0" 21552 "https://linux-audit.com/feed/" "FoF SimplePie/1.5.6 (Feed Parser; http://simplepie.org; Allow like Gecko) Build/20230917075900" TLSv1.3/TLS_AES_256_GCM_SHA384 0.000 .
2024-04-18T18:12:43+00:00 426 1.2.3.4 "GET / HTTP/1.1" 16 "-" "FavIcon/1.0 (Caching Utility; ; Allow like Gecko) Build/20160424000000" TLSv1.3/TLS_AES_256_GCM_SHA384 0.000 .
2024-04-18T18:12:43+00:00 426 1.2.3.4 "GET /favicon.ico HTTP/1.1" 16 "-" "FavIcon/1.0 (Caching Utility; ; Allow like Gecko) Build/20160424000000" TLSv1.3/TLS_AES_256_GCM_SHA384 0.000 .

PHP 8.x

Running FoF with PHP 8.0 or 8.1 shows a lot of Deprecation warnings and one Fatal Error in the PDO Log class. It inherits the PDO class but the function signatures and return types don't match.

The fatal error can be avoided by changing the query function signature to this.

public function query($query, $fetchMode = null, ...$fetchModeArgs)

But before I march ahead I wanted to discuss if I should just "bend" the code to make the warnings go away or if you have better ideas for a refactoring.

Fatal error: Declaration of PDOLog::query($query) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false in /fof/classes/pdolog.php on line 20

Deprecated:  Return type of PDOLog::exec($statement) should either be compatible with PDO::exec(string $statement): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /fof/classes/pdolog.php on line 31

Deprecated:  Return type of PDOLog::query($query, ?int $fetchMode = null, mixed ...$fetchModeArgs) should either be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /fof/classes/pdolog.php on line 20

Deprecated:  Return type of PDOStatementLog::bindParam($parameter, &$variable, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null) should either be compatible with PDOStatement::bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /fof/classes/pdolog.php on line 51

Deprecated:  Return type of PDOStatementLog::bindValue($parameter, $value, $data_type = PDO::PARAM_STR) should either be compatible with PDOStatement::bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /fof/classes/pdolog.php on line 56

Deprecated:  Return type of PDOStatementLog::execute($input_parameters = null) should either be compatible with PDOStatement::execute(?array $params = null): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /fof/classes/pdolog.php on line 61

Call to a member function error() on a non-object

Keep seeing this appear in my error logs, cant figure out the source of the error. Can anyone help?

PHP Fatal error: Call to a member function error() on a non-object in /var/www/fof-main.php on line 929

Themeing

What is the consensus of theming? Providing a theme folder to contain:

header.php
items.php
render.php
footer.php

I have already ported the JS to jquery. Just working on the latest functions.

YouTube replacement messes up playlist embeds

If a feed embeds a YouTube playlist rather than a video, the player replacement thing screws up the embed.

Example feed with some recent content of those sorts: https://novembeat.com/feed

original item:

    <entry>
        <title>Works: Gero Takke / Commodore Amigo</title>
        <link href="https://novembeat.com/works/79-Gero-Takke-Commodore-Amigo" rel="alternate" type="text/html" />
        <published>2020-11-16T09:59:15-08:00</published>
        <updated>2020-11-16T09:59:15-08:00</updated>
        <id>urn:uuid:1a19bf35-9b59-58ea-80ff-05584896a490</id>
        <author><name>Gero Takke</name></author>
        <content type="html"><![CDATA[

<p><a href="https://www.youtube.com/playlist?list=PLXwJEk7hkqgdLX4PeBL9xAZ8V0CevVC3g">YouTube playlist</a>:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLXwJEk7hkqgdLX4PeBL9xAZ8V0CevVC3g" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>






        ]]></content>
        <category term="https://novembeat.com/" label="Novembeat" />
        <category term="https://novembeat.com/works/" label="Works" />
        
        

    </entry>

Replaced item:

<div class="body"><p><a href="https://www.youtube.com/playlist?list=PLXwJEk7hkqgdLX4PeBL9xAZ8V0CevVC3g" target="_blank">YouTube playlist</a>:</p>
<div class="youtube-video" data-ytid="videoseries" style="background-image: url('//i.ytimg.com/vi/videoseries/hqdefault.jpg')" onclick="embed_youtube(this);"></div></div>

After clicking on the image:

<div class="body"><p><a href="https://www.youtube.com/playlist?list=PLXwJEk7hkqgdLX4PeBL9xAZ8V0CevVC3g" target="_blank">YouTube playlist</a>:</p>
<iframe src="https://www.youtube.com/embed/videoseries?autoplay=1&amp;rel=0" allowfullscreen="1" width="560" height="315" frameborder="0"></iframe></div>

Looks like fvicon.com is down

fvicon.com is down and is serving up bad results. We should figure out a way to make it so that if the images are corrupt they don't override the default icon. Maybe it's time to handle the todo in fof_get_favicon...

Any idea what happened to fvicon, anyway?

Update automatically?

I'd like to update via cron. What command do I need?
Maybe: php update-single?feed=1

X-WAV podcast enclosures don't play.

(This didn't work in the original either - so its probaby never worked)

It shows a 'click for podcast' image and says (audio/x-wav) but clicking stuff does nothing...

FoF is double-decoding entities where it shouldn't be

Example item causing problems:
https://beesbuzz.biz/blog/6128-Federated-identity-with-Atom-and-WebSub

In the feed, all of the content is included in a CDATA segment, and its entities are then further encoded correctly, e.g.:

<h3>Favored approach: In-plain-sight encryption</h3>
<p>My favored approach to providing private content on feeds is to have private items be encrypted.</p><p>Every reader has a public and private key-pair; the publisher knows their public key.</p><p>Every protected entry has a randomly-generated symmetric nonce key, and the private content (<code>&lt;title&gt;</code>, <code>&lt;content&gt;</code>, enclosure links, etc.) are stored in the encrypted payload. (<code>&lt;id&gt;</code> probably needs to remain public for various reasons, and things like <code>&lt;published&gt;</code>/<code>&lt;updated&gt;</code>/<code>&lt;link rel=&quot;alternate&quot;&gt;</code> probably should as well.) The public payload can also include something like:</p><div class="highlight"><pre><span></span><span class="nt">&lt;title&gt;</span>Private content<span class="nt">&lt;/title&gt;</span>
<span class="nt">&lt;content</span> <span class="na">type=</span><span class="s">&quot;text/html&quot;</span><span class="nt">&gt;</span>This is a private entry. Check the original site to see if you have access, or use a feed reader which supports the [insert clever name here] protocol.<span class="nt">&lt;/content&gt;</span>
</pre></div>
<p>This nonce key is then added to the item, encrypted using every trusted reader&rsquo;s public key. (So, if there are 10 followers who are allowed to see the entry, there are 10 copies of the nonce key, each one encrypted by the public key.) Of course the CMS can manage this in any number of ways (e.g. having one or more protected groups of friends who can see things, with specific per-user inclusions and exclusions).</p><p>When a reader gets an encrypted entry, it tries to decrypt each of the encrypted nonce keys with its private key, and then when it gets a valid nonce key it uses that to decrypt the payload.</p><p>The plus sides to this approach:</p>

Unfortunately, something is decoding those &lt;s et al, and so FeedOnFeeds (or maybe it's SimplePie) renders it as HTML, thus horking the layout of the rest of the entry:

<h3>Favored approach: In-plain-sight encryption</h3>
<p>My favored approach to providing private content on feeds is to have private items be encrypted.</p>
<p>Every reader has a public and private key-pair; the publisher knows their public key.</p>
<p>Every protected entry has a randomly-generated symmetric nonce key, and the private content (<code><title></code>, <code><content></code>, enclosure links, etc.) are stored in the encrypted payload. (<code><id></code> probably needs to remain public for various reasons, and things like <code><published></code>/<code><updated></code>/<code><link rel="alternate"></code> probably should as well.) The public payload can also include something like:</p>
<div class="highlight"><pre><span></span><span class="nt"><title></span>Private content<span class="nt"></title></span>
<span class="nt"><content</span> <span class="na">type=</span><span class="s">"text/html"</span><span class="nt">></span>This is a private entry. Check the original site to see if you have access, or use a feed reader which supports the [insert clever name here] protocol.<span class="nt"></content></span>
</pre></div>
<p>This nonce key is then added to the item, encrypted using every trusted reader’s public key. (So, if there are 10 followers who are allowed to see the entry, there are 10 copies of the nonce key, each one encrypted by the public key.) Of course the CMS can manage this in any number of ways (e.g. having one or more protected groups of friends who can see things, with specific per-user inclusions and exclusions).</p>
<p>When a reader gets an encrypted entry, it tries to decrypt each of the encrypted nonce keys with its private key, and then when it gets a valid nonce key it uses that to decrypt the payload.</p>
<p>The plus sides to this approach:</p>

screen shot 2018-11-29 at 1 33 39 pm

(Also it seems that class attributes aren't getting filtered out either, I could have sworn the existing sanitization was supposed to do that...)

'j' paging-down gets stuck on longer entries now

I don't know how much of this is due to the recent-ish migration away from prototype or some of the styling changes or whatever, but now when I press j on some feed items, the paging stops working partway through.

One example entry that causes the problem is https://99percentinvisible.org/episode/raccoon-resistance/ which is on a blog which often has quite long posts. It seems that all of their posts cause this problem. On some of them my browser's developer console gets errors like:

TypeError: null is not an object (evaluating 'itemElement.nextElementSibling.id') on fof.js:261

I haven't looked at the new code yet but I suspect there's been some DOM change which causes this quirk.

It happens in Safari, and I haven't tried it in other browsers yet.

J paging (to mark and skip to the next entry) continues to work, at least.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.