aboutsummaryrefslogtreecommitdiff
path: root/docs/en
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-10-31 18:15:47 +0100
committerGravatar GitHub <noreply@github.com> 2019-10-31 18:15:47 +0100
commit3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch)
tree6a3f3f74899801abdca00546e213dfdc141c53cf /docs/en
parent82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff)
parentfcae48f313d399050cb15f37a8a73ae52fc67796 (diff)
Merge pull request #2599 from FreshRSS/dev1.15.0
FreshRSS 1.15
Diffstat (limited to 'docs/en')
-rw-r--r--docs/en/admins/01_Index.md22
-rw-r--r--docs/en/admins/02_Installation.md147
-rw-r--r--docs/en/admins/02_Prerequisites.md40
-rw-r--r--docs/en/admins/03_Installation.md23
-rw-r--r--docs/en/admins/03_Updating.md90
-rw-r--r--docs/en/admins/04_Frequently_Asked_Questions.md2
-rw-r--r--docs/en/admins/04_Updating.md31
-rw-r--r--docs/en/admins/05_Backup.md55
-rw-r--r--docs/en/admins/05_Configuring_email_validation.md70
-rw-r--r--docs/en/admins/06_LinuxInstall.md116
-rw-r--r--docs/en/admins/07_LinuxUpdate.md97
-rw-r--r--docs/en/admins/08_FeedUpdates.md56
-rw-r--r--docs/en/admins/09_AccessControl.md24
-rw-r--r--docs/en/admins/10_ServerConfig.md103
-rw-r--r--docs/en/contributing.md4
-rw-r--r--docs/en/developers/01_First_steps.md120
-rw-r--r--docs/en/developers/03_Backend/05_Extensions.md130
-rw-r--r--docs/en/users/03_Main_view.md16
-rw-r--r--docs/en/users/05_Configuration.md2
-rw-r--r--docs/en/users/06_Fever_API.md14
-rw-r--r--docs/en/users/06_Mobile_access.md7
-rw-r--r--docs/en/users/07_Frequently_Asked_Questions.md2
22 files changed, 803 insertions, 368 deletions
diff --git a/docs/en/admins/01_Index.md b/docs/en/admins/01_Index.md
index 45ed02c0f..49cd247d5 100644
--- a/docs/en/admins/01_Index.md
+++ b/docs/en/admins/01_Index.md
@@ -1,9 +1,19 @@
-# FreshRSS administration
+# FreshRSS Administration
-Learn how to install, update and backup FreshRSS and how to use the command line tools.
+Learn how to install, update, and backup FreshRSS, as well as how to use the command line tools.
-* [Install FreshRSS](02_Installation.md) on your server
-* [Update your installation](03_Updating.md) to the latest stable or dev version
-* [The command line interface](https://github.com/FreshRSS/FreshRSS/tree/master/cli) can be used to administrate feeds and users
-* [Automatic feed updates](https://github.com/FreshRSS/FreshRSS#automatic-feed-update) using cron is the preferred way to get the latest feeds entries
+1. [Prerequisites](02_Prerequisites.md): What you'll need to run FreshRSS
+2. [General installation instructions](03_Installation.md) for FreshRSS
+3. [Update your installation](04_Updating.md) to the latest stable or development version
+
+## Tutorials and Examples
+
+* [Backing up FreshRSS](05_Backup.md)
+* [Installation on Debian 9/Ubuntu 16.04](06_LinuxInstall.md)
+* [Updating on Debian 9/Ubuntu 16.04](07_LinuxUpdate.md)
+* [Setting Up Automatic Feed Updating](08_FeedUpdates.md)
+* [Access Control](09_AccessControl.md)
+* [Apache/Nginx configuration files](10_ServerConfig.md)
+* [Using the command line interface (CLI)](https://github.com/FreshRSS/FreshRSS/tree/master/cli)
+* [Configuring the email address validation](05_Configuring_email_validation.md)
* [Frequently asked questions](04_Frequently_Asked_Questions.md)
diff --git a/docs/en/admins/02_Installation.md b/docs/en/admins/02_Installation.md
deleted file mode 100644
index 8cb15edb4..000000000
--- a/docs/en/admins/02_Installation.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Server requirements
-
-FreshRSS is a web application. This means you’ll need a web server to run it. FreshRSS requirements are really low, so it could run on most shared host servers.
-
-You need to verify that your server can run FreshRSS before installing it. If your server has the proper requirements and FreshRSS does not work, please contact us to find a solution.
-
-| Software | Recommended | Works also with |
-| ----------- | ---------------- | ----------------------------- |
-| Web server | **Apache 2** | Nginx |
-| PHP | **PHP 5.5+** | PHP 5.3.8+ |
-| PHP modules | Required: libxml, cURL, PDO_MySQL, PCRE and ctype. <br>Required (32-bit only): GMP <br> Recommanded: JSON, Zlib, mbstring, iconv, ZipArchive <br> *For the whole modules list see [Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837/Docker/Dockerfile-Alpine#L7-L9)* | |
-| Database | **MySQL 5.5.3+** | SQLite 3.7.4+ |
-| Browser | **Firefox** | Chrome, Opera, Safari, or IE11+ |
-
-## Important notice
-
-FreshRSS **CAN** work with PHP 5.3.8+. To do so, we are using specific functions available in the [''password_compat'' library](https://github.com/ircmaxell/password_compat#requirements) for the form authentication.
-
-
-# Getting the appropriate version of FreshRSS
-
-FreshRSS has three different releases or branches. Each branch has its own release frequency. So it is better if you spend some time to understand the purpose of each release.
-
-## Stable release
-
-[Download](https://github.com/FreshRSS/FreshRSS/archive/master.zip)
-
-This release is done when we consider that our goal concerning the new features and the stability is reached. It could happen that we make two releases in a really short time if we have a really good coding pace. In reality, we are all working on our spare time, so we release every few months. But this version is really stable, tested thoroughly and you should not face any major bugs.
-
-## Development release
-
-[Download](https://github.com/FreshRSS/FreshRSS/archive/dev.zip)
-
-As its name suggests, it is the working release for developers. **This release is unstable!** If you want to keep track of enhancements on a daily basis, you can use it. But keep in mind that you need to follow the branch activity on Github (via [the branch RSS feed](https://github.com/FreshRSS/FreshRSS/commits/dev.atom) for instance). Some say that the main developers use it on a daily basis without problem. They may know what they are doing…
-
-# Apache installation
-
-This is an example Apache virtual hosts configuration file. It covers HTTP and HTTPS configuration.
-
-```
-<VirtualHost *:80>
- DocumentRoot /var/www/html/
-
- #Default site...
-
- ErrorLog ${APACHE_LOG_DIR}/error.default.log
- CustomLog ${APACHE_LOG_DIR}/access.default.log vhost_combined
-</VirtualHost>
-
-<VirtualHost *:80>
- ServerName rss.example.net
- DocumentRoot /path/to/FreshRSS/p/
-
- <Directory /path/to/FreshRSS/p>
- AllowOverride AuthConfig FileInfo Indexes Limit
- Require all granted
- </Directory>
-
- ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
- CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
-
- AllowEncodedSlashes On
-</VirtualHost>
-
-<IfModule mod_ssl.c>
- <VirtualHost *:443>
- ServerName rss.example.net
- DocumentRoot /path/to/FreshRSS/p/
-
- <Directory /path/to/FreshRSS/p>
- AllowOverride AuthConfig FileInfo Indexes Limit
- Require all granted
- </Directory>
-
- ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
- CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
-
- <IfModule mod_http2.c>
- Protocols h2 http/1.1
- </IfModule>
-
- # For the API
- AllowEncodedSlashes On
-
- SSLEngine on
- SSLCompression off
- SSLCertificateFile /path/to/server.crt
- SSLCertificateKeyFile /path/to/server.key
- # Additional SSL configuration, e.g. with LetsEncrypt
- </VirtualHost>
-</IfModule>
-```
-
-# Nginx installation
-
-This is an example nginx configuration file. It covers HTTP, HTTP, and php-fpm configuration.
-
-_You can find simpler config file but they may be incompatible with FreshRSS API._
-
-```
-server {
- listen 80;
- listen 443 ssl;
-
- # HTTPS configuration
- ssl on;
- ssl_certificate /etc/nginx/server.crt;
- ssl_certificate_key /etc/nginx/server.key;
-
- # your server’s URL(s)
- server_name rss.example.net;
-
- # the folder p of your FreshRSS installation
- root /srv/FreshRSS/p/;
-
- index index.php index.html index.htm;
-
- # nginx log files
- access_log /var/log/nginx/rss.access.log;
- error_log /var/log/nginx/rss.error.log;
-
- # php files handling
- # this regex is mandatory because of the API
- location ~ ^.+?\.php(/.*)?$ {
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- # By default, the variable PATH_INFO is not set under PHP-FPM
- # But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var!
- fastcgi_param PATH_INFO $fastcgi_path_info;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location / {
- try_files $uri $uri/ index.php;
- }
-}
-```
-
-A step-by-step tutorial is available [in French](http://www.pihomeserver.fr/2013/05/08/raspberry-pi-home-server-installer-un-agregateur-de-flux-rss-pour-remplacer-google-reader/).
-
-# Security
-
-Make sure to expose only the `./p/` folder on the web, the other directories contain personal and sensitive data.
-See the Apache and nginx config examples above.
-
-**TODO**
diff --git a/docs/en/admins/02_Prerequisites.md b/docs/en/admins/02_Prerequisites.md
new file mode 100644
index 000000000..0fc0c9a11
--- /dev/null
+++ b/docs/en/admins/02_Prerequisites.md
@@ -0,0 +1,40 @@
+# Server Requirements
+
+FreshRSS is a web application. This means you’ll need a web server to run it. FreshRSS requirements are really low, so it should run on most shared host servers, or any old computer you happen to have on hand.
+
+You need to verify that your server can run FreshRSS before installing it. If your server has the proper requirements and FreshRSS does not work, please contact us to find a solution.
+
+| Software | Recommended | Also Works With |
+| ------------- | ----------------------- | ----------------------- |
+| Web server | **Apache 2** | Nginx |
+| PHP | **PHP 7+** | PHP 5.6+ |
+| PHP modules | Required: libxml, cURL, JSON, PDO\_MySQL, PCRE and ctype. <br>Required (32-bit only): GMP <br> Recommanded: Zlib, mbstring, iconv, ZipArchive <br> *For the whole modules list see [Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/master/Docker/Dockerfile-Alpine#L7-L9)* | |
+| Database | **MySQL 5.5.3+** | SQLite 3.7.4+, PostgreSQL 9.5+ |
+| Browser | **Firefox** | Chrome, Opera, Safari, or IE11/Edge[^1] |
+
+
+# Getting the appropriate version of FreshRSS
+
+FreshRSS has three different releases or branches. Each branch has its own release frequency. So it is better if you spend some time to understand the purpose of each release.
+
+## Stable release
+
+[Download](https://github.com/FreshRSS/FreshRSS/archive/master.zip)
+
+This version is really stable, tested thoroughly, and you should not face any major bugs.
+
+Stable releases are not released on a set schedule. Rather, they are released whenever we consider that our goal for new features is reached, and the software is stable.
+
+It could happen that we make two releases in a short span of time if we have a really good coding pace. In reality, we are all working on the project in our spare time, so a new release usually occurs every few months.
+
+## Development version
+
+[Download](https://github.com/FreshRSS/FreshRSS/archive/dev.zip)
+
+As its name suggests, the development version is the working codebase, intended for developers. **This release may be unstable!**
+
+If you want to keep track of the most recent enhancements or help the developers with bug reports, this is the branch for you. If you use this version, please keep in mind that you need to follow the branch activity on Github (via [the branch RSS feed](https://github.com/FreshRSS/FreshRSS/commits/dev.atom), for instance), and manually pull new commits.
+
+Some say that the main developers use this branch on a daily basis without problem. They may know what they are doing…
+
+[^1]: IE11/Edge may not support all features found in FreshRSS on other browsers
diff --git a/docs/en/admins/03_Installation.md b/docs/en/admins/03_Installation.md
new file mode 100644
index 000000000..e999a69ad
--- /dev/null
+++ b/docs/en/admins/03_Installation.md
@@ -0,0 +1,23 @@
+# General Installation Instructions
+
+These instructions are intended as general guidelines for installing FreshRSS. You may wish to consult the [Step-by-step Tutorial for installing FreshRSS on Debian 9/Ubuntu 16.04](06_LinuxInstall.md) if you don't currently have a web server and don't have experience setting one up.
+
+Before you begin, make sure that you've read the [prerequisites](02_Prerequisites.md) for running FreshRSS. As shorthand, `.` refers to the directory to which your FreshRSS installation lives.
+
+1. If the computer you're running on is not currently running a web server, you'll first need to install and configure a web server, a version of PHP, and an appropriate database, as listed in the prerequisites. [Example Apache and Nginx configuration files can be found here](10_ServerConfig.md).
+
+2. Download your chosen version of FreshRSS, or fetch it via git. It's advisable that you put FreshRSS in `/usr/share/`, and symlink the `./p/` folder to the root of your web server.[^1]
+
+3. Give ownership of the FreshRSS folder to your web server user (often `www-data`). Give group read permissions to all files in `.`[^2], and group write permissions to `./data/`.
+
+4. Install needed PHP modules.
+
+5. Create a database for FreshRSS to use. Note the username and password for this database, as it will be needed during installation!
+
+6. Using your supported web browser of choice, navigate to the address you've installed your server to complete the installation from the GUI.[^3]
+
+[^1]: Make sure to expose only the `./p/` folder to the Web, as the other directories contain personal and sensitive data.
+
+[^2]: If you wish to allow updates from the web interface, also give group write permissions to this folder.
+
+[^3]: Assuming your server is `http://example.net`, this address could be `http://example.net/p/` if you didn't follow our previous advice about not exposing the `./p/` folder.
diff --git a/docs/en/admins/03_Updating.md b/docs/en/admins/03_Updating.md
deleted file mode 100644
index 4e1fdfa5d..000000000
--- a/docs/en/admins/03_Updating.md
+++ /dev/null
@@ -1,90 +0,0 @@
-
-First things first: we recommend to create a backup before updating:
-
-```sh
-# Perform all commands below in your FreshRSS directory:
-cd /usr/share/FreshRSS
-
-tar -czvf FreshRSS-backup.tgz .
-```
-
-The update process depends on your installation type, see below:
-
-
-## Using the web admin panel
-
-Change to your installation at http://localhost/FreshRSS/p/i/?c=update and hit the "Check for new updates" button.
-
-If there is a new version you will be prompted again.
-
-
-## Using git
-
-If you manage FreshRSS via command line, then installing and updating FreshRSS can be done via git:
-
-```sh
-# If your local user does not have write access, prefix all commands by sudo:
-sudo ...
-
-# Perform all commands below in your FreshRSS directory:
-cd /usr/share/FreshRSS
-
-# Use the development version of FreshRSS
-git checkout -b dev origin/dev
-
-# Check out a specific version of FreshRSS
-# See release names on https://github.com/FreshRSS/FreshRSS/releases
-# You will then need to manually change version
-# or checkout master or dev branch to get new versions
-git checkout 1.7.0
-
-# Verify what branch is used
-git branch
-
-# Check whether there is a new version of FreshRSS,
-# assuming you are on the /master or /dev branch
-git fetch --all
-git status
-
-# Discard manual changes (do a backup before)
-git reset --hard
-# Then re-delete the file forcing the setup wizard
-rm data/do-install.txt
-
-# Delete manual additions (do a backup before)
-git clean -f -d
-
-# Update to a newer version of FreshRSS,
-# assuming you are on the /master or /dev branch
-git pull
-
-# Set the rights so that your Web server can access the files
-# (Example for Debian / Ubuntu)
-chown -R :www-data . && chmod -R g+r . && chmod -R g+w ./data/
-```
-
-
-## Using the zip archive
-
-Perform all commands in your FreshRSS directory:
-```sh
-cd /usr/share/FreshRSS
-```
-
-Commands intended to be executed in order (you can c/p the whole block if desired):
-
-```sh
-wget https://github.com/FreshRSS/FreshRSS/archive/master.zip
-unzip master.zip
-cp -R FreshRSS-master/* .
-chown -R :www-data . && chmod -R g+r . && chmod -R g+w ./data/
-rm -f master.zip
-rm -f data/do-install.txt
-rm -rf FreshRSS-master/
-```
-
-Short explanation of the commands above:
-* Download the latest version and unzip it
-* Overwrite all your existing files with the new ones
-* Fix possible permission issues
-* Cleanup by deleting the downloaded zip, the file forcing the setup wizard and the temporary directory
diff --git a/docs/en/admins/04_Frequently_Asked_Questions.md b/docs/en/admins/04_Frequently_Asked_Questions.md
index 8a2ead73e..cbabc3867 100644
--- a/docs/en/admins/04_Frequently_Asked_Questions.md
+++ b/docs/en/admins/04_Frequently_Asked_Questions.md
@@ -1,3 +1,5 @@
+# Frequently Asked Questions
+
We may not have answered all of your questions in the previous sections. The FAQ contains some questions that have not been answered elsewhere.
## Promoting a user to admin
diff --git a/docs/en/admins/04_Updating.md b/docs/en/admins/04_Updating.md
new file mode 100644
index 000000000..30a6ba1f7
--- /dev/null
+++ b/docs/en/admins/04_Updating.md
@@ -0,0 +1,31 @@
+# Backing Up and Updating FreshRSS
+
+The following is general procedure; [specific commands for Linux may be found here](07_LinuxUpdate.md).
+
+## Backing Up
+
+Before you update to a new version of FreshRSS, it's always a good idea to backup your current installation. Simply make an archive of your FreshRSS directory, which can be restored if needed by following the "Updating from a Zip Archive" section at the bottom of this document.
+
+## Updating From the Web
+
+If you enabled web updates from your installation (see footnote 2 in [installation](03_Installation.md)), you can log into your admin account, select the update option under Administration in the Settings dropdown found on the top right of the webpage, and press the "Check for new updates" button. Alternatively, this page can be reached directly at `http://<your_server>/i/?c=update`.
+
+This will check for and apply a new Stable version, if available.
+
+## Updating Using git
+
+If you installed FreshRSS using git, you can update, change branches, or switch to a specific version from the command line.
+
+Generally, the update procedure via git works as follows:
+
+1. Making sure you're in your FreshRSS install directory, and fetch updates.
+2. Checkout the branch you wish to use.
+3. Perform a hard reset to discard local changes.
+4. Delete manual additions. Be sure to move your backup out of the directory before doing this step!
+5. Pull the new version.
+6. Remove `./data/do-install.txt`.
+7. Re-set group read (and write, if you wish) permissions on all files in `.`, and group write permissions on `./data/`.
+
+## Updating from a Zip Archive
+
+Updating to a new version from a zip archive is always an option. Begin by unzipping the archive into your FreshRSS directory, overwriting old files, remove `./data/do-install.txt`, and finally re-set group read (and write, if you wish) permissions on all files in `.` and group write permissions on `./data/`.
diff --git a/docs/en/admins/05_Backup.md b/docs/en/admins/05_Backup.md
new file mode 100644
index 000000000..f3ead0cca
--- /dev/null
+++ b/docs/en/admins/05_Backup.md
@@ -0,0 +1,55 @@
+# Backup
+
+This tutorial demonstrates commands for backing up FreshRSS. It assumes that your main FreshRSS directory is `/usr/share/FreshRSS`; If you've installed it somewhere else, substitute your path as necessary.
+
+## Installation Backup
+
+Do this before an upgrade.
+
+### Creating a Backup
+
+First, Enter the directory you wish to save your backup to. Here, for example, we'll save the backup to the user home directory
+```
+cd ~
+```
+
+Next, we'll create a gzipped tar archive of the FreshRSS directory. The following command will archive the entire contents of your FreshRSS installation in it's current state.
+```
+tar -czf FreshRSS-backup.tgz -C /usr/share/FreshRSS/ .
+```
+
+And you're done!
+
+### Restoring from a Backup
+
+First, copy the backup previously made into your FreshRSS directory
+```
+cp ~/FreshRSS-backup.tgz /usr/share/FreshRSS/
+```
+
+Next, change to your FreshRSS directory
+```
+cd /usr/share/FreshRSS/
+```
+
+Extract the backup
+```
+tar -xzf FreshRSS-backup.tgz
+```
+
+And optionally, as cleanup, remove the copy of your backup from the FreshRSS directory
+```
+rm FreshRSS-backup.tgz
+```
+
+## Backing up Feeds
+
+### Feed list Export
+You can export your feed list in OPML format either from the web interface, or from the [Command-Line Interface](https://github.com/FreshRSS/FreshRSS/blob/master/cli/README.md).
+
+### Saving Articles
+
+To save articles, you can use [phpMyAdmin](https://www.phpmyadmin.net/) or MySQL tools, where `<db_user>` is your database username, `<db_host>` is the hostname of your web server containing your FreshRSS database, and `<freshrss_db>` is the database used by FreshRSS:
+```
+mysqldump --skip-comments --disable-keys --user=<db_user> --password --host <db_host> --result-file=freshrss.dump.sql --databases <freshrss_db>
+```
diff --git a/docs/en/admins/05_Configuring_email_validation.md b/docs/en/admins/05_Configuring_email_validation.md
new file mode 100644
index 000000000..fe073545c
--- /dev/null
+++ b/docs/en/admins/05_Configuring_email_validation.md
@@ -0,0 +1,70 @@
+# Configuring the email address validation
+
+FreshRSS can verify that users give a valid email address. It is not configured
+by default so you'll have to follow these few steps to verify email addresses.
+
+It is intended to administrators who host users and want to be sure to be able
+to contact them.
+
+## Force email validation
+
+In your `data/config.php` file, you'll find a `force_email_validation` item:
+set it to `true`. An email field now appears on the registration page and
+emails are sent when users change their email.
+
+You can also enable this feature directly in FreshRSS: `Administration` >
+`System configuration` > check `Force email addresses validation`.
+
+## Configure the SMTP server
+
+By default, FreshRSS will attempt to send emails with the [`mail`](https://www.php.net/manual/en/function.mail.php)
+function of PHP. It is the simpler solution but it might not work as expected.
+For example, we don't support (yet?) sending emails from inside our official
+Docker images. We recommend to use a proper SMTP server.
+
+To configure a SMTP server, you'll have to modify the `data/config.php` file.
+
+First, change the `mailer` item to `smtp` (instead of the default `mail`).
+
+Then, you should change the `smtp` options like you would do with a regular
+email client. You can find the full list of options in the [`config.default.php` file](/config.default.php).
+If you're not sure to what each item is corresponding, you may find useful [the
+PHPMailer documentation](http://phpmailer.github.io/PHPMailer/classes/PHPMailer.PHPMailer.PHPMailer.html#properties)
+(which is used by FreshRSS under the hood).
+
+## Check your SMTP server is correctly configured
+
+To do so, once you've enabled the `force_email_validation` option, you only
+need to change your email address on the profile page and check that an email
+arrives on the new address.
+
+If it fails, you can change the environment (in `data/config.php` file, change
+`production` to `development`). PHPMailer will become more verbose and you'll
+be able to see what happens in the PHP logs. If something's wrong here, you'll
+probably better served by asking to your favorite search engine than asking us.
+If you think that something's wrong in FreshRSS code, don't hesitate to open a
+ticket though.
+
+Also, make sure the email didn't arrive in your spam.
+
+Once you're done, don't forget to reconfigure your environment to `production`.
+
+## Access the validation URL during development
+
+You might find painful to configure a SMTP server when you're developping and
+`mail` function will not work on your local machine. For the moment, there is
+no easy way to access the validation URL unless forging it. You'll need to
+information:
+
+- the username of the user to validate (you should know it)
+- its validation token, that you'll find in its configuration file:
+
+```console
+$ # For instance, for a user called `alice`
+$ grep email_validation_token data/users/alice/config.php | cut -d \' -f 4 -
+3d75042a4471994a0346e18ae87602f19220a795
+```
+
+Then, the validation URL should be `http://localhost:8080/i/?c=user&a=validateEmail&username=alice&token=3d75042a4471994a0346e18ae87602f19220a795`
+
+Don't forget to adapt this URL with the correct port, username and token.
diff --git a/docs/en/admins/06_LinuxInstall.md b/docs/en/admins/06_LinuxInstall.md
new file mode 100644
index 000000000..d31758556
--- /dev/null
+++ b/docs/en/admins/06_LinuxInstall.md
@@ -0,0 +1,116 @@
+# Installation on Debian 9/Ubuntu 16.04
+
+This tutorial will give you step-by-step commands to install the latest stable release of FreshRSS with Apache and MySQL using git. It's always recommended that you [backup your installation](05_Backup.md) before updating
+
+Please note: Commands need to be run as an administrator; either perform the following from a sudo shell (`sudo -s`) or use an administrator account.
+
+## Part 1: Setting up and configuring the LAMP stack
+Begin by installing Apache, and enable Apache modules needed for FreshRSS
+```
+apt install apache2
+a2enmod headers expires rewrite ssl
+```
+
+Then, you have to configure Apache. You can create a file in `/etc/apache2/sites-available`, based on [our example configuration file](10_ServerConfig.md). Once you're done, create a symbolic link from this file to the `sites-enabled` folder:
+
+```
+ln -s /etc/apache2/sites-available/freshrss.conf /etc/apache2/sites-enabled/freshrss.conf
+```
+
+Next, install PHP and the necessary modules
+```
+apt install php php-curl php-gmp php-intl php-mbstring php-sqlite3 php-xml php-zip
+```
+
+Install the PHP module for Apache
+```
+apt install libapache2-mod-php
+```
+
+Next, we'll need to install and configure MySQL. Install MySQL components like so:
+```
+sudo apt install mysql-server mysql-client php-mysql
+```
+
+MySQL must now be started:
+```
+service mysql-server start
+```
+
+We'll need to configure MySQL.
+**Note:** As you've just installed mysql, there will be no root password; simply hit enter on the first step
+```
+mysql_secure_installation
+```
+
+And restart it
+```
+service mysql-server restart
+```
+
+Finally, restart MySQL and the web server
+```
+
+service apache2 restart
+```
+
+## Part 2: Installing FreshRSS
+
+Begin by installing git, if you don't already have it installed.
+```
+apt install git
+```
+
+Next, change to the install directory and download FreshRSS using git
+```
+cd /usr/share/
+git clone https://github.com/FreshRSS/FreshRSS.git
+```
+
+Change to the new FreshRSS directory, and set the permissions so that your Web server can access the files
+```
+cd FreshRSS
+chown -R :www-data .
+sudo chmod -R g+r .
+```
+We'll also need to allow the data folder to be written to, like so:
+```
+chmod -R g+w ./data/
+```
+
+Optional: If you would like to allow updates from the Web interface, set write permissions
+```
+chmod -R g+w .
+```
+
+Finally, symlink the public folder to the root of your web directory
+```
+ln -s /usr/share/FreshRSS/p /var/www/html/
+```
+
+## Part 3: Creating a Database for FreshRSS
+
+Start a MySQL session. running this command will ask you for the MySQL password you set earler, and then put you into a prompt that should look like `MariaDB [(none)]>`
+```
+mysql -u root -p
+```
+
+From the MySQL prompt (`MariaDB [(none)]>`), run the following commands, substituting `<username>`, `<password>`, and `<database_name>` for real values.
+```
+CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
+CREATE DATABASE `databaseName`;
+GRANT ALL privileges ON `databaseName`.* TO 'userName'@localhost;
+FLUSH PRIVILEGES;
+QUIT;
+```
+
+A brief explanation of the previous command block:
+* You first create a database user for FreshRSS to use.
+* Then you create a database for FreshRSS to store data in.
+* You grant permissions for the user you created to read, write, and modify the database.
+* Flushing privileges reloads the permissions, which makes the previous command take effect.
+
+## Part 4: Finishing the Installation
+
+You can now finish the installation from a web browser by navigating to to `http://<your_server>/p` and following the graphical prompts.
+Alternatively, you can finish the installation using [the cli](https://github.com/FreshRSS/FreshRSS/tree/master/cli)
diff --git a/docs/en/admins/07_LinuxUpdate.md b/docs/en/admins/07_LinuxUpdate.md
new file mode 100644
index 000000000..5c91fa3ca
--- /dev/null
+++ b/docs/en/admins/07_LinuxUpdate.md
@@ -0,0 +1,97 @@
+# Updating on Debian 9/Ubuntu 16.04
+
+This tutorial demonstrates commands for updating FreshRSS. It assumes that your main FreshRSS directory is `/usr/share/FreshRSS`; If you've installed it somewhere else, substitute your path as necessary.
+
+## Using git
+
+**You must have used git to install FreshRSS to use this update method.**
+
+If your local user doesn't have write access to the FreshRSS folder, use a sudo shell (`sudo -s`), prefix the following commands with `sudo `, or switch to an account that does have write access to the folder.
+
+1. Change to your FreshRSS directory
+```
+cd /usr/share/FreshRSS/
+```
+
+2. Verify the branch you're currently on. For stable releases, this should be `master`.
+```
+git branch
+```
+
+
+3. Fetch the most recent code from the FreshRSS github Page
+```
+git fetch --all
+```
+
+Note: If you wish to switch to a specific version of FreshRSS, or switch to/from the dev branch, this is the time to do that. Example commands for switching branches are found below, in "Switching Branches"
+
+4. Check for an update
+```
+git status
+```
+
+If there's not an update, you're done! If there is, continue the following steps:
+
+5. Discard manual changes and delete manual additions
+```
+get reset --hard
+git clean -f -d
+```
+
+6. Delete the file that triggers the install wizard
+```
+rm data/do-install.txt
+```
+
+7. Update to the new version of FreshRSS
+```
+git pull
+```
+
+8. Re-set correct permissions so that your web server can access the files
+```
+chown -R :www-data . && chmod -R g+r . && chmod -R g+w ./data/
+```
+
+### Switching Branches
+
+Any command listed here should be run between steps 3 and 4 in the previous section.
+
+To switch from stable to dev (if you haven't before) use the following command: `git checkout -b dev origin/dev`
+
+If you've checked out dev and want to go back to master, the command would be `git checkout master`. After the first time you check out the dev branch, you can use this syntax to switch between the two main branches at will.
+
+If you wish to switch to [a specific release of FreshRSS](https://github.com/FreshRSS/FreshRSS/releases), you would use the command `git checkout <release_name>`, where <release_name> is the specific release number you wish to check out (for example, `git checkout 1.12.0`). Be aware that checking out a specific release will leave you in a state where you can't automatically update; you'll need to run `git checkout master` or `git checkout dev` before you'll be able to pull updates from git automatically.
+
+## Using the zip Archive
+
+If your local user doesn't have write access to the FreshRSS folder, use a sudo shell (`sudo -s`), prefix the following commands with `sudo `, or switch to an account that does have write access to the folder.
+
+1. Change to your FreshRSS directory
+```
+cd /usr/share/FreshRSS/
+```
+
+2. Download and unzip the update file
+```
+wget https://github.com/FreshRSS/FreshRSS/archive/master.zip
+unzip master.zip
+```
+
+3. Overwrite all your existing files with the new ones
+```
+cp -R FreshRSS-master/* .
+```
+
+4. Re-set permissions
+```
+chown -R :www-data . && chmod -R g+r . && chmod -R g+w ./data/
+```
+
+5. Clean up the FreshRSS directory by deleting the downloaded zip, the file forcing the setup wizard and the temporary directory
+```
+rm -f master.zip
+rm -f data/do-install.txt
+rm -rf FreshRSS-master/
+```
diff --git a/docs/en/admins/08_FeedUpdates.md b/docs/en/admins/08_FeedUpdates.md
new file mode 100644
index 000000000..981bdbb01
--- /dev/null
+++ b/docs/en/admins/08_FeedUpdates.md
@@ -0,0 +1,56 @@
+# Setting Up Automatic Feed Updating
+
+FreshRSS is updated by the `./app/actualize_script.php` script. Knowing this, we can periodically trigger it to ensure up-to-date feeds.
+
+**Note:** the update script won't update any particular feed more often than once every twenty minutes, so it doesn't make sense to trigger it much more frequently than that.
+
+**Note:** the following examples assume that FreshRSS is installed to `/usr/share/FreshRSS`. You'll need to modify the FreshRSS path to reflect your own system.
+
+## Cron as a trigger
+
+You'll need to check the Cron documentation for your specific distribution ([Debian/Ubuntu](https://help.ubuntu.com/community/CronHowto), [Red Hat/Fedora/CentOS](https://fedoraproject.org/wiki/Administration_Guide_Draft/Cron), [Slackware](https://docs.slackware.com/fr:slackbook:process_control?#cron), [Gentoo](https://wiki.gentoo.org/wiki/Cron), [Arch Linux](https://wiki.archlinux.org/index.php/Cron) ...) to make sure you set the Cron job correctly.
+
+It's advisable that you run the Cron job as your Web server user (often `www-data`).
+
+### Example on Debian/Ubuntu
+To run the updater script every hour, and 10 minutes past the hour:
+
+Run `sudo crontab -e` and copy the following line into the crontab:
+```
+10 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+```
+
+## Systemd as a trigger
+
+Some systems can't use a Cron job, but they can use systemd. It's easy to configure it to mimic Cron's features.
+
+First you need to add a `freshrss.timer` file in `/etc/systemd/system/` with the following content:
+
+```
+[Unit]
+Description=FreshRSS get new content
+
+[Timer]
+OnBootSec=30s
+OnCalendar=*:0/20
+
+[Install]
+WantedBy=timers.target
+```
+
+This timer will start 30 seconds after boot and it will trigger the service every 20 minutes. Feel free to change the configuration to better suit your needs.
+
+Then you need to add a `freshrss.service` file in the same directory. This will be the description of the service triggered by the aforementioned timer.
+
+```
+[Unit]
+Description=FreshRSS get new content
+Wants=freshrss.timer
+
+[Service]
+User=www-data
+Type=simple
+ExecStart=/usr/bin/php /usr/share/FreshRSS/app/actualize_script.php
+```
+
+Finally, you need to enable the timer with `systemctl enable freshrss.timer` and reload the systemd configuration with `systemctl daeamon-reload`.
diff --git a/docs/en/admins/09_AccessControl.md b/docs/en/admins/09_AccessControl.md
new file mode 100644
index 000000000..c17ad1fc3
--- /dev/null
+++ b/docs/en/admins/09_AccessControl.md
@@ -0,0 +1,24 @@
+# Access Control
+
+FreshRSS offers three methods of Access control: Form Authentication using Javascript, HTTP based Authentication, or an uncontrolled state with no authentication required.
+
+## Form Authentication
+
+Form Authentication requires the use of Javascript. It will work on any supported version of PHP, but version 5.5 or newer is recommended (see footnote 1 in [prerequisites](02_Prerequisites.md) for the reason why).
+
+This option requires nothing more than selecting Form Authentication during installation.
+
+## HTTP Authentication
+
+You may also choose to use HTTP Authentication provided by your web server.[^1]
+
+If you choose to use this option, create a `./p/i/.htaccess` file with a matching `.htpasswd` file.
+
+## No Authentication
+Not using authentication on your server is dangerous, as anyone with access to your server would be able to make changes as an admin. It is never advisable to not use any form of authentication, but **never** chose this option on a server that is able to be accessed outside of your home network.
+
+## Hints
+
+You can switch your authentication method at any time by editing the `./data/config.php` file, on the line that begins `'auth_type'`.
+
+[^1]: See [the Apache documentation](https://httpd.apache.org/docs/trunk/howto/auth.html)
diff --git a/docs/en/admins/10_ServerConfig.md b/docs/en/admins/10_ServerConfig.md
new file mode 100644
index 000000000..88387274a
--- /dev/null
+++ b/docs/en/admins/10_ServerConfig.md
@@ -0,0 +1,103 @@
+# Apache/Nginx Configuration Files
+
+## Apache configuration
+This is an example Apache virtual hosts configuration file. It covers HTTP and HTTPS configuration.
+
+```
+<VirtualHost *:80>
+ DocumentRoot /var/www/html/
+
+ #Default site...
+
+ ErrorLog ${APACHE_LOG_DIR}/error.default.log
+ CustomLog ${APACHE_LOG_DIR}/access.default.log vhost_combined
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName rss.example.net
+ DocumentRoot /path/to/FreshRSS/p/
+
+ <Directory /path/to/FreshRSS/p>
+ AllowOverride AuthConfig FileInfo Indexes Limit
+ Require all granted
+ </Directory>
+
+ ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
+ CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
+
+ AllowEncodedSlashes On
+</VirtualHost>
+
+<IfModule mod_ssl.c>
+ <VirtualHost *:443>
+ ServerName rss.example.net
+ DocumentRoot /path/to/FreshRSS/p/
+
+ <Directory /path/to/FreshRSS/p>
+ AllowOverride AuthConfig FileInfo Indexes Limit
+ Require all granted
+ </Directory>
+
+ ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
+ CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
+
+ <IfModule mod_http2.c>
+ Protocols h2 http/1.1
+ </IfModule>
+
+ # For the API
+ AllowEncodedSlashes On
+
+ SSLEngine on
+ SSLCompression off
+ SSLCertificateFile /path/to/server.crt
+ SSLCertificateKeyFile /path/to/server.key
+ # Additional SSL configuration, e.g. with LetsEncrypt
+ </VirtualHost>
+</IfModule>
+```
+
+## Nginx configuration
+
+This is an example nginx configuration file. It covers HTTP, HTTPS, and php-fpm configuration.
+
+You can find simpler config file but they may be incompatible with FreshRSS API.
+```
+server {
+ listen 80;
+ listen 443 ssl;
+
+ # HTTPS configuration
+ ssl on;
+ ssl_certificate /etc/nginx/server.crt;
+ ssl_certificate_key /etc/nginx/server.key;
+
+ # your server’s URL(s)
+ server_name rss.example.net;
+
+ # the folder p of your FreshRSS installation
+ root /srv/FreshRSS/p/;
+
+ index index.php index.html index.htm;
+
+ # nginx log files
+ access_log /var/log/nginx/rss.access.log;
+ error_log /var/log/nginx/rss.error.log;
+
+ # php files handling
+ # this regex is mandatory because of the API
+ location ~ ^.+?\.php(/.*)?$ {
+ fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+ # By default, the variable PATH_INFO is not set under PHP-FPM
+ # But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var!
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+
+ location / {
+ try_files $uri $uri/ index.php;
+ }
+}
+```
diff --git a/docs/en/contributing.md b/docs/en/contributing.md
index 19f9cb9b1..870e0c14f 100644
--- a/docs/en/contributing.md
+++ b/docs/en/contributing.md
@@ -20,7 +20,7 @@ If you have to create a new ticket, try to apply the following advices:
- We also need some information:
+ Your FreshRSS version (on about page or `constants.php` file)
+ Your server configuration: type of hosting, PHP version
- + Your storage system (MySQL / MariaDB / PostgreSQL or SQLite)
+ + Your storage system (SQLite, MySQL, MariaDB, PostgreSQL)
+ If possible, the related logs (PHP logs and FreshRSS logs under `data/users/your_user/log.txt`)
## Fix a bug
@@ -52,5 +52,5 @@ We are working on a better way to handle internationalization but don't hesitate
## Contribute to documentation
-The documentation needs a lot of improvements in order to be more useful to new contributors and we are working on it.
+The documentation needs a lot of improvements in order to be more useful to new contributors and we are working on it.
If you want to give some help, meet us in the main repositories [docs directory](https://github.com/FreshRSS/FreshRSS/tree/master/docs)!
diff --git a/docs/en/developers/01_First_steps.md b/docs/en/developers/01_First_steps.md
index adca4495b..28c249be4 100644
--- a/docs/en/developers/01_First_steps.md
+++ b/docs/en/developers/01_First_steps.md
@@ -1,6 +1,59 @@
-# Environment configuration
+# Environment configuration (Docker)
-**TODO**
+FreshRSS is built with PHP and uses a homemade framework, Minz. The dependencies are directly included in the source code, so you don't need Composer.
+
+There are various ways to configure your development environment. The easiest and most supported method is based on Docker, which is the solution documented below. If you already have a working PHP environment, you probably don't need it.
+
+We assume here that you use a GNU/Linux distribution, capable of running Docker. Otherwise, you'll have to adapt the commands accordingly.
+
+The commands that follow have to be executed in a console. They start by `$` when commands need to be executed as normal user, and by `#` when they need to be executed as root user. You don't have to type these characters. A path may be indicated before these characters to help you identify where they need to be executed. For instance, `app$ echo 'Hello World'` indicates that you have to execute `echo` command in the `app/` directory.
+
+First, you need to install [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
+
+Once you're done, clone the repository with:
+
+```console
+$ git clone https://github.com/FreshRSS/FreshRSS.git
+$ cd FreshRSS
+```
+
+Note that, if you want to contribute, you have to fork the repository first and clone your fork instead of the "root" one. Adapt the commands in consequence.
+
+Then, the only command you need to know is the following:
+
+```console
+$ make start
+```
+
+This might take some time while Docker downloads the image. If your user isn't in the `docker` group, you'll need to prepend the command with `sudo`.
+
+**You can now access FreshRSS at [http://localhost:8080](http://localhost:8080).** Just follow the install process and select the SQLite database.
+
+You can stop the containers by typing <kbd>Control</kbd> + <kbd>c</kbd> or with the following command, in another terminal:
+
+```console
+$ make stop
+```
+
+If you're interested in the configuration, the `make` commands are defined in the [`Makefile`](/Makefile).
+
+If you need to use a different tag image (default is `dev-alpine`), you can set the `TAG` environment variable:
+
+```console
+$ TAG=dev-arm make start
+```
+
+You can find the full list of available tags [on the Docker hub](https://hub.docker.com/r/freshrss/freshrss/tags).
+
+You might want to rebuild the Docker image locally. You can do it with:
+
+```console
+$ make build
+$ # or
+$ TAG=dev-arm make build
+```
+
+The `TAG` variable can be anything (e.g. `dev-local`). You can target a specific architecture by adding `-alpine` or `-arm` at the end of the tag (e.g. `dev-local-arm`).
# Project architecture
@@ -8,7 +61,7 @@
# Extensions
-If you want to create your own FreshRSS extension, take a look at the [extension documentation](03_Backend/05_Extensions.md).
+If you want to create your own FreshRSS extension, take a look at the [extension documentation](03_Backend/05_Extensions.md).
# Coding style
@@ -57,7 +110,7 @@ There is a space before and after every operator.
```php
if ($a == 10) {
- // do something
+ // do something
}
echo $a ? 1 : 0;
@@ -69,11 +122,11 @@ There is no spaces in the brackets. There is no space before the opening bracket
```php
if ($a == 10) {
- // do something
+ // do something
}
if ((int)$a == 10) {
- // do something
+ // do something
}
```
@@ -84,16 +137,16 @@ It happens most of the time in Javascript files. When there is chained functions
```javascript
// First instruction
shortcut.add(shortcuts.mark_read, function () {
- //...
- }, {
- 'disable_in_input': true
- });
+ //...
+ }, {
+ 'disable_in_input': true
+ });
// Second instruction
shortcut.add("shift+" + shortcuts.mark_read, function () {
- //...
- }, {
- 'disable_in_input': true
- });
+ //...
+ }, {
+ 'disable_in_input': true
+ });
```
## Line length
@@ -105,7 +158,7 @@ With functions, parameters can be declared on different lines.
```php
function my_function($param_1, $param_2,
$param_3, $param_4) {
- // do something
+ // do something
}
```
@@ -120,7 +173,7 @@ They must follow the "snake case" convention.
```php
// a function
function function_name() {
- // do something
+ // do something
}
// a variable
$variable_name;
@@ -132,7 +185,7 @@ They must follow the "lower camel case" convention.
```php
private function methodName() {
- // do something
+ // do something
}
```
@@ -148,26 +201,9 @@ abstract class ClassName {}
Files must be encoded with UTF-8 character set.
-## PHP 5.3 compatibility
-
-Do not get an array item directly from a function or a method. Use a variable.
-
-```php
-// code with PHP 5.3 compatibility
-$my_variable = function_returning_an_array();
-echo $my_variable[0];
-// code without PHP 5.3 compatibility
-echo function_returning_an_array()[0];
-```
-
-Do not use short array declaration.
+## PHP compatibility
-```php
-// code with PHP 5.3 compatibility
-$variable = array();
-// code without PHP 5.3 compatibility
-$variable = [];
-```
+Ensure that your code is working with a PHP version as old as what FreshRSS officially supports.
## Miscellaneous
@@ -177,7 +213,7 @@ They must be at the end of the line if a condition runs on more than one line.
```php
if ($a == 10 ||
$a == 20) {
- // do something
+ // do something
}
```
@@ -190,9 +226,9 @@ If the file contains only PHP code, the PHP closing tag must be omitted.
If an array declaration runs on more than one line, each element must be followed by a comma even the last one.
```php
-$variable = array(
- "value 1",
- "value 2",
- "value 3",
-);
+$variable = [
+ "value 1",
+ "value 2",
+ "value 3",
+];
```
diff --git a/docs/en/developers/03_Backend/05_Extensions.md b/docs/en/developers/03_Backend/05_Extensions.md
index ae304f6e0..4610e4b90 100644
--- a/docs/en/developers/03_Backend/05_Extensions.md
+++ b/docs/en/developers/03_Backend/05_Extensions.md
@@ -48,13 +48,13 @@ Code example:
<?php
class FreshRSS_hello_Controller extends Minz_ActionController {
- public function indexAction() {
- $this->view->a_variable = 'FooBar';
- }
+ public function indexAction() {
+ $this->view->a_variable = 'FooBar';
+ }
- public function worldAction() {
- $this->view->a_variable = 'Hello World!';
- }
+ public function worldAction() {
+ $this->view->a_variable = 'Hello World!';
+ }
}
?>
@@ -74,7 +74,7 @@ As explained above, the views consist of HTML mixed with PHP. Code example:
```html
<p>
- This is a parameter passed from the controller: <?php echo $this->a_variable; ?>
+ This is a parameter passed from the controller: <?= $this->a_variable ?>
</p>
```
@@ -119,7 +119,7 @@ To take full advantage of the Minz routing system, it is strongly discouraged to
```html
<p>
- Go to page <a href="http://example.com?c=hello&amp;a=world">Hello world</a>!
+ Go to page <a href="http://example.com?c=hello&amp;a=world">Hello world</a>!
</p>
```
@@ -130,13 +130,13 @@ So use the `Minz_Url` class and its `display()` method instead. `Minz_Url::displ
```php
<?php
-$url_array = array(
- 'c' => 'hello',
- 'a' => 'world',
- 'params' => array(
- 'foo' => 'bar',
- )
-);
+$url_array = [
+ 'c' => 'hello',
+ 'a' => 'world',
+ 'params' => [
+ 'foo' => 'bar',
+ ],
+];
// Show something like .?c=hello&amp;a=world&amp;foo=bar
echo Minz_Url::display($url_array);
@@ -166,10 +166,10 @@ Code example:
```php
<?php
-$url_array = array(
- 'c' => 'hello',
- 'a' => 'world'
-);
+$url_array = [
+ 'c' => 'hello',
+ 'a' => 'world',
+];
// Tells Minz to redirect the user to the hello / world page.
// Note that this is a redirection in the Minz sense of the term, not a redirection that the browser will have to manage (HTTP code 301 or 302)
@@ -188,10 +188,10 @@ It is very common to want display a message to the user while performing a redir
```php
<?php
-$url_array = array(
- 'c' => 'hello',
- 'a' => 'world'
-);
+$url_array = [
+ 'c' => 'hello',
+ 'a' => 'world',
+];
$feedback_good = 'Tout s\'est bien passé !';
$feedback_bad = 'Oups, quelque chose n\'a pas marché.';
@@ -226,18 +226,18 @@ The translation files are quite simple: it is only a matter of returning a PHP t
<?php
return array(
- 'action' => array(
- 'actualize' => 'Actualiser',
- 'back_to_rss_feeds' => '← Retour à vos flux RSS',
- 'cancel' => 'Annuler',
- 'create' => 'Créer',
- 'disable' => 'Désactiver',
- ),
- 'freshrss' => array(
- '_' => 'FreshRSS',
- 'about' => 'À propos de FreshRSS',
- ),
-);
+ 'action' => [
+ 'actualize' => 'Actualiser',
+ 'back_to_rss_feeds' => '← Retour à vos flux RSS',
+ 'cancel' => 'Annuler',
+ 'create' => 'Créer',
+ 'disable' => 'Désactiver',
+ ),
+ 'freshrss' => array(
+ '_' => 'FreshRSS',
+ 'about' => 'À propos de FreshRSS',
+ ),
+];
?>
```
@@ -247,9 +247,9 @@ Code example:
```html
<p>
- <a href="<?php echo _url('index', 'index'); ?>">
- <?php echo _t('gen.action.back_to_rss_feeds'); ?>
- </a>
+ <a href="<?= _url('index', 'index') ?>">
+ <?= _t('gen.action.back_to_rss_feeds') ?>
+ </a>
</p>
```
@@ -267,8 +267,8 @@ An extension allows you to add functionality easily to FreshRSS without having t
### Basic files and folders
-The first thing to note is that **all** extensions **must** be located in the `extensions` directory, at the base of the FreshRSS tree.
-An extension is a directory containing a set of mandatory (and optional) files and subdirectories.
+The first thing to note is that **all** extensions **must** be located in the `extensions` directory, at the base of the FreshRSS tree.
+An extension is a directory containing a set of mandatory (and optional) files and subdirectories.
The convention requires that the main directory name be preceded by an "x" to indicate that it is not an extension included by default in FreshRSS.
The main directory of an extension must contain at least two **mandatory** files:
@@ -276,16 +276,16 @@ The main directory of an extension must contain at least two **mandatory** files
- A `metadata.json` file that contains a description of the extension. This file is written in JSON.
- An `extension.php` file containing the entry point of the extension (which is a class that inherits Minz_Extension).
-Please note that there is a not a required link between the directory name of the extension and the name of the class inside `extension.php`,
-but you should follow our best practice:
+Please note that there is a not a required link between the directory name of the extension and the name of the class inside `extension.php`,
+but you should follow our best practice:
If you want to write a `HelloWorld` extension, the directory name should be `xExtension-HelloWorld` and the base class name `HelloWorldExtension`.
In the file `freshrss/extensions/xExtension-HelloWorld/extension.php` you need the structure:
```html
class HelloWorldExtension extends Minz_Extension {
- public function init() {
- // your code here
- }
+ public function init() {
+ // your code here
+ }
}
```
There is an example HelloWorld extension that you can download from [our GitHub repo](https://github.com/FreshRSS/xExtension-HelloWorld).
@@ -315,14 +315,14 @@ Only the `name` and` entrypoint` fields are required.
### Choose between « system » or « user »
-A __user__ extension can be enabled by some users and not by others (typically for user preferences).
+A __user__ extension can be enabled by some users and not by others (typically for user preferences).
A __system__ extension in comparison is enabled for every account.
### Writing your own extension.php
-This file is the entry point of your extension. It must contain a specific class to function.
-As mentioned above, the name of the class must be your `entrypoint` suffixed by` Extension` (`HelloWorldExtension` for example).
+This file is the entry point of your extension. It must contain a specific class to function.
+As mentioned above, the name of the class must be your `entrypoint` suffixed by` Extension` (`HelloWorldExtension` for example).
In addition, this class must be inherited from the `Minz_Extension` class to benefit from extensions-specific methods.
Your class will benefit from four methods to redefine:
@@ -351,25 +351,31 @@ You can register at the FreshRSS event system in an extensions `init()` method,
```html
class HelloWorldExtension extends Minz_Extension
{
- public function init() {
- $this->registerHook('entry_before_display', array($this, 'renderEntry'));
- }
- public function renderEntry($entry) {
- $entry->_content('<h1>Hello World</h1>' . $entry->content());
- return $entry;
- }
-}
+ public function init() {
+ $this->registerHook('entry_before_display', array($this, 'renderEntry'));
+ }
+ public function renderEntry($entry) {
+ $entry->_content('<h1>Hello World</h1>' . $entry->content());
+ return $entry;
+ }
+}
```
+
The following events are available:
-- `entry_before_display` (`function($entry) -> Entry | null`) : will be executed every time an entry is rendered. The entry itself (instance of FreshRSS_Entry) will be passed as parameter.
-- `entry_before_insert` (`function($entry) -> Entry | null`) : will be executed when a feed is refreshed and new entries will be imported into the database. The new entry (instance of FreshRSS_Entry) will be passed as parameter.
-- `feed_before_insert` (`function($feed) -> Feed | null`) : will be executed when a new feed is imported into the database. The new feed (instance of FreshRSS_Feed) will be passed as parameter.
-- `post_update` (`function(none) -> none`) : **TODO** add documentation
-- `simplepie_before_init` (`function($simplePie, $feed) -> none`) : **TODO** add documentation
+- `entry_before_display` (`function($entry) -> Entry | null`): will be executed every time an entry is rendered. The entry itself (instance of FreshRSS\_Entry) will be passed as parameter.
+- `entry_before_insert` (`function($entry) -> Entry | null`): will be executed when a feed is refreshed and new entries will be imported into the database. The new entry (instance of FreshRSS\_Entry) will be passed as parameter.
+- `feed_before_insert` (`function($feed) -> Feed | null`): will be executed when a new feed is imported into the database. The new feed (instance of FreshRSS\_Feed) will be passed as parameter.
+- `freshrss_init` (`function() -> none`): will be executed at the end of the initialization of FreshRSS, useful to initialize components or to do additional access checks
+- `menu_admin_entry` (`function() -> string`): add an entry at the end of the "Administration" menu, the returned string must be valid HTML (e.g. `<li class="item active"><a href="url">New entry</a></li>`)
+- `menu_configuration_entry` (`function() -> string`): add an entry at the end of the "Configuration" menu, the returned string must be valid HTML (e.g. `<li class="item active"><a href="url">New entry</a></li>`)
+- `menu_other_entry` (`function() -> string`): add an entry at the end of the header dropdown menu (i.e. after the "About" entry), the returned string must be valid HTML (e.g. `<li class="item active"><a href="url">New entry</a></li>`)
+- `nav_reading_modes` (`function($reading_modes) -> array | null`): **TODO** add documentation
+- `post_update` (`function(none) -> none`): **TODO** add documentation
+- `simplepie_before_init` (`function($simplePie, $feed) -> none`): **TODO** add documentation
### Writing your own configure.phtml
-When you want to support user configurations for your extension or simply display some information, you have to create the `configure.phtml` file.
+When you want to support user configurations for your extension or simply display some information, you have to create the `configure.phtml` file.
**TODO**
diff --git a/docs/en/users/03_Main_view.md b/docs/en/users/03_Main_view.md
index 59d051e7e..c6c3e3b50 100644
--- a/docs/en/users/03_Main_view.md
+++ b/docs/en/users/03_Main_view.md
@@ -32,20 +32,20 @@ Here is an example to trigger article update every hour.
Special parameters to configure the script - all parameters can be combined:
-- Parameter "force"
-https://freshrss.example.net/i/?c=feed&a=actualize&force=1
+- Parameter "force"
+https://freshrss.example.net/i/?c=feed&a=actualize&force=1
If *force* is set to 1 all feeds will be refreshed at once.
-- Parameter "ajax"
-https://freshrss.example.net/i/?c=feed&a=actualize&ajax=1
+- Parameter "ajax"
+https://freshrss.example.net/i/?c=feed&a=actualize&ajax=1
Only a status site is returned and not a complete website. Example: "OK"
-- Parameter "maxFeeds"
-https://freshrss.example.net/i/?c=feed&a=actualize&maxFeeds=30
+- Parameter "maxFeeds"
+https://freshrss.example.net/i/?c=feed&a=actualize&maxFeeds=30
If *maxFeeds* is set the configured amount of feeds is refreshed at once. The default setting is "10".
-- Parameter "token"
-https://freshrss.example.net/i/?c=feed&a=actualize&token=542345872345734
+- Parameter "token"
+https://freshrss.example.net/i/?c=feed&a=actualize&token=542345872345734
Security parameter to prevent unauthorized refreshes. For detailed Documentation see "Form authentication".
### Online cron
diff --git a/docs/en/users/05_Configuration.md b/docs/en/users/05_Configuration.md
index 225c1e5f9..f635f9d5e 100644
--- a/docs/en/users/05_Configuration.md
+++ b/docs/en/users/05_Configuration.md
@@ -9,7 +9,7 @@ the missing bits or add a new language, please check how you can [contribute to
There are parts of FreshRSS that are not translated and are not intended to be translated. For now, the logs visible in the application as well as the one generated by automatic update scripts are part of it.
-Available languages are: cz, de, en, es, fr, he, it, kr, nl, oc, pt-br, ru, tr, zh-cn.
+Available languages are: cz, de, en, es, fr, he, it, kr, nl, oc, pt-br, ru, tr, zh-cn.
## Theme
diff --git a/docs/en/users/06_Fever_API.md b/docs/en/users/06_Fever_API.md
index b895d4eae..b1cf6cb21 100644
--- a/docs/en/users/06_Fever_API.md
+++ b/docs/en/users/06_Fever_API.md
@@ -21,15 +21,15 @@ Then point your mobile application to the URL of `fever.php` (e.g. `https://fres
Tested with:
- Android
- - [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably)
+ - [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) (Closed source)
- iOS
- - [Fiery Feeds](https://itunes.apple.com/app/fiery-feeds-rss-reader/id1158763303)
- - [Unread](https://itunes.apple.com/app/unread-rss-reader/id1252376153)
- - [Reeder-4](https://itunes.apple.com/app/reeder-4/id1449412357)
+ - [Fiery Feeds](https://apps.apple.com/app/fiery-feeds-rss-reader/id1158763303) (Closed source)
+ - [Unread](https://apps.apple.com/app/unread-rss-reader/id1252376153) (Commercial)
+ - [Reeder](https://www.reederapp.com/) (Commercial) (Use its Google Reader API / native FreshRSS option when possible)
- MacOS
- - [Readkit](https://itunes.apple.com/app/readkit/id588726889)
+ - [ReadKit](https://apps.apple.com/app/readkit/id588726889) (Commercial)
## Features
@@ -75,7 +75,7 @@ Add a body to your POST request encoded as `form-data` and one key named `api_ke
curl -s -F "api_key=$api_key" 'https://freshrss.example.net/api/fever.php?api'
```
-This shoud give:
+This should give:
```json
{
"api_version": 3,
@@ -83,7 +83,7 @@ This shoud give:
"last_refreshed_on_time": "1520013061"
}
```
-Perfect, you are authenticated and can now start testing the more advanced features. Therefor change the URL and append the possible API actions to your request parameters. Check the [original Fever documentation](https://feedafever.com/api) for more infos.
+Perfect, you are authenticated and can now start testing the more advanced features. Therefor change the URL and append the possible API actions to your request parameters. Check the [original Fever documentation](https://feedafever.com/api) for more information.
Some basic calls are:
diff --git a/docs/en/users/06_Mobile_access.md b/docs/en/users/06_Mobile_access.md
index 13dba828d..f5f1520e9 100644
--- a/docs/en/users/06_Mobile_access.md
+++ b/docs/en/users/06_Mobile_access.md
@@ -29,7 +29,7 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi
* If you get *Service Unavailable!*, then check from step 1 again.
* With __Apache__:
* If you get *FAIL getallheaders!*, the combination of your PHP version and your Web server does not provide access to [`getallheaders`](http://php.net/getallheaders)
- * Update to PHP 5.4+, or use PHP as module instead of CGI. Otherwise turn on Apache `mod_setenvif` (often enabled by default), or `mod_rewrite` with the following procedure:
+ * Turn on Apache `mod_setenvif` (often enabled by default), or `mod_rewrite` with the following procedure:
* Allow [`FileInfo` in `.htaccess`](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride): see the [server setup](../admins/02_Installation.md) again.
* Enable [`mod_rewrite`](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html):
* With Debian / Ubuntu: `sudo a2enmod rewrite`
@@ -43,7 +43,7 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi
# Compatible clients
-6. On the same FreshRSS API page, note the adress given under “Your API address”, like `https://freshrss.example.net/api/greader.php`
+6. On the same FreshRSS API page, note the address given under “Your API address”, like `https://freshrss.example.net/api/greader.php`
* You will type it in a client, together with your FreshRSS username, and the corresponding special API password.
7. Pick a client supporting a Google Reader-like API. Selection:
@@ -55,6 +55,9 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi
* [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Open source)
* MacOS
* [Vienna RSS](http://www.vienna-rss.com/) (Open source)
+ * [Reeder](https://www.reederapp.com/) (Commercial)
+ * iOS
+ * [Reeder](https://www.reederapp.com/) (Commercial)
* Firefox
* [FreshRSS-Notify](https://addons.mozilla.org/firefox/addon/freshrss-notify-webextension/) (Open source)
diff --git a/docs/en/users/07_Frequently_Asked_Questions.md b/docs/en/users/07_Frequently_Asked_Questions.md
index 42156b1a9..fd3db4bea 100644
--- a/docs/en/users/07_Frequently_Asked_Questions.md
+++ b/docs/en/users/07_Frequently_Asked_Questions.md
@@ -47,7 +47,7 @@ For more information on that matter, there is a [dedicated documentation](../../
## Permissions under SELinux
-Some Linux distribution like Fedora or RedHat Enterprise Linux have SELinux system enabled. This acts like a firewall application, so all applications cannot write/modify files under certain conditions. While installing FreshRSS, step 2 can fail if the httpd process cannot write to some data sub-directories, the following command should be executed as root :
+Some Linux distribution like Fedora or RedHat Enterprise Linux have SELinux system enabled. This acts like a firewall application, so all applications cannot write/modify files under certain conditions. While installing FreshRSS, step 2 can fail if the httpd process cannot write to some data sub-directories, the following command should be executed as root :
```sh
semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/FreshRSS/data(/.*)?'
restorecon -Rv /usr/share/FreshRSS/data