/config.json for custom skin variables

Version 1.53


Relating to the custom skin logo and custom css colors features (related links below), this lets the skin owner save raw json data to a file at: DOCROOT/config.json eg: /usr/local/directadmin/data/users/CREATOR/skin_customizations/skinname/config.json Both Resellers and Admins can set modifications on global skins, or their own skins in /home/creator/skins/*, but the config.json is saved in their skin_customizations path. Command: CMD_SKINS method: POST (must be post) action=save_config_json name=SKINNAME config.json={"your":"validjson"} Only very basic json validation is done on the uploaded data, likely to have better validation at a later date. =============== DELETE to delete the config.json, run the same as above, less config.json, but also include: delete=yes CMD_SKINS method: POST (must be post) action=save_config_json name=SKINNAME delete=yes =============== ACCESS To access the file, use the path: /config.json It's considered a "non-threat" path, so is similar to IMG or /assets requests (tokens not loaded, etc) New global token: HAVE_CONFIG_JSON=1 will be set if config_json=1 is in the skin.conf. =============== skin.conf to enable this feature, the skin's skin.conf must have: config_json=1 else the save will not be allowed. The files_user.conf is currently needed to allow access to the file.

Interested to try DirectAdmin? Get a 30-day Free Trial!