From 2197a4aa4c68bdacd91832a9efd714bdf0918ea2 Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Fri, 27 Jul 2018 18:46:46 +0800 Subject: [PATCH] Created Configuration Basics (markdown) --- Configuration-Basics.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Configuration-Basics.md diff --git a/Configuration-Basics.md b/Configuration-Basics.md new file mode 100644 index 0000000..227e834 --- /dev/null +++ b/Configuration-Basics.md @@ -0,0 +1,28 @@ +It’s important that you read this page and don’t just assume it’s okay to make changes to `inc/config.php`; it’s not. `inc/config.php` is used only to hold default values. It’s updated very frequently, so placing your local configuration there would make upgrading a very complicated process. + +Instead, edit `inc/instance-config.php`. + +# Config files + +Vichan is made up of multiple configuration files: + +* `inc/config.php` — These are the defaults. Do not edit this file or you will have a very hard time upgrading in the future. +* `inc/instance-config.php` — Make all your site-wide changes here. This file is generated upon installation. +* `/config.php` — Optional board-specific configuration files can also be made. These files don’t exist by default. + +The syntax for `inc/instance-config.php` and `/config.php` is exactly the same to that of `inc/config.php`. You can copy lines from `config.php` and place them in either one of these config files. That is what `config.php` is for. + +The configuration variable (`$config`) is just one huge associative array, occasionally split into “sections”. +Loading order + +It’s important to understand how the configuration files work to get the most out of Vichan. + +* `inc/config.php` — $config is reset with the defaults. +* `inc/instance-config.php` — Some $config values are overwritten or changed. +* `/config.php` — If it exists, some more $config values are overwritten. + +# Comments + +The comments in `inc/config.php` are probably the greatest source of documentation. It is filled with descriptions for specific config variables as well as examples, for you to copy into `inc/instance-config.php` and modify. + +_This page originated from the Tinyboard wiki. [Source](http://web.archive.org/web/20121003095922/http://tinyboard.org/docs/?p=Config)_ \ No newline at end of file