diff --git a/README.md b/README.md
index 8496b86..35caf4e 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,22 @@
-# TinyTinyRSS Fever API plugin
+# Tiny Tiny RSS Fever API plugin
See also [Fever API](fever-api.md)
## Description
-This plugin is an open source module for TinyTinyRSS which simulates the Fever API for reading the RSS Feeds with your Fever clients.
+This plugin is an open source module for Tiny Tiny RSS which simulates the Fever API for reading the RSS Feeds with your Fever compatible clients.
- - -
* Features
* Downloads
-* Supported/Tested Clients
+* Supported / Tested Clients
* Installation
+* Upgrading
* Debugging
-* Error reporting
+* Error Reporting
* License
-* Changelog
+* Change Log
## Features
@@ -25,18 +26,17 @@ Following Features are implemented:
* getting starred RSS items
* setting read marker for item(s)
* setting starred marker for item(s)
-* hot is **not** supported
+* hot links
## Downloads
+Like Tiny Tiny RSS, the Fever API plugin is a rolling release model and there are no periodic updates. You should use git to clone the repository to install the plugin. If you must manually download a snapshot of the master branch, you can click the [`Download ZIP`](https://github.com/DigitalDJ/tinytinyrss-fever-plugin/archive/master.zip) button.
-Please click on [```releases```](https://github.com/dasmurphy/tinytinyrss-fever-plugin/releases) button to download the latest stable version. Or click the [```Download ZIP```](https://github.com/dasmurphy/tinytinyrss-fever-plugin/archive/master.zip) button to download the edge version. ;)
+## Supported / Tested Clients
-## Supported/Tested Clients
-
-These clients should be working fine with this API emulation.
+These clients should work with Fever API emulation.
* [Reeder](http://reederapp.com) - iPhone
-* [Mr.Reader](http://www.curioustimes.de/mrreader/index.html) - iPad
+* [Mr.Reader](https://www.curioustimes.de/mrreader/index.html) - iPad
* [ReadKit](http://readkitapp.com) - OS X
* [Press](https://play.google.com/store/apps/details?id=com.twentyfivesquares.press) - Android
* [Meltdown](https://github.com/phubbard/Meltdown) - Android
@@ -44,82 +44,116 @@ These clients should be working fine with this API emulation.
## Installation
-**IMPORTENT** Enable external API access in your TinyTinyRSS installation! Otherwise this will not work!
+**IMPORTANT** You must enable the option `Enable API access` in your Tiny Tiny RSS preferences, for every user that wants to use the Fever plugin.
-Upload the ```fever``` folder in the ```plugins``` folder of your TinyTinyRSS installation. Enable the plugin in the preferences and set your password for the Fever API.
+Clone this repository to your `plugins.local` folder of your Tiny Tiny RSS installation.
-See [here](http://tt-rss.org/forum/viewtopic.php?f=22&t=1981) for more detailed informations.
+```
+$ cd tt-rss/plugins.local
+$ git clone https://github.com/DigitalDJ/tinytinyrss-fever-plugin fever
+```
+
+Enable the `fever` plugin in the Tiny Tiny RSS Preferences and reload.
+
+A `Fever Emulation` accordion pane should appear in your Tiny Tiny RSS preferences that will allow you to set a password for the Fever API. This is the password you will use to login to your Fever client, and should be different to your Tiny Tiny RSS login password.
+
+**IMPORTANT** The Fever API uses insecure unsalted MD5 hash. You should choose a disposable application-specific password and consider the use of HTTPS with your Tiny Tiny RSS installation. [Let's Encrypt](https://letsencrypt.org/) is an excellent resource to setup free SSL certificates for your HTTP server.
+
+Once the password is saved, you may login to your Fever client using your Tiny Tiny RSS username, the password you set in the previous step and the following server / endpoint URL:
+
+```
+https://example.com/tt-rss/plugins.local/fever/
+```
+
+See the [archived forum post](https://tt-rss.org/forum/viewtopic.php?f=22&t=1981) for more detailed and outdated information.
+
+## Upgrading
+
+Upgrading the Fever plugin follows the same steps as your Tiny Tiny RSS installation:
+
+```
+$ cd tt-rss/plugins.local
+$ git pull origin master
+```
## Debugging
In the file ```fever_api.php``` there are two flags for debugging at the beginning of the file.
-* ```DEBUG``` - set this to true to get a fever_debug.txt file in your root folder of the Tiny Tiny RSS installation.
-* ```DEBUG_USER``` - set this to the id (from ttrss_users) of your user you would like to always authenticate on your Tiny Tiny RSS installation. The authentication process is then skipped and the api gets always authentication.
-* ```DEBUG_FILE``` - set this to a filename that suits you for debugging this plugin if you need to.
+* ```DEBUG``` - set this to `TRUE` to produce extra debugging output. The location of the log is dependent on your PHP `log_errors` and `error_log` configuration directives.
+* ```DEBUG_USER``` - set this to the ID (from `ttrss_users` database table) of your user you would like to force authenticate with. The authentication process is then skipped and the API is always authenticated using this ID.
-## Error reporting
+## Error Reporting
-If you got problems with authentication after updating the plugin, try to reenter the password in TinyTinyRSS Fever plugin and save it again.
+If you have problems with authentication after updating the plugin, try to re-enter the password in Tiny Tiny RSS Fever plugin and save it again.
-When you find an error you may post it in the plugin [thread](http://tt-rss.org/forum/viewtopic.php?f=22&t=1981) or here on github.com in the [Issues](https://github.com/dasmurphy/tinytinyrss-fever-plugin/issues/) section.
+If you encounter any defects please [create an issue](https://github.com/DigitalDJ/tinytinyrss-fever-plugin/issues) on GitHub.
-Please include your debug log which should be cleaned up. Please remove your username, password and apikey before posting it.
+Please include any debug logs and any output from the Tiny Tiny RSS `Error Log` (located in Preferences > System).
+
+**IMPORTANT** Ensure logs are sanitized by removing any usernames, passwords and API keys.
+
+Also specify versions and variants of the software you are using:
+* Tiny Tiny RSS commit
+* PHP (and integration with your HTTP server, e.g. php-fpm)
+* Operating System (e.g. FreeBSD, Debian)
+* HTTP Server (e.g. Apache, nginx)
+* Database Server (e.g. MySQL, PostgreSQL)
## License
-Licensed under GNU GPL version 2 (<- I think this is okay for this plugin…)
+GPL-3.0
-## Changelog
+## Change Log
-v1.0-v1.2 - 2013/5/27 - DigitalDJ version
+v1.0-v1.2 - 2013/05/27
-* see this [thread](http://tt-rss.org/forum/viewtopic.php?f=22&t=1981) in the TinyTinyRSS Forum
+* see this [thread](https://tt-rss.org/forum/viewtopic.php?f=22&t=1981) in the Tiny Tiny RSS Forum
-v1.3 - 2013/6/27
+v1.3 - 2013/06/27
* fixed several bugs in json output from the plugin
* added a small fix for Mr.Reader 2.0 so it can complete loading of all items (see [FAQ](http://www.curioustimes.de/mrreader/faq/))
* added first Mr.Reader compatiblity without marking items read/starred
-* changed the field ```date_entered``` to ```updated``` for better reading experience
+* changed the field date_entered to updated for better reading experience
-v1.4 - 2013/6/28
+v1.4 - 2013/06/28
* fixed authentication with Mr.Reader 2.0
* fixed debugging options
-v1.4.1 - 2013/6/28
+v1.4.1 - 2013/06/28
* removed password from debug log file
-v1.4.2 - 2013/6/28
+v1.4.2 - 2013/06/28
-* changed the ```DEBUG_USER``` evaluation a little bit for disabling authentication without DEBUG = true
+* changed the DEBUG_USER evaluation a little bit for disabling authentication without DEBUG = true
-v1.4.3 - 2013/6/28
+v1.4.3 - 2013/06/28
-* added ```DEBUG_FILE``` to debug configuration
+* added DEBUG_FILE to debug configuration
* changed authentication call from Mr.Reader so that the reply is also uppercase, since the API-KEY comes in uppercase from clients
* fixed debug output while authentication in Mr.Reader with displaying the email adress
-v1.4.4 - 2013/6/28
+v1.4.4 - 2013/06/28
* updated the documentation
* changed some in saving the generated API-KEY - now its generated like in the Fever API documentation
-v1.4.5 - 2013/6/29
+v1.4.5 - 2013/06/29
* fixed the cannot mark/star bug in Mr.Reader
-v1.4.6 - 2014/1/15
+v1.4.6 - 2014/01/15
* merged bigger pull request to get more Fever API RSS Readers to work
-v1.4.7 - 2014/1/15
+v1.4.7 - 2014/01/15
-* added rewrite url function to module, since it was removed from tinytinyrss
+* added rewrite url function to module, since it was removed from Tiny Tiny RSS
-v2.0 - 2017/5/16
+v2.0 - 2017/05/16
* Fix ccache exceptions
* Sync previously copied snipets with latest tt-rss source
@@ -130,4 +164,10 @@ v2.0 - 2017/5/16
v2.1 - 2017/12/25
* Sync previously copied snipets with latest tt-rss source
-* Use PDO API for DB queries
\ No newline at end of file
+* Use PDO API for DB queries
+
+v2.2 - 2018/01/22
+
+* Fix finding config.php for obscure tt-rss installations
+* Use PDO query for saving passwords
+* Fix PHP5 only having single unserialize argument
\ No newline at end of file
diff --git a/fever/fever_api.php b/fever_api.php
similarity index 100%
rename from fever/fever_api.php
rename to fever_api.php
diff --git a/fever/index.php b/index.php
similarity index 96%
rename from fever/index.php
rename to index.php
index 78e0700..6954eb5 100644
--- a/fever/index.php
+++ b/index.php
@@ -1,67 +1,67 @@
-before("")) {
- if (method_exists($handler, 'index')) {
- $handler->index();
- }
- $handler->after();
- }
-
- header("Api-Content-Length: " . ob_get_length());
-
- ob_end_flush();
+before("")) {
+ if (method_exists($handler, 'index')) {
+ $handler->index();
+ }
+ $handler->after();
+ }
+
+ header("Api-Content-Length: " . ob_get_length());
+
+ ob_end_flush();
?>
\ No newline at end of file
diff --git a/fever/init.php b/init.php
similarity index 100%
rename from fever/init.php
rename to init.php