From 29477e67ede12347b153e2255325327374e1b073 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 9 Dec 2025 01:43:12 +0500 Subject: feat: new configuration --- system/config.php | 430 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 430 insertions(+) create mode 100644 system/config.php (limited to 'system/config.php') diff --git a/system/config.php b/system/config.php new file mode 100644 index 0000000..4144b93 --- /dev/null +++ b/system/config.php @@ -0,0 +1,430 @@ + $sv) { + foreach ($sv as $k => &$v) { + if (is_bool($v) && !array_key_exists("{$sk}_$k", $_POST)) { + $c[$sk][$k] = false; + } + } + unset($v); + } + + foreach ($_POST as $k => $v) { + $parts = explode('_', $k); + $part_count = count($parts); + if ($part_count != 2) { + continue; + } + $section = $parts[0]; + $key = $parts[1]; + + if (!array_key_exists($section, $c)) { + $c[$section] = []; + } + + if ($v === 'on') { + $v = true; + } + + if (is_numeric($v)) { + $v += 0; + } + + $c[$section][$key] = $v; + } + + if (!file_put_contents(CFG_PATH, json_encode($c, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT))) { + http_response_code(500); + exit("Failed to write the configuration file."); + } + + generate_alert('/system/config.php', 'Saved!', 200); + exit(); +} + +?> + + + + Configuration - <?= CONFIG['instance']['name'] ?> + + + + + +
+
+ +
+

Instance configuration

+ +
+

This message confirms the instance is nearly ready. The configuration below shows the default + settings. Enter your database credentials to complete the setup.

+
+ +
+
+ +
+ + + + + +
Name
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Name
User
Password
Host
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Allow emote upload>
Allow anonymous emote upload>
Default uploader name
RegEx filter for names
Default visibility + +
Max name length
Max comment length
Max sizeX: Y: + +
Store original uploaded file>
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enable account registration>
Max. cookie lifetime (in seconds)
RegEx filter for usernames
Username lengthMin: + Max:
Min. password length
Secret key length
Profile picture sizeX: + Y:
Profile banner sizeX: + Y:
Badge sizeX: + Y:
Enable public list>
Log actions>
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Enable account registration via Twitch value="on"> +
Client ID +
Client secret +
Redirect URI +
+
+
+ +
+ +
+ + + + + + + + + + + + + +
Enable CAPTCHA value="on"> +
Force authorized users to solve CAPTCHA value="on"> +
SizeMin: + Max:
+
+
+ +
+ +
+ + + + + + + + + + + + + +
Enable rating value="on"> +
Names[?] +
Minimal amount of votes
+
+
+ +
+ +
+ + + + + + + + + + + + + +
Enable tags value="on"> +
RegEx filter +
Maximum amount of tags per emote.
+
+
+ +
+ +
+ + + + + +
Show emotesets public value="on"> +
+
+
+ +
+ +
+ + + + + + + + + +
Enable system dashboard for moderators value="on"> +
Enable manual emote approval value="on"> +
+
+
+ +
+ +
+ + + + + +
Enable reports value="on"> +
+
+
+ + +
+
+
+
+ + + \ No newline at end of file -- cgit v1.2.3