Index: branches/5.3.x/units/listing_types/listing_types_config.php =================================================================== diff -u -N -r15486 -r15657 --- branches/5.3.x/units/listing_types/listing_types_config.php (.../listing_types_config.php) (revision 15486) +++ branches/5.3.x/units/listing_types/listing_types_config.php (.../listing_types_config.php) (revision 15657) @@ -1,6 +1,6 @@ 'lst', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ListingTypesEventHandler', 'file' => 'listing_types_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ListingTypesTagProcessor', 'file' => 'listing_types_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => 'l', - 'AggregatedTagName' => 'ListListingTypes', - 'LocalTagName' => 'PrintList', - ), - Array ( - 'AggregateTo' => 'l', - 'AggregatedTagName' => 'ListingTypeField', - 'LocalTagName' => 'Field', - ), - ), - 'Hooks' => Array (), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'ListingTypeId', - 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('lst' => '!la_title_AddingPaidListingType!'), - 'edit_status_labels' => Array ('lst' => '!la_title_EditingPaidListingType!'), - 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), - ), - 'listing_type_list' =>Array ( 'prefixes' => Array ('lst_List'), - 'format' => "!la_title_PaidListingTypes!", - ), - 'listing_type_edit' =>Array ( 'prefixes' => Array ('lst'), - 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), - 'format' => "#lst_status# '#lst_titlefield#' - !la_title_General!", - ), - 'listing_type_shop_cart' =>Array ( 'prefixes' => Array ('lst'), - 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), - 'format' => "#lst_status# '#lst_titlefield#' - !la_title_ShopCartEntry!", - ), +$config = Array ( + 'Prefix' => 'lst', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ListingTypesEventHandler', 'file' => 'listing_types_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ListingTypesTagProcessor', 'file' => 'listing_types_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => 'l', + 'AggregatedTagName' => 'ListListingTypes', + 'LocalTagName' => 'PrintList', + ), + Array ( + 'AggregateTo' => 'l', + 'AggregatedTagName' => 'ListingTypeField', + 'LocalTagName' => 'Field', + ), + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-link/paid_listings/paid_listing_type_edit', 'priority' => 1), - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'PermSection' => Array ('main' => 'in-link:listing_types'), + 'IDField' => 'ListingTypeId', + 'TitleField' => 'Name', - 'Sections' => Array ( - 'in-link:listing_types' => Array ( - 'parent' => 'in-link:paid_listings_folder', - 'icon' => 'paid_listings', - 'label' => 'la_tab_ListingTypes', - 'url' => Array ('t' => 'in-link/paid_listings/paid_listing_types_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 1.2, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('lst' => '!la_title_AddingPaidListingType!'), + 'edit_status_labels' => Array ('lst' => '!la_title_EditingPaidListingType!'), + 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), + ), + 'listing_type_list' =>Array ( + 'prefixes' => Array ('lst_List'), 'format' => "!la_title_PaidListingTypes!", + ), + 'listing_type_edit' =>Array ( + 'prefixes' => Array ('lst'), + 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), + 'format' => "#lst_status# '#lst_titlefield#' - !la_title_General!", + ), + 'listing_type_shop_cart' =>Array ( + 'prefixes' => Array ('lst'), + 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'), + 'format' => "#lst_status# '#lst_titlefield#' - !la_title_ShopCartEntry!", + ), + ), - 'TableName' => TABLE_PREFIX.'ListingTypes', + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-link/paid_listings/paid_listing_type_edit', 'priority' => 1), + ), + ), - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',), // key - special, value - list select sql + 'PermSection' => Array ('main' => 'in-link:listing_types'), - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',), + 'Sections' => Array ( + 'in-link:listing_types' => Array ( + 'parent' => 'in-link:paid_listings_folder', + 'icon' => 'paid_listings', + 'label' => 'la_tab_ListingTypes', + 'url' => Array ('t' => 'in-link/paid_listings/paid_listing_types_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 1.2, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('ListingTypeId' => 'asc'), - ) - ), + 'TableName' => TABLE_PREFIX.'ListingTypes', - 'Fields' => Array ( - 'ListingTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => '1'), - 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'Duration' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'DurationType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year')), - 'OnPurchaseEdPick' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'), 'default' => 3), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), - 'OnPurchaseStatus' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'default' => 3), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('ListingTypeId' => 'asc'), + ) + ), - 'OnPurchaseNew' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnPurchasePop' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnPurchaseHot' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnPurchasePriorityAction' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'), 'default' => 0), - 'OnPurchasePriorityValue' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), - 'OnPurchaseAddToCatEnabled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OnPurchaseAddToCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OnPurchaseCustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'Fields' => Array ( + 'ListingTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => '1'), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'Duration' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'DurationType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year')), + 'OnPurchaseEdPick' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'), 'default' => 3), - 'OnExpireEdPick' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'), 'not_null' => 1, 'default' => 3), - 'OnExpireNew' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnExpirePop' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnExpireHot' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), - 'OnExpirePriorityAction' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'), 'default' => 0), - 'OnExpirePriorityValue' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), - 'OnExpireRemoveFromCatEnabled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OnExpireRemoveFromCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OnExpireCustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'OnPurchaseStatus' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'default' => 3), - 'OnExpireStatus' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'default' => 3), - 'RenewalReminder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'EnableBuying' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'ShopCartName' => Array ('type' => 'string', 'default' => null), - 'Price' => Array ('type' => 'double', 'default' => ''), - 'Recurring' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'VirtualProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - ), + 'OnPurchaseNew' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnPurchasePop' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnPurchaseHot' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnPurchasePriorityAction' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'), 'default' => 0), + 'OnPurchasePriorityValue' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), + 'OnPurchaseAddToCatEnabled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OnPurchaseAddToCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OnPurchaseCustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disbaled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'ListingTypeId' => Array ( 'title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60), - 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), - 'Duration' => Array ('data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100), - ), + 'OnExpireEdPick' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'), 'not_null' => 1, 'default' => 3), + 'OnExpireNew' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnExpirePop' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnExpireHot' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'), 'default' => 3), + 'OnExpirePriorityAction' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'), 'default' => 0), + 'OnExpirePriorityValue' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), + 'OnExpireRemoveFromCatEnabled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OnExpireRemoveFromCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OnExpireCustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - ), - ), - ); \ No newline at end of file + 'OnExpireStatus' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'default' => 3), + 'RenewalReminder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'EnableBuying' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'ShopCartName' => Array ('type' => 'string', 'default' => null), + 'Price' => Array ('type' => 'double', 'default' => ''), + 'Recurring' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'VirtualProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disbaled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'ListingTypeId' => Array ( 'title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), + 'Duration' => Array ('data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100), + ), + ), + ), +); \ No newline at end of file