Update documentation

This commit is contained in:
Frédéric Guillot 2014-07-23 07:56:08 -03:00
parent 1a4feb228d
commit 88ab144d5c
4 changed files with 12 additions and 70 deletions

View File

@ -68,7 +68,6 @@ Documentation
- [Multiple users](docs/multiple-users.markdown) - [Multiple users](docs/multiple-users.markdown)
- [Translations](docs/translations.markdown) - [Translations](docs/translations.markdown)
- [Themes](docs/themes.markdown) - [Themes](docs/themes.markdown)
- [Session](docs/session.markdown)
- [API documentation](http://miniflux.net/api.html) - [API documentation](http://miniflux.net/api.html)
- [FAQ](docs/faq.markdown) - [FAQ](docs/faq.markdown)

View File

@ -51,53 +51,3 @@ Actually, the following constants can be overrided:
// ENABLE_AUTO_UPDATE => default is true (enable Miniflux update from the user interface) // ENABLE_AUTO_UPDATE => default is true (enable Miniflux update from the user interface)
define('ENABLE_AUTO_UPDATE', true); define('ENABLE_AUTO_UPDATE', true);
How to override/extends the content filtering blacklist/whitelist?
------------------------------------------------------------------
Miniflux use [PicoFeed](https://github.com/fguillot/picoFeed) to parse the content of each item.
These variables are public static arrays, extends the actual array or replace it.
**Be careful, you can break everything by doing that!!!**
Put your modifications in your custom `config.php` like described above.
By example to add a new iframe whitelist:
\PicoFeed\Filter::$iframe_whitelist[] = 'http://www.kickstarter.com';
Or to replace the entire whitelist:
\PicoFeed\Filter::$iframe_whitelist = array('http://www.kickstarter.com');
Available variables:
// Allow only specified tags and attributes
\PicoFeed\Filter::$whitelist_tags
// Strip content of these tags
\PicoFeed\Filter::$blacklist_tags
// Allow only specified URI scheme
\PicoFeed\Filter::$whitelist_scheme
// List of attributes used for external resources: src and href
\PicoFeed\Filter::$media_attributes
// Blacklist of external resources
\PicoFeed\Filter::$media_blacklist
// Required attributes for tags, if the attribute is missing the tag is dropped
\PicoFeed\Filter::$required_attributes
// Add attribute to specified tags
\PicoFeed\Filter::$add_attributes
// Attributes that must be integer
\PicoFeed\Filter::$integer_attributes
// Iframe allowed source
\PicoFeed\Filter::$iframe_whitelist
For more details, have a look to the file `vendor/PicoFeed/Filter.php`.

View File

@ -1,14 +0,0 @@
Session
=======
How to change the session save path?
------------------------------------
With several shared hosting providers, sessions are cleaned very frequently, to avoid to login too often,
you can save sessions in a custom directory.
- Create a directory, by example `sessions`
- This directory must be writeable by the web server user
- This directory must NOT be accessible from the outside world (add a `.htaccess` if necessary)
- Override the application variable like described [here](config.markdown): `define('SESSION_SAVE_PATH', 'sessions');`
- Now, your sessions are saved in the directory `sessions`

View File

@ -1,21 +1,28 @@
Translations Translations
============ ============
How to create or update a translation? How to translate Miniflux to a new language?
-------------------------------------- --------------------------------------------
- Translations are stored inside the directory `locales` - Translations are stored inside the directory `locales`
- There is sub-directory for each language, by example for french we have `fr_FR`, for italian `it_IT` etc... - There is sub-directory for each language, by example for french we have `fr_FR`, for italian `it_IT` etc...
- A translation is a PHP file that return an Array with a key-value pairs - A translation is a PHP file that return an Array with a key-value pairs
- The key is the original text in english and the value is the translation for the corresponding language - The key is the original text in english and the value is the translation for the corresponding language
French translations are always the most recent (because I am french). French translations are always up to date (because I am french).
Create a new translation: ### Create a new translation:
1. Make a new directory: `locales/xx_XX` by example `locales/fr_CA` for French Canadian 1. Make a new directory: `locales/xx_XX` by example `locales/fr_CA` for French Canadian
2. Create a new file for the translation: `locales/xx_XX/translations.php` 2. Create a new file for the translation: `locales/xx_XX/translations.php`
3. Use the content of the french locales to have the most recent keys and replace the values 3. Use the content of the french locales and replace the values
4. Inside the file `models/config.php`, add a new entry for your translation inside the function `get_languages()` 4. Inside the file `models/config.php`, add a new entry for your translation inside the function `get_languages()`
5. Check with your local installation of Miniflux if everything is ok 5. Check with your local installation of Miniflux if everything is ok
6. Send a pull-request with Github 6. Send a pull-request with Github
How to update an existing translation?
--------------------------------------
1. Open the translation file `locales/xx_XX/translations.php`
2. Missing translations are commented and the values are empty, just fill blank and remove comments
3. Check with your local installation of Miniflux and send a pull-request