RFC-0052: Dynamic Data Property Types
This memo defines an Experimental Protocol for the Xaraya community. It does not specify a Xaraya standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.
Copyright © The Digital Development Foundation (2004). All Rights Reserved.
This RFC extends RFC 0007 - Modularized User Data [1], by providing specific instructions on how Dynamic Data Property Types are added to the system, how to create new ones, and provides documentation on all the properties provided by the Xaraya Core Distribuation.
1. Introduction
Every RFC contains at least the following sections:
- Introduction
- The Property Master Class
- Creating a new Property
- The Property Loading Mechanism
- Xaraya Core Property Types
- Revision History
2. The Property Master Class
The Dynamic Data Module provides a base Property Class that all Properties extend, "Dynamic_Property". The Dynamic_Property class is located within /modules/dynamicdata/class/properties.php <Link to PHPDoc for Dynamic Property Class>
The Dynamic_Property classes consists of the following base functions that may be overidden:
- getValue()
- setValue($value)
- checkInput($name = '', $value = null)
- validateValue($value = null)
- getItemValue($itemid)
- setItemValue($itemid, $value)
- showInput($args = array())
- showOutput($args = array())
- showLabel($label = null)
- showHidden($args = array())
- getBasePropertyInfo() - Get the base information for this property.
3. Creating a new Property
You must overide the getBasePropertyInfo() method to return an array consisting of data values specific to your property, specifically:
- id - Unique Identifier
- name - Internal Name of this Property
- label - Public Label for this Property to be displayed when configuring DD Properties for an Object
- format - <I have no clue what this does, ask mikespub -- generally this is set to the same value as the id>
- validation - (optional) Contains the default, site admin overideable, configuration for this property
- source - (optional) What provides this property, commonly specifies the custom module that provides this property
- dependancies - (optional) Semicolon seperated list of files that must be present for this property to be available
- requiresmodule - (optional) this module must be available before this property is enabled
- aliases - (optional) If the same property class is reused directly with just different base info, and arguments then supply the alternate base arrays here
- args - (optional) An array of the default arguments to be passed to this class' contructor.
4. The Property Loading Mechanism
The Dynamic_Property_Master will scan the Xaraya file system and automatically load properties into the system, to be made available to site administrators while configuring Xaraya objects. The Dynamic_Property_Master will verify that the specified dependancies and required modules specified by each property's getBasePropertyInfo() method are present and available prior to adding the property to the list of available properties.
5. Revision history
0.0 - Initial Draft Version
6. Reference title
[1] | Xaraya Development Group, “Modularized User Data - RFC 0007”, 2002. |
Author's Address
Michael CortezCortezMichaelXaraya Development GroupEMail: mcortez@xaraya.comURI: http://EpicSaga.com
A. Xaraya Core Property Types
A.1 Affero
A.1.1 Description
A.1.3 Validation/Configuration Options
A.1.4 Requirements
A.2.1 Description
A.2.3 Validation/Configuration Options
A.2.4 Requirements
A.3 Calendar
A.3.1 Description
A.3.3 Validation/Configuration Options
A.3.4 Requirements
A.4 Checkbox
A.4.1 Description
A.4.3 Validation/Configuration Options
A.4.4 Requirements
A.5 CountryAbbrList
A.5.1 Description
A.5.3 Validation/Configuration Options
A.5.4 Requirements
A.6 CountryList
A.6.1 Description
A.6.3 Validation/Configuration Options
A.6.4 Requirements
A.7 DataSource
A.7.1 Description
A.7.3 Validation/Configuration Options
A.7.4 Requirements
A.8 DateFormat
A.8.1 Description
A.8.3 Validation/Configuration Options
A.8.4 Requirements
A.9.1 Description
A.9.3 Validation/Configuration Options
A.9.4 Requirements
A.10 FieldStatus
A.10.3 Validation/Configuration Options
A.10.4 Requirements
A.11 FieldType
A.11.3 Validation/Configuration Options
A.11.4 Requirements
A.12 FileUpload
A.12.3 Validation/Configuration Options
A.12.4 Requirements
A.13 FloatBox
A.13.3 Validation/Configuration Options
A.13.4 Requirements
A.14 GroupList
A.14.3 Validation/Configuration Options
A.14.4 Requirements
A.15 Hardcore
A.15.3 Validation/Configuration Options
A.15.4 Requirements
A.16.3 Validation/Configuration Options
A.16.4 Requirements
A.17 HTMLArea
A.17.3 Validation/Configuration Options
A.17.4 Requirements
A.18 HTMLPage
A.18.3 Validation/Configuration Options
A.18.4 Requirements
A.19.3 Validation/Configuration Options
A.19.4 Requirements
A.20 ImageList
A.20.3 Validation/Configuration Options
A.20.4 Requirements
A.21.3 Validation/Configuration Options
A.21.4 Requirements
A.22.3 Validation/Configuration Options
A.22.4 Requirements
A.23 ItemType
A.23.3 Validation/Configuration Options
A.23.4 Requirements
A.24 LanguageList
A.24.3 Validation/Configuration Options
A.24.4 Requirements
A.25.3 Validation/Configuration Options
A.25.4 Requirements
A.26.3 Validation/Configuration Options
A.26.4 Requirements
A.27 MultiSelect
A.27.3 Validation/Configuration Options
A.27.4 Requirements
A.28 NumberBox
A.28.3 Validation/Configuration Options
A.28.4 Requirements
A.29 NumberList
A.29.3 Validation/Configuration Options
A.29.4 Requirements
A.30.3 Validation/Configuration Options
A.30.4 Requirements
A.31.3 Validation/Configuration Options
A.31.4 Requirements
A.32 PayPalCart
A.32.3 Validation/Configuration Options
A.32.4 Requirements
A.33 PayPalDonate
A.33.3 Validation/Configuration Options
A.33.4 Requirements
A.34 PayPalNow
A.34.3 Validation/Configuration Options
A.34.4 Requirements
A.35 PayPalSubscription
A.35.3 Validation/Configuration Options
A.35.4 Requirements
A.36 RadioButtons
A.36.3 Validation/Configuration Options
You may specify the Values and Labels to be displayed in the list of Radio Buttons via the Validation field. The way to specify the Values and Labels:
- Explicitly: You may specify in the Validation field the options to display, using one of two formats.
- Comma Seperated Labels: Simply specify the labels you wish to display delineated by commas. The values specified will be used as both the ID and the display Label. Example: label1,label2,label3
- Semicolon Seperated ID/Label pairs: Specify a list of ID/Label pairs seperated by semicolons. Example: id1,label1;id2,label2;id3,label3
A.36.4 Requirements
By default provides a drop down list of options for the user to select from.
None.
A.37.3 Validation/Configuration Options
You may specify the Values and Labels to be displayed in the drop down box via the Validation field. There are 4 ways to specify the Values and Labels:
- Explicitly: You may specify in the Validation field the options to display, using one of two formats.
- Comma Seperated Labels: Simply specify the labels you wish to display delineated by commas. The values specified will be used as both the ID and the display Label. Example: label1,label2,label3
- Semicolon Separated ID/Label pairs: Specify a list of ID/Label pairs seperated by semicolons. Example: id1,label1;id2,label2;id3,label3
- xarAPIModFunc(): You may specify a tarAPIModFunc() call to a function that returns an array of ID/Value pairs. The Key's in the array should be the ID's you wish to store.
- Data File (File System): You may specify a data file containing the data you wish to display. To specify the data file use the following signature in the validation field "{file:pathToFile.dat}". Each line of the file should consist of one ID/Value pair, separated by a comma.
- Data File (Via Uploads Module): As per the Data File option, but the file is uploaded into the system via the Uploads module. The use signature is: "{fileid:#}" where the number is the Uploads' File ID. (Not yet implimented as of 5/03/04)
A.37.4 Requirements
None.
A.38 SendToFriend
A.38.3 Validation/Configuration Options
A.38.4 Requirements
A.39 StateList
A.39.3 Validation/Configuration Options
A.39.4 Requirements
A.40 StateProvinceList
A.40.3 Validation/Configuration Options
A.40.4 Requirements
A.41 StaticText
A.41.3 Validation/Configuration Options
A.41.4 Requirements
A.42.3 Validation/Configuration Options
A.42.4 Requirements
A.43 TColorPicker
A.43.3 Validation/Configuration Options
A.43.4 Requirements
A.44 TextArea
A.44.3 Validation/Configuration Options
A.44.4 Requirements
A.45.3 Validation/Configuration Options
A.45.4 Requirements
A.46 TextUpload
A.46.3 Validation/Configuration Options
A.46.4 Requirements
A.47 TimeZone
A.47.3 Validation/Configuration Options
A.47.4 Requirements
A.48.3 Validation/Configuration Options
A.48.4 Requirements
A.49.3 Validation/Configuration Options
A.49.4 Requirements
A.50 URLTitle
A.50.3 Validation/Configuration Options
A.50.4 Requirements
A.51.3 Validation/Configuration Options
A.51.4 Requirements
A.52 UserList
A.52.3 Validation/Configuration Options
A.52.4 Requirements
A.53 Username
A.53.3 Validation/Configuration Options
A.53.4 Requirements
A.54.3 Validation/Configuration Options
A.54.4 Requirements
The DDF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the DDF's procedures with respect to rights in standards-track and standards-related documentation can be found in RFC-0.
The DDF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the DDF Board of Directors.
Acknowledgement
Funding for the RFC Editor function is provided by the DDF