Changes between Initial Version and Version 1 of WidgetSettings


Ignore:
Timestamp:
Jun 1, 2009, 5:25:26 AM (15 years ago)
Author:
IgorL
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WidgetSettings

    v1 v1  
     1== Widget settings == 
     2 
     3 
     4Every widget must have 3 necessary files: '''xml/main.xml''', '''xml/config.xml''' and '''xml/settings.xml''' and 2 or more optional files. If your widget provides different languages and skins it should contain '''xml/langs.xml''' and '''xml/skins.xml''' files respectively. They should be empty and will be overwritten after widget installation. 
     5 
     6'''main.xml''' file should be empty. It will be overwritten after widget installation. 
     7 
     8'''config.xml''' file contains current widget settings. These settings are used in Ray Admin panel in "Settings" section of the widget as current values. This file has the following structure: 
     9 
     10{{{ 
     11<items> 
     12<item key="some_key1"><![CDATA[some_value1]]></item> 
     13<item key="some_key2"><![CDATA[some_value2]]></item> 
     14... 
     15<item key="some_keyN"><![CDATA[some_valueN]]></item> 
     16</items> 
     17}}} 
     18 
     19Every item contains "'''key'''" and "'''value'''" attributes. 
     20 
     21'''settings.xml''' file contains widget settings description and default values. These settings are used in the Ray Admin panel in the "'''Settings'''" section of the widget for respectively displaying settings controls. Settings that can't be changed through the "'''Settings'''" section in Ray Admin exist only in "'''config.xml'''". This file has the following structure: 
     22 
     23{{{ 
     24<items> 
     25<item type="string" key="some_key1" default="def_value1" range="20"> 
     26<caption><![CDATA[some_key1 caption]]></caption> 
     27<comment><![CDATA[some_key1 description]]></comment> 
     28</item> 
     29<item type="number" key="some_key2" default="10" range="1:100"> 
     30<caption><![CDATA[some_key2 caption]]></caption> 
     31<comment><![CDATA[some_key2 description]]></comment> 
     32</item> 
     33<item type="boolean" key="some_key3" default="false" range=""> 
     34<caption><![CDATA[some_key3 caption]]></caption> 
     35<comment><![CDATA[some_key3 description]]></comment> 
     36</item> 
     37<item type="select" key="some_key4" default="value1" range="value1 value2 value3"> 
     38<caption><![CDATA[some_key4 caption]]></caption> 
     39<comment><![CDATA[some_key4 description]]></comment> 
     40</item> 
     41<item type="select" key="some_key5" default="3" range="1:5 1"> 
     42<caption><![CDATA[some_key5 caption]]></caption> 
     43<comment><![CDATA[some_key5 description]]></comment> 
     44</item> 
     45</items> 
     46}}} 
     47 
     48Every item contains "'''type'''", "'''key'''", "'''default'''" and "'''range'''" attributes and two child nodes "'''caption'''" and "'''comment'''". The "'''default'''" attribute contains a default value for this setting. 
     49 
     50The "'''range'''" attribute defines the range of values that can be set for this setting. It depends on the type of setting. 
     51 
     52The "'''type'''" attribute can be one of the following: 
     53 
     54    '''string''' - any string value. Range - maximum string length. 
     55 
     56    '''number''' - any number. Range - numbers range ([minimum]:[maximum]). 
     57 
     58    '''boolean''' - logical value: true/false. Range should be empty. 
     59 
     60    '''select''' - enumerable setting. Range - all possible values for this setting (" " - separator). If you want to show numbers as selection options you can use a structure like [minimum]:[maximum] [step] (see example above). 
     61 
     62"'''caption'''" and "'''comment'''" nodes contain setting caption and comment as values respectively. 
     63 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub