-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathconfig.php
More file actions
75 lines (59 loc) · 2.59 KB
/
Copy pathconfig.php
File metadata and controls
75 lines (59 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
global $config;
$config["authserver"] = "auth.vintagestory.at";
/**
* @param string $name
* @param mixed $default
*/
function _define_default($name, $default)
{
if(!defined($name)) define($name, $default);
}
// For local development purposes create lib/config.dev.php and put your config in there. That file is automatically ignored by version control.
// Have a look at lib/cdn/bunny.php for relevant CDN config options.
// If you want to set up a local installation, I recommend
// adding "127.0.0.1 mods.vintagestory.stage" to your hosts file
if (str_contains($_SERVER["SERVER_NAME"], "mods.vintagestory.stage")) {
$filepath = $config["basepath"] . "lib/config.dev.php";
if (file_exists($filepath)) {
include($filepath);
} else {
define("CDN", "none");
$config["assetserver"] = "";
$config["database"] = "moddb";
$config["databasehost"] = "db";
$config["databaseuser"] = "vsmoddb";
$config["databasepassword"] = "vsmoddb";
}
$config['noncesalt'] = 'xzy';
_define_default("DEBUG", 1);
_define_default("DEBUGUSER", 1);
_define_default("MOD_SEARCH_INITIAL_RESULTS", 10);
_define_default("MOD_SEARCH_PAGE_SIZE", 10);
_define_default("DOWNLOAD_DEDUPLICATION_TIMESPAN", 60); // seconds
} else {
$config["database"] = "moddb";
define("CDN", "bunny");
// Added this way so I can .gitignore this file.
$filepath = $config["basepath"] . "lib/config.db.priv.php";
if (file_exists($filepath)) {
include($filepath);
}
_define_default("DEBUG", 0);
define("DEBUGUSER", 0);
_define_default("MOD_SEARCH_INITIAL_RESULTS", 200);
_define_default("MOD_SEARCH_PAGE_SIZE", 200);
_define_default("DOWNLOAD_DEDUPLICATION_TIMESPAN", 24*3600); // seconds
}
_define_default("DB_READONLY", false);
_define_default('DISABLE_USER_TAGS', true);
define("TAG_MODAUTHOR_VOTES", 1); // Not yet fully implemented, keep this at one.
_define_default("TAG_DOWNVOTED_THRESHOLD", 0);
_define_default("TAG_HIDE_THRESHOLD", -20);
_define_default("MOD_SEARCH_VALIDATE_LIMIT_MIN", 1);
_define_default("MOD_SEARCH_VALIDATE_LIMIT_MAX", 20);
_define_default("MOD_REPORT_DEDUPLICATION_TIMESPAN", 7); // days
_define_default("MOD_REPORT_LIMIT_PER_WEEK", 10); // counts open and dismissed reports, but not accepted ones.
_define_default("MOD_REPORT_LIMIT_LOW_EFFORT_WEIGHT", .1); // The amount of reports a "low effort ai" report is counted as for the sake of rate limiting.
_define_default("COMMENT_REPORT_DEDUPLICATION_TIMESPAN", 7); // days
_define_default("COMMENT_REPORT_LIMIT_PER_WEEK", 50); // counts open and dismissed reports, but not accepted ones.