Index: trunk/core/units/custom_fields/custom_fields_config.php =================================================================== diff -u -N --- trunk/core/units/custom_fields/custom_fields_config.php (revision 0) +++ trunk/core/units/custom_fields/custom_fields_config.php (revision 1566) @@ -0,0 +1,84 @@ + 'cf', + 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), + 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), + 'EventHandlerClass' => Array('class'=>'CustomFieldsEventHandler','file'=>'custom_fields_event_handler.php','build_event'=>'OnBuild'), + 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), + 'AutoLoad' => true, + 'hooks' => Array(), + 'QueryString' => Array( + 1 => 'id', + 2 => 'page', + 3 => 'event', + 4 => 'type', + 5 => 'mode', + ), + 'IDField' => 'CustomFieldId', + + 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item + + 'TitlePhrase' => 'la_title_CustomFields', + + 'TitlePresets' => Array( + 'default' => Array( 'new_status_labels' => Array('cf'=>'!la_title_addingCustom!'), + 'edit_status_labels' => Array('cf'=>'!la_title_Editing_CustomField!'), + 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'), + ), + + 'custom_fields_list'=>Array( 'prefixes' => Array('cf_List'), + 'format' => "!la_tab_ConfigCustom! (#cf_recordcount#)", + ), + + 'custom_fields_edit'=>Array( 'prefixes' => Array('cf'), + 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'), + 'format' => "#cf_status# '#cf_titlefield#'", + ), + ), + + 'TableName' => TABLE_PREFIX.'CustomField', + + 'ListSQLs' => Array( ''=>'SELECT * FROM %s', + ), // key - special, value - list select sql + + 'ListSortings' => Array( + '' => Array( + 'ForcedSorting' => Array('DisplayOrder' => 'asc'), + 'Sorting' => Array('FieldName' => 'asc'), + ) + ), + + 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', + ), + + 'Fields' => Array( + 'CustomFieldId' => Array('type' => 'int','not_null' => '1','default' => ''), + 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'), + 'FieldName' => Array('required'=>'1', 'type' => 'string','not_null' => 1,'default' => ''), + 'FieldLabel' => Array('type' => 'string','default' => ''), + 'Heading' => Array('type' => 'string','default' => ''), + 'Prompt' => Array('type' => 'string','default' => ''), + 'ElementType' => Array('required'=>'1', 'type'=>'string', 'not_null'=>1, 'default'=>'NULL', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array('' => 'la_EmptyValue', 'select' => 'la_type_select', 'label' => 'la_type_label', 'password' => 'la_type_password','radio' => 'la_type_radio', 'textarea' => 'la_type_textarea', 'text' => 'la_type_text')), + 'Multilingual' => Array('type' => 'int','default' => '0'), + 'ValueList' => Array('type' => 'string','default' => ''), + 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'), + 'OnGeneralTab' => Array('type' => 'int','not_null' => '1','default' => '0'), + ), + 'VirtualFields' => Array(), + + 'Grids' => Array( + 'Default' => Array( + 'Icons' => Array('default'=>'icon16_custom.gif'), + 'Fields' => Array( + 'CustomFieldId' => Array( 'title'=>'la_prompt_FieldId', 'data_block' => 'grid_checkbox_td' ), + 'FieldName' => Array( 'title'=>'la_prompt_FieldName'), + 'FieldLabel' => Array( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'cf_grid_data_td' ), + 'DisplayOrder' => Array('title' => 'la_prompt_DisplayOrder'), + ), + + ), + ), + ); + +?> \ No newline at end of file