-
Notifications
You must be signed in to change notification settings - Fork 0
Setting API
All application level settings are accessible via the Settings API.
-
POST
index.php?controller=config&action=update
Update application Settings.
-
GET
index.php?controller=config&action=show
Returns all application settings except admin password and filter words.
-
GET
index.php?controller=config&action=showAll
Returns all site configuration except admin password.
-
GET
index.php?controller=config&action=getTranslations
Returns translations according to the site language set.
-
POST
index.php?controller=config&action=update
Update application Settings.(Root user only)
Request:
Request Header Type Description RequestVerificationToken string Required Query String Parameter Type Description board_name string Optional. Site name.
site_close integer Optional. Put site into maintenance mode. Available values are:
-
0
- No -
1
- Yes
close_reason string Optional. Message to show visitors when the site is in maintenance mode.
admin_email string Optional. Email address
copyright_info string Optional. Copyright message will be displayed in the bottom of front page.
filter_words string Optional. The bad words list, should be a comma separated string.
valid_code_open number Required. Enable the Captcha feature. Defaults to
0
. Available values are:-
0
- No -
1
- Yes
page_on number Required. Enable the pagination feature on the front page. Available values are:
-
0
- No -
1
- Yes
num_perpage integer Required. Number of comments on the front page
theme string Required. The default theme, defaults to
spa
. You can develop your own custom theme.timezone number Required. The desired local time and time zone, dates and time throughout the site will be displayed using this time zone.
Available values are in the arrary:
[0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 8, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14, -1, -2, -3, -3.5, -4, -4.5, -5, -6, -7, -8, -9, -9.5, -10, -11, -12]
lang string Required. The site's default language
password string optional. The new root user password.
filter_type integer Required. Text formats define the HTML tags, code, and other formatting that can be used when entering text. Available values:
-
1
: HTML tags in comments and replies are striped, except the tags you allowed. -
2
: Special characters in comments and replies will be converted to HTML entities.
allowed_tags string Optional. A list of HTML tags that can be used in text area.
Response:
{ "statusCode": 200, "statusText": "OK", "response": [] }
-
-
GET
index.php?controller=config&action=show
Returns all application settings except admin password and filter words.
Response:
{ "statusCode": 200, "statusText": "OK", "response": { "board_name": "test", "site_close": "0", "close_reason": "Off line now.", "admin_email": "rainyjune@live.cn", "copyright_info": "Copyright \u00a9 MySite", "valid_code_open": "0", "page_on": "0", "num_perpage": "10", "theme": "spa", "admin": "root", "lang": "en", "timezone": "8", "filter_type": "1", "allowed_tags": "<a><em><strong><cite><code><ul><ol><li><dl><dt><dd>" } }
-
GET
index.php?controller=config&action=showAll
Returns all site configuration except admin password.
Request Header Type Description RequestVerificationToken string Required Response:
{ "statusCode": 200, "statusText": "OK", "response": { "board_name": "test", "site_close": "0", "close_reason": "Off line now.", "admin_email": "rainyjune@live.cn", "copyright_info": "Copyright \u00a9 MySite", "filter_words": "fuck", "valid_code_open": "0", "page_on": "0", "num_perpage": "10", "theme": "spa", "admin": "root", "lang": "en", "timezone": "8", "filter_type": "1", "allowed_tags": "<a><em><strong><cite><code><ul><ol><li><dl><dt><dd>" } }
-
GET
index.php?controller=config&action=getTranslations
Returns translations according to the site language set.
Response:
{ "statusCode": 200, "statusText": "OK", "response": { "WELCOME_SYS": "Welcome to YuanPad", "THANKS": "Thanks for using YuanPad.", "STATS_INFO": "Statistical Information", "NUM_POSTS": "Number of Posts", "NUM_REPLY": "Number of Replies", "MP_VERSION": "YuanPad Version", "SYS_INFO": "System Info", "PHP_VERSION": "PHP Version", "GD_VERSION": "GD Version", "SAFE_MODE": "Safe Mode", "SYS_CONF": "System Configuration", "BOARD_NAME": "Board Name", "CLOSE_BOARD": "Close Site?", "CLOSE_REASON": "Close Reason", "COPY_INFO": "Copyright Info", "SYS_THEME": "Theme", "TIMEZONE": "Timezone", "POST_CONF": "Post Configuration", "FILTER_WORDS": "Bad Words", "ENABLE_CAPTCHA": "Enable Captcha?", "ENABLE_PAGE": "Enable Pagination?", "PAGINATION_TIP": "This option determin how many messages will be displayed per page", "POST_PERPAGE": "Post each page", "ADMIN_CONF": "Admin Account Configuration", "CHANGE_PWD": "New Password", "PWD_TIP": "Please leave empty if you don't change it", "RESET": "Reset", "SELECT": "Select", "OPERATION": "Operation", "REPLY": "Reply", "UPDATE": "Update", "BAN": "Ban", "DELETE": "Delete", "YOU_REPLIED": "<font color=\"red\">You replied at {reply_time} :<\/font> {reply_content}", "DELETE_THIS_REPLY": "Delete this reply", "CHECK_ALL": "Select All", "CHECK_NONE": "Select None", "CHECK_INVERT": "Invert Selection", "DELETE_CHECKED": "Delete Checked", "DELETE_ALL": "Delete All", "DELETE_ALL_REPLY": "Delete All Replies", "BACKUP": "Backup", "BAD_IP": "Bad IP", "CANCEL": "Cancel", "TIPS": "Tips", "TZ_ZONES": { "-12": "[UTC - 12] Baker Island Time", "-11": "[UTC - 11] Niue Time, Samoa Standard Time", "-10": "[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time", "-9.5": "[UTC - 9:30] Marquesas Islands Time", "-9": "[UTC - 9] Alaska Standard Time, Gambier Island Time", "-8": "[UTC - 8] Pacific Standard Time", "-7": "[UTC - 7] Mountain Standard Time", "-6": "[UTC - 6] Central Standard Time", "-5": "[UTC - 5] Eastern Standard Time", "-4.5": "[UTC - 4:30] Venezuelan Standard Time", "-4": "[UTC - 4] Atlantic Standard Time", "-3.5": "[UTC - 3:30] Newfoundland Standard Time", "-3": "[UTC - 3] Amazon Standard Time, Central Greenland Time", "-2": "[UTC - 2] Fernando de Noronha Time, South Georgia & the South Sandwich Islands Time", "-1": "[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time", "0": "[UTC] Western European Time, Greenwich Mean Time", "1": "[UTC + 1] Central European Time, West African Time", "2": "[UTC + 2] Eastern European Time, Central African Time", "3": "[UTC + 3] Moscow Standard Time, Eastern African Time", "3.5": "[UTC + 3:30] Iran Standard Time", "4": "[UTC + 4] Gulf Standard Time, Samara Standard Time", "4.5": "[UTC + 4:30] Afghanistan Time", "5": "[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time", "5.5": "[UTC + 5:30] Indian Standard Time, Sri Lanka Time", "5.75": "[UTC + 5:45] Nepal Time", "6": "[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time", "6.5": "[UTC + 6:30] Cocos Islands Time, Myanmar Time", "7": "[UTC + 7] Indochina Time, Krasnoyarsk Standard Time", "8": "[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time", "8.75": "[UTC + 8:45] Southeastern Western Australia Standard Time", "9": "[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time", "9.5": "[UTC + 9:30] Australian Central Standard Time", "10": "[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time", "10.5": "[UTC + 10:30] Lord Howe Standard Time", "11": "[UTC + 11] Solomon Island Time, Magadan Standard Time", "11.5": "[UTC + 11:30] Norfolk Island Time", "12": "[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time", "12.75": "[UTC + 12:45] Chatham Islands Time", "13": "[UTC + 13] Tonga Time, Phoenix Islands Time", "14": "[UTC + 14] Line Island Time" }, "WELCOME": "Welcome to {site_name}", "WELCOME_POST": "Welcome to Our site", "NICKNAME": "NickName", "MESSAGE": "Message", "TIME": "Time", "PAGE_NAV": "We have <span id=\"totalNum\"> {num_of_post} <\/span> post(s), <span id=\"totalPages\"> {num_of_page} <\/span> page(s)", "ADMIN_REPLIED": "<font color=\"red\"> {admin_name} replied at {reply_time} :<\/font> {reply_content}", "CLICK_POST": "Click to post", "CONTENT": "Content", "SUBMIT": "Submit", "POST_SHORTCUT": "Press Ctrl+Enter to post", "ADMIN_EMAIL": "Email", "ACP": "Admin", "ACP_INDEX": "Admin Control Panel", "VALIDATE_CODE": "CAPTCHA", "ACP_LOGIN": "Admin Control Panel Login", "BACK": "Back to Home", "LOGIN": "Login", "ADMIN_NAME": "Name", "ADMIN_PWD": "Password", "HOME": "Home", "LOGOUT": "Logout", "ACP_OVERVIEW": "Overview", "ACP_CONFSET": "Configuration", "ACP_MANAGE_POST": "Manage Posts", "ACP_MANAGE_IP": "Bad Ips", "LANG": "Language", "YES": "Yes", "NO": "No", "LOGIN_ERROR": "Invalid username or password!", "USERNAME_NOT_EMPTY": "Username should not be empty", "USERNAME_NOT_AVAILABLE": "Username not available", "PWD_NOT_EMPTY": "Password should not be empty~", "USERNAME_TOO_SHORT": "The username is too short", "MESSAGE_NOT_EMPTY": "The message must not be empty~", "CAPTCHA_NOT_EMPTY": "The captcha must not be empty~", "EMAIL_INVALID": "Email invalid", "POST_OK": "Thank you!", "CLICK_TO_REFRESH": "Click to refresh", "CAPTCHA": "Captcha", "DEL_ALL_CONFIRM": "Are you sure to delete all messages and all replies?", "DEL_ALL_REPLY_CONFIRM": "Are you sure to delete all replies?", "WHERE_AM_I": "Where am i?", "QUERY_ERROR": "Query error!", "REPLY_EMPTY": "The reply should not be empty", "BACKUP_NOTSUPPORT": "Your server does not support backup!", "BACKUP_TYPE_NOTSUPPORT": "Only flatfile data backup supported!", "FILL_NOT_COMPLETE": "You have not finished all the required fileds", "WORDS_TOO_LONG": "Your words was too much", "CAPTCHA_WRONG": "The code you entered is wrong", "UNKNOWN": "Unknown", "NOT_SUPPORT": "Not support", "LOGIN_DENIED": "Login denied!", "USERNAME": "Username", "PASSWORD": "Password", "EMAIL": "Email", "REGISTER": "Register", "USERUPDATEFAILED": "Update failed!", "OFF_LINE_MODE": "Now under off-line mode!", "SENDING": "Sending...", "THEMES_DIR_NOTEXISTS": "The directory of themes does not exists!", "SMILEY_DIR_NOTEXISTS": "The directory of smiley `%s` does not exists!", "CONFIG_FILE_NOTEXISTS": "The configuration file {config_file} does not exists! <ul><li>Please copy the .\/sites\/default\/default.config.php file to .\/sites\/default\/config.php.<\/li><li>Change file permissions so that it is writable by the web server<\/li><\/ul>", "CONFIG_FILE_NOTWRITABLE": "The configuration file {config_file} does not writable!", "SITENAME_ERROR": "The sitename undefined!", "SITESTATUS_ERROR": "The status of site undefined!", "SITECLOSEREASON_ERROR": "The maintaince message undefined!", "ADMINEMAIL_ERROR": "Admin email undefined!", "COPYRIGHT_ERROR": "Coptyright undefined!", "BADWORDS_ERROR": "Bad words undefined!", "CAPTCHASTATUS_ERROR": "The status of CAPTCHA undefined!", "PAGINATIONSTATUS_ERROR": "The status of pagination undefined!", "TIMEZONE_ERROR": "Timezone undefined!", "PAGINATION_PARAMETER_ERROR": "The parameter of pagination undefined!", "THEME_ERROR": "Theme undefined!", "ADMINNAME_ERROR": "Admin name undefined!", "ADMINPASS_ERROR": "admin password undefined!", "LANGUAGE_ERROR": "Language undefined!", "INSTALL_PANEL": "YuanPad Installation Panel", "INSTALL_MP": "YuanPad Installation", "ADMIN_USERNAME": "Administrator username", "ADMIN_USERNAME_MIN": "at least 3 characters", "ADMIN_PASSWORD": "Administrator password", "DB_TYPE_SELECT": "Please select database type", "DB_TYPE": "Database type", "DB_NAME": "Database name", "DB_USER": "Database username", "DB_PWD": "Database password", "DB_HOST": "Database server hostname", "TB_PREFIX": "Prefix for tables in database", "INSTALL": "Install", "FINISHED": "<p>Installation finished! :) Go <a href=\"index.php\">Index<\/a>, or Go <a href=\"index.php?action=control_panel\">ACP<\/a><\/p><p>Dont't forget to delete or rename the file install.php in directory <code>includes<\/code><\/p>", "RETRY": "Retry", "DATADIR_NOT_WRITABLE": "Directory `data\/` is not writable,please change directory permission so that it is writable by the web server", "DB_CONNECT_ERROR": "Connected to DB failed!", "INSTALL_NEED_HELP": "Need help?", "INSTALL_AGREEMENT": "To install this software, you must agree to <a href=\"http:\/\/opensource.org\/licenses\/MIT\" target=\"_blank\">MIT<\/a>", "GD_DISABLED_NOTICE": "(GD not support,so you can't enable captcha.)", "SEARCH_NOTFOUND": "There is no posts meeting your query's requirements", "SEARCH_FOUND": "Number of results : {result_num}", "ONLY_POST": "Only POST permitted.", "NO_SEARCH_PARAM": "No search parameter specified.", "API_REQUEST_ERROR": "The request is not permitted.", "LOGIN_REQUIRED": "Login required", "PARAM_ERROR": "Parameter error", "USER_ADMIN": "User Management", "DEL_ALLUSER_CONFIRM": "Are you sure to delete all users?", "ALLOWED_TAGS": "Allowed HTML tags:{allowed_tags}", "FILTER_HTML_TAGS": "Filter HTML tags", "STRIP_DISALLOWED_TAGS": "Strip disallowed tags", "ESCAPE_ALL_TAGS": "Escape all tags", "ALLOWED_HTML_TAGS": "Allowed HTML tags", "USER_NOT_EXISTS": "User not exists." } }