Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
* it contains all settings in JSON format, and can be edited to customize values
-* it defines which [plugins](Plugin-System) are enabled[](.html)
+* it defines which [plugins](Plugin-System) are enabled
* its values override those defined in `index.php`
* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
- to give it access to Shaarli, either:
- unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
- put users in the same group as the web server, and set the appropriate access rights
-- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[](.html)
+- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly
## Configuration
In `data/config.json.php`.
-See also [Plugin System](Plugin-System.html).
+See also [Plugin System](Plugin-System).
### Credentials
- **links_per_page**: Number of shaares displayed per page.
- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
- **enabled_plugins**: List of enabled plugins.
+- **default_note_title**: Default title of a new note.
+- **retrieve_description** (boolean): If set to true, for every new links Shaarli will try
+to retrieve the description and keywords from the HTML meta tags.
### Security
- **page_cache**: Shaarli's internal cache directory.
- **ban_file**: Banned IP file path.
+### Translation
+
+- **language**: translation language (also see [Translations](Translations))
+ - **auto** (default): The translation language is chosen from the browser locale.
+ It means that the language can be different for 2 different visitors depending on their locale.
+ - **en**: Use the English translation.
+ - **fr**: Use the French translation.
+- **mode**:
+ - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
+ - **gettext**: Use PHP builtin gettext extension
+ (faster, but requires `php-gettext` to be installed and to reload the web server on update)
+- **extension**: Translation extensions for custom themes or plugins.
+Must be an associative array: `translation domain => translation path`.
+
### Updates
- **check_updates**: Enable or disable update check to the git repository.
- **default_private_links**: Check the private checkbox by default for every new link.
- **hide_public_links**: All links are hidden while logged out.
+- **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
- **hide_timestamps**: Timestamps are hidden.
- **remember_user_default**: Default state of the login page's *remember me* checkbox
- `true`: checked by default, `false`: unchecked by default
- **enable_thumbnails**: Enable or disable thumbnail display.
- **enable_localcache**: Enable or disable local cache.
-### Redirector
-
-- **url**: Redirector URL, such as `anonym.to`.
-- **encode_url**: Enable this if the redirector needs encoded URL to work properly.
-
## Configuration file example
```json
"hide_public_links": false,
"hide_timestamps": false,
"open_shaarli": false,
- "redirector": "http://anonym.to/?",
- "redirector_encode_url": false
},
"general": {
"header_link": "?",
"privacy": {
"default_private_links": true,
"hide_public_links": false,
+ "force_login": false,
"hide_timestamps": false,
"remember_user_default": true
},
"enable_thumbnails": true,
"enable_localcache": true
},
- "redirector": {
- "url": "http://anonym.to/?",
- "encode_url": false
- },
"plugins": {
"WALLABAG_URL": "http://demo.wallabag.org",
"WALLABAG_VERSION": "1"
+ },
+ "translation": {
+ "language": "fr",
+ "mode": "php",
+ "extensions": {
+ "demo": "plugins/demo_plugin/languages/"
+ }
}
} ?>
```