saguaroib / saguaro

saguaro imgboard software
14 stars 5 forks source link

Alternate config file setup #241

Closed Apogate closed 7 years ago

Apogate commented 7 years ago

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:

This is just a rough mockup of how it would work, don't merge this