Syntax of the CONFIG block in the setup file
Format :
[Variable] = [Order] : [Type] : [Values] : [Default] : [Clear name]
Order : The order in wich it will be displayed in the config panel.
Type : One of the 4 types listed below.
Values : For types 'select' and 'radio', the list of values, separated by commas.
Default : The default value. Should be any listed in the field 'Values', or empty.
Clear name : The name of the variable that will be displayed in the config panel.
The types :
string :
A string, max lenght is 255 chars.
Will be displayed in the config panel as a single line of input.
The field [Values] is ignored for this type.
select :
A selectbox, lines entered in the field [Values] will be the options.
radio :
A radio box, roughly same as selectbox.
text :
Note that this type is a catch-all, if you put anything else than 'string', 'select' or 'radio', it will be defaulted
to 'text'.
The field [Values] is ignored for this type.
Example :
Kod:
[BEGIN_SED_EXTPLUGIN_CONFIG]
myvar1=01:string::50:This is my first variable
myvar2=02:select:1,2,3,4,5,6,7,8,9,10:7:This is my second variable
myvar3=03:radio:Yes,No:Yes:This is my third variable
myvar4=04:text::Default text goes here:This is my fourth variable
[END_SED_EXTPLUGIN_CONFIG]
Then to get the values in your extended plugin code :
As sample, if you plugin code is "myplugin", the names of the variables are :
Kod:
$cfg['plugin']['myplugin']['myvar1']
$cfg['plugin']['myplugin']['myvar2']
$cfg['plugin']['myplugin']['myvar3']
$cfg['plugin']['myplugin']['myvar4']