config.json
Use this file to define any configuration settings that you want the user to specify. These will automatically show up in the admin center's "Edit Program Settings" drop down list.
This is a "Json" file --- a javascript object that both the admin center and the front-end can parse effectively. It follows a very specific format:
| • | The whole thing is enclosed in square brackets: [ ] |
| • | Each item or setting definition is enclosed in curly braces: { } |
| • | Each piece of the definition is a colon separated list using quotes to surround the values. The first value is the "key" name, the second value is the data value for that key. |
| • | Statck up multiple setting definitions by using commas. |
The configuration setting definition uses the following keys:
category: The name of the category to show your setting under. Typically, name this with the name of your program
variable: The variable name you are creating. Later, you can access it via the global variable $config. i.e. $config['yourvariablename']
prompt: The wording to use to ask your user what to enter.
input_type: The type of input to show the user. Valid values are TEXT, TEXTAREA, SELECT, MULTIPLE
default_value: The default value to put in the box when a user first sees the option. In the case of SELECT or MULTIPLE input types, put a pipe separated list of values here,and the system will turn those into the options on the drop down list.
[
{
"category":"Blog Options",
"variable":"num_articles_on_main_page",
"prompt":"How many articles to show on home page?",
"input_type":"TEXT",
"default_value":"5"
},
{
"category":"Blog Options",
"variable":"Allow Replies",
"prompt":"Let users post replies to blog articles?",
"input_type":"SELECT",
"default_value":"YES|NO"
}
]
This help file was created with an unregistered evaluation copy of Help & Manual. © EC Software. All rights reserved. This message will not appear if you compile this help file with the registered version of Help & Manual.