Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1244266
custom_fields_config.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 21, 12:07 AM
Size
6 KB
Mime Type
text/x-php
Expires
Sun, Nov 23, 12:07 AM (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
809466
Attached To
rINP In-Portal
custom_fields_config.php
View Options
<?php
$config
=
Array
(
'Prefix'
=>
'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'
=>
'CustomFieldsTagProcessor'
,
'file'
=>
'custom_fields_tag_processor.php'
,
'build_event'
=>
'OnBuild'
),
'AutoLoad'
=>
true
,
'hooks'
=>
Array
(),
'QueryString'
=>
Array
(
1
=>
'id'
,
2
=>
'page'
,
3
=>
'event'
,
4
=>
'type'
,
5
=>
'mode'
,
),
'Hooks'
=>
Array
(
Array
(
'Mode'
=>
hAFTER
,
'Conditional'
=>
false
,
'HookToPrefix'
=>
'cf'
,
'HookToSpecial'
=>
'*'
,
'HookToEvent'
=>
Array
(
'OnSave'
),
// edit cloned fields to made alters :)
'DoPrefix'
=>
'cf'
,
'DoSpecial'
=>
'*'
,
'DoEvent'
=>
'OnSaveCustomField'
,
),
),
'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'
=>
''
),
),
'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'
=>
''
),
'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'
),
),
'general'
=>
Array
(
'Sorting'
=>
Array
(
'DisplayOrder'
=>
'asc'
)
),
),
'ItemSQLs'
=>
Array
(
''
=>
'SELECT * FROM %s'
,
),
'SubItems'
=>
Array
(
'confs-cf'
),
'Fields'
=>
Array
(
'CustomFieldId'
=>
Array
(
'type'
=>
'int'
,
'not_null'
=>
1
,
'default'
=>
0
),
'Type'
=>
Array
(
'type'
=>
'int'
,
'not_null'
=>
1
,
'default'
=>
0
),
'FieldName'
=>
Array
(
'required'
=>
'1'
,
'type'
=>
'string'
,
'not_null'
=>
1
,
'default'
=>
''
),
'FieldLabel'
=>
Array
(
'type'
=>
'string'
,
'required'
=>
1
,
'default'
=>
null
),
'MultiLingual'
=>
Array
(
'type'
=>
'int'
,
'formatter'
=>
'kOptionsFormatter'
,
'options'
=>
Array
(
1
=>
'la_Yes'
,
0
=>
'la_No'
),
'use_phrases'
=>
1
,
'not_null'
=>
1
,
'default'
=>
1
),
'Heading'
=>
Array
(
'type'
=>
'string'
,
'required'
=>
1
,
'default'
=>
null
),
'Prompt'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
null
),
'ElementType'
=>
Array
(
'required'
=>
'1'
,
'type'
=>
'string'
,
'not_null'
=>
1
,
'default'
=>
''
,
'formatter'
=>
'kOptionsFormatter'
,
'use_phrases'
=>
1
,
'options'
=>
Array
(
''
=>
'la_EmptyValue'
,
'text'
=>
'la_type_text'
,
'select'
=>
'la_type_select'
,
'multiselect'
=>
'la_type_multiselect'
,
'radio'
=>
'la_type_radio'
,
'checkbox'
=>
'la_type_checkbox'
,
'password'
=>
'la_type_password'
,
'textarea'
=>
'la_type_textarea'
,
'label'
=>
'la_type_label'
,
'date'
=>
'la_type_date'
,
'datetime'
=>
'la_type_datetime'
)),
'ValueList'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
null
),
'DefaultValue'
=>
Array
(
'type'
=>
'string'
,
'max_len'
=>
255
,
'not_null'
=>
1
,
'default'
=>
''
),
'DisplayOrder'
=>
Array
(
'type'
=>
'int'
,
'not_null'
=>
1
,
'default'
=>
0
),
'OnGeneralTab'
=>
Array
(
'type'
=>
'int'
,
'not_null'
=>
1
,
'default'
=>
0
),
'IsSystem'
=>
Array
(
'type'
=>
'int'
,
'formatter'
=>
'kOptionsFormatter'
,
'options'
=>
Array
(
0
=>
'la_No'
,
1
=>
'la_Yes'
),
'use_phrases'
=>
1
,
'not_null'
=>
1
,
'default'
=>
0
),
),
'VirtualFields'
=>
Array
(
'Value'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
''
),
'OriginalValue'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
''
),
'Error'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
''
),
'DirectOptions'
=>
Array
(
'type'
=>
'string'
,
'default'
=>
''
)
),
'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'
),
),
),
'SeparateTab'
=>
Array
(
'Icons'
=>
Array
(
'default'
=>
'icon16_custom.gif'
),
'Fields'
=>
Array
(
'FieldName'
=>
Array
(
'title'
=>
'la_col_FieldName'
,
'data_block'
=>
'grid_icon_td'
),
'Prompt'
=>
Array
(
'title'
=>
'la_col_Prompt'
,
'data_block'
=>
'grid_data_label_ml_td'
,
'ElementTypeField'
=>
'ElementType'
),
'Value'
=>
Array
(
'title'
=>
'la_col_Value'
,
'data_block'
=>
'edit_custom_td'
),
'Error'
=>
Array
(
'title'
=>
'la_col_Error'
,
'data_block'
=>
'custom_error_td'
),
),
),
'SeparateTabOriginal'
=>
Array
(
'Icons'
=>
Array
(
'default'
=>
'icon16_custom.gif'
),
'Fields'
=>
Array
(
'FieldName'
=>
Array
(
'title'
=>
'la_col_FieldName'
,
'data_block'
=>
'grid_icon_td'
),
'Prompt'
=>
Array
(
'title'
=>
'la_col_Prompt'
,
'data_block'
=>
'grid_data_label_ml_td'
,
'ElementTypeField'
=>
'ElementType'
),
'Value'
=>
Array
(
'title'
=>
'la_col_Value'
,
'data_block'
=>
'edit_custom_td'
),
'OriginalValue'
=>
Array
(
'title'
=>
'la_col_OriginalValue'
,
'data_block'
=>
'grid_original_td'
),
),
),
),
);
if
(
constOn
(
'DEBUG_MODE'
))
{
$config
[
'Grids'
][
'Default'
][
'Fields'
][
'IsSystem'
]
=
Array
(
'title'
=>
'la_col_IsSystem'
);
}
?>
Event Timeline
Log In to Comment