Created Configuration (markdown)

El RIDO 2015-08-23 17:40:42 +02:00
parent 7750d93543
commit ef9047b210

59
Configuration.md Normal file

@ -0,0 +1,59 @@
ZeroBin comes with a configuration file to enable/disable features, change themes, etc.
## Structure
You find the configuration file at `cfg/conf.ini`. It is in `ini` format, meaning that lines beginning with semicolons (`;`) are comments, configuration options are grouped in sections, marked by square brackets (`[` & `]`) and the option keys are separated by the values with equal signs (`=`).
By default there are 7 sections: `[main]`, `[expire]`, `[expire_options]`, `[expire_labels]`, `[traffic]`, `[model]` and `[model_options]`.
## Options
### opendiscussion
Enable or disable the discussion feature, defaults to true.
If disabled users can't create new pastes with discussions or post replies to existing pastes with discussions. Already existing discussions will remain visible.
### syntaxhighlighting / syntaxhighlightingtheme
Enable or disable syntax highlighting, defaults to true.
The prettify library used for this feature works well with most programming languages but also makes plain text more readable.
If no `syntaxhighlightingtheme` is selected the built in theme is used, which works well with the `bootstrap` ZeroBin template. For the `page` ZeroBin template we suggest using the `sons-of-obsidian`.
### template
ZeroBin template to use, default is `bootstrap`. The templates can be found in the folder `tpl/` and are saved as `html` files, i.e. `tpl/bootstrap.html`.
### burnafterreadingselected
Preselect the burn-after-reading feature by default, defaults to false.
### expiration
The `default` option in the `[expire]` section controls, which expire value is selected by default. Make sure the value exists in the section `[expire_options]`.
In `[expire_options]` and `[expire_labels]` you can define the expiration options. These define the lifetime of a newly created paste in seconds. Each option in `[expire_options]` needs a description label with the same key in the `[expire_labels]` section.
Using a value of 0 for the seconds means to never expire this post. Remove this line from the default configuration if you want to enforce that all pastes expire eventually in your system. But be aware that changing this setting only affects newly created pastes.
### sizelimit
Size limit per paste and comment in bytes, defaults to 2 Mibibytes (2097152 bytes).
### trafficlimit
In the section `[traffic]` you can add a rate `limit` in seconds. This is the time limit between creating pastes or comments from the same IP address in seconds. Set this to 0 to disable rate limiting.
The option `dir` controls where the lock file is stored. Note that this directory needs to be writable for the process running PHP (i.e. your webserver, FPM or CGI process).
### base64version
The base64.js library version, defaults to `2.1.9`. Use `1.7` if you are upgrading from a ZeroBin Alpha 0.19 installation for compatibility with your existing pastes.
### model
The sections `[model]` and `[model_options]` control how your pastes are stored. Currently ZeroBin stores its pastes as flat files by default (`[model]` section, `class = zerobin_data`) and the option `dir` in the section `[model_options]` tells it in what folder to store them. Note that this directory needs to be writable for the process running PHP (i.e. your webserver, FPM or CGI process).
Alternatively you can store the pastes in a relational database. This is tested with MySQL and SQLite and examples for these two databases are provided in commented form. A more detailed explanation of the database feature can be found in the [installation instructions](Installation#using-a-database-instead-of-flat-files).