Here's a demo of an idea I had for alternate config setups.
Each board has two config files, one .php file and one .json file.
The config.php file would retain sensitive stuff like database connection info, table names, file paths etc, everything that shouldn't be web-viewable. Meanwhile, all the board specific settings like board title, NSFW status, page limits, user id toggle etc. are in an json_encoded array, in config.json which is loaded similar to how we currently load strings.
the contents of config.json would look something like this:
{"LANGUAGE":"en-us","TITLE":"Board title!","S_HEADSUB":"Subtitle!","S_DESCR":"","NSFW":1,"SHOWTITLETXT":1,"SHOWTITLEIMG":1,"EXTRA_SHIT":"","ALLOW_SUBJECT_REPLY":1,....etc...}
Reasons:
Multiple boards could use one config.php. Since config.php has no board-specific settings, this makes multi-board scaling more convenient.
This knocks the bare minimum of text-editor-edited config lines down to 4. Neo-test would hold the users hand through everything else.
JSON arrays are safer and much easier to manipulate, which would make automating config generation/editing for things like Neo-test #235 less dangerous.
Opens possibilities for changing board settings without having to open a text editor.
This is just a rough mockup of how it would work, don't merge this
Here's a demo of an idea I had for alternate config setups. Each board has two config files, one
.php
file and one.json
file.The
config.php
file would retain sensitive stuff like database connection info, table names, file paths etc, everything that shouldn't be web-viewable. Meanwhile, all the board specific settings like board title, NSFW status, page limits, user id toggle etc. are in anjson_encoded
array, inconfig.json
which is loaded similar to how we currently load strings.the contents of
config.json
would look something like this:{"LANGUAGE":"en-us","TITLE":"Board title!","S_HEADSUB":"Subtitle!","S_DESCR":"","NSFW":1,"SHOWTITLETXT":1,"SHOWTITLEIMG":1,"EXTRA_SHIT":"","ALLOW_SUBJECT_REPLY":1,....etc...}
Reasons:
config.php
. Sinceconfig.php
has no board-specific settings, this makes multi-board scaling more convenient.This is just a rough mockup of how it would work, don't merge this