Total Users Online: 225 üye, 2 guest | Tarih/Saat: 2024-03-29 11:01
Syntax of the CONFIG block in the setup file
Syntax of the block [BEGIN_SED_EXTPLUGIN_CONFIG] in the file *.setup.php
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']

Henüz yorum yapılmamıştır.
Syntax of the CONFIG block in the setup file
Author: Kaan
Date: 2009-12-28 09:08
Comments: (0)
Benzer SayfalarYorum
T3 File Indexor2
File Attachments Seditio0
PFS FILE ICONS0
Admin File Upload2
 
Powered by Seditio © 2009-2012 All Rights Reserved