Attached Files |
57-Set_formatters_for_checkbox_type_fields-Dmitry-20100117-IN-LINK.patch [^] (72,896 bytes) 2010-01-17 19:24
[Show Content]
Index: in-link/units/listing_types/listing_types_config.php
===================================================================
--- in-link/units/listing_types/listing_types_config.php (revision 12997)
+++ in-link/units/listing_types/listing_types_config.php (working copy)
@@ -14,27 +14,27 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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'),
+ '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(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListListingTypes',
'LocalTagName' => 'PrintList',
),
- Array(
+ Array (
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListingTypeField',
'LocalTagName' => 'Field',
),
),
- 'Hooks' => Array(),
- 'QueryString' => Array(
+ 'Hooks' => Array (),
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
@@ -42,20 +42,20 @@
),
'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!'),
+ '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'),
+ '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!'),
+ '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!'),
+ 'listing_type_shop_cart' =>Array ( 'prefixes' => Array ('lst'),
+ 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'),
'format' => "#lst_status# '#lst_titlefield#' - !la_title_ShopCartEntry!",
),
@@ -68,15 +68,15 @@
),
),
- 'PermSection' => Array('main' => 'in-link:listing_types'),
+ 'PermSection' => Array ('main' => 'in-link:listing_types'),
- 'Sections' => Array(
- 'in-link:listing_types' => Array(
+ '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'),
+ 'url' => Array ('t' => 'in-link/paid_listings/paid_listing_types_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 1.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
@@ -84,67 +84,76 @@
'TableName' => TABLE_PREFIX.'ListingTypes',
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',), // key - special, value - list select sql
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('ListingTypeId' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('ListingTypeId' => 'asc'),
)
),
- '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),
+ '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),
- '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),
+ '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),
- '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' => ''),
+ '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' => ''),
- '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' => ''),
+ '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' => ''),
- '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','not_null' => '1','default' => 0),
- 'ShopCartName' => Array('type' => 'string', 'default' => null),
- 'Price' => Array('type' => 'double','default' => ''),
- 'Recurring' => Array('type' => 'int','not_null' => '1','default' => 0),
- 'VirtualProductId' => Array('type' => 'int','not_null' => '1','default' => 0),
+ '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' => 1, '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(
+ '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'=>'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
- 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Duration' => Array( 'title'=>'la_col_Duration' , 'data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100),
+ 'Fields' => Array (
+ 'ListingTypeId' => Array ( 'title' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
+ 'Name' => Array ( 'title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Duration' => Array ( 'title' => 'la_col_Duration' , 'data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100),
),
),
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 12997)
+++ in-link/units/links/links_config.php (working copy)
@@ -14,12 +14,12 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'l',
- 'ItemClass' => Array('class'=>'kCatDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kCatDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'LinkTagProcessor','file'=>'link_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'ConfigPriority' => 0,
@@ -33,7 +33,7 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
@@ -44,7 +44,7 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '#file',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineFiles',
@@ -54,14 +54,14 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareCaptcha',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
@@ -82,16 +82,16 @@
'SearchConfigPostfix' => 'links',
'IDField' => 'LinkId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'ItemType' => 4,
- 'StatisticsInfo' => Array(
- 'pending' => Array(
+ 'StatisticsInfo' => Array (
+ 'pending' => Array (
'icon' => 'icon16_link_pending.png',
'label' => 'la_Text_Links',
'js_url' => '#url#',
- 'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'l', 'pass' => 'm,l.showall', 'l.showall_event' => 'OnSetFilterPattern', 'l.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'l', 'pass' => 'm,l.showall', 'l.showall_event' => 'OnSetFilterPattern', 'l.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
'status' => STATUS_PENDING,
),
),
@@ -104,7 +104,7 @@
'CatalogSelectorName' => 'linklist', // used in old catalog section
- 'ItemPropertyMappings' => Array(
+ 'ItemPropertyMappings' => Array (
'NewDays' => 'Link_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Link_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Link_MinPopRating', // minimum rating for an item to be POP
@@ -116,59 +116,59 @@
'TitleField' => 'Name',
- 'TitlePresets' => Array(
- 'default' => Array(
- 'new_status_labels' => Array('l' => '!la_title_AddingLink!'),
- 'edit_status_labels' => Array('l'=>'!la_title_EditingLink!'),
- 'new_titlefield' => Array('l'=>'!la_title_NewLink!'),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('l' => '!la_title_AddingLink!'),
+ 'edit_status_labels' => Array ('l' => '!la_title_EditingLink!'),
+ 'new_titlefield' => Array ('l' => '!la_title_NewLink!'),
),
- 'links_edit' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!",
+ 'links_edit' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
- 'link_list' => Array(
- 'prefixes' => Array('c_List', 'l_List'),
+ 'link_list' => Array (
+ 'prefixes' => Array ('c_List', 'l_List'),
'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Links!",
'toolbar_buttons' => Array (),
),
- 'links_categories' => Array(
- 'prefixes' => Array('l','l-ci_List'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Categories!",
+ 'links_categories' => Array (
+ 'prefixes' => Array ('l', 'l-ci_List'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Categories!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'delete', 'setprimary',),
),
- 'links_relations' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Relations!",
+ 'links_relations' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Relations!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
- 'links_images' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Images!",
+ 'links_images' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Images!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'setprimary', 'view', 'dbl-click'),
),
- 'links_files' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Files!",
+ 'links_files' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Files!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'view', 'dbl-click'),
),
- 'links_reviews' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Reviews!",
+ 'links_reviews' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Reviews!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'move_up', 'move_down', 'view', 'dbl-click'),
),
- 'links_custom' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Custom!",
+ 'links_custom' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Custom!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
- 'images_edit' => Array(
- 'prefixes' => Array('l', 'l-img'),
- 'new_status_labels' => Array('l-img' => '!la_title_Adding_Image!'),
- 'edit_status_labels' => Array('l-img' => '!la_title_Editing_Image!'),
- 'new_titlefield' => Array('l-img' => '!la_title_New_Image!'),
+ 'images_edit' => Array (
+ 'prefixes' => Array ('l', 'l-img'),
+ 'new_status_labels' => Array ('l-img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('l-img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('l-img' => '!la_title_New_Image!'),
'format' => "#l_status# '#l_titlefield#' - #l-img_status# '#l-img_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel'),
),
@@ -182,37 +182,37 @@
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'reviews_edit' => Array(
- 'prefixes' => Array('l', 'l-rev'),
- 'new_status_labels' => Array('l-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"),
- 'edit_status_labels' => Array('l-rev'=>'!la_title_Editing_Review!'),
+ 'reviews_edit' => Array (
+ 'prefixes' => Array ('l', 'l-rev'),
+ 'new_status_labels' => Array ('l-rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
+ 'edit_status_labels' => Array ('l-rev' => '!la_title_Editing_Review!'),
'format' => "#l_status# '#l_titlefield#' - #l-rev_status#",
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'relations_edit' => Array(
- 'prefixes' => Array('l', 'l-rel'),
- 'new_status_labels' => Array('l-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
- 'edit_status_labels' => Array('l-rel'=>'!la_title_Editing_Relationship!'),
+ 'relations_edit' => Array (
+ 'prefixes' => Array ('l', 'l-rel'),
+ 'new_status_labels' => Array ('l-rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
+ 'edit_status_labels' => Array ('l-rel' => '!la_title_Editing_Relationship!'),
'format' => "#l_status# '#l_titlefield#' - #l-rel_status#",
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'links_export' => Array('format' => '!la_title_LinksExport!'),
+ 'links_export' => Array ('format' => '!la_title_LinksExport!'),
- 'links_import' => Array('format' => '!la_title_ImportLinks!'),
+ 'links_import' => Array ('format' => '!la_title_ImportLinks!'),
- 'duplicate_links' => Array(
- 'prefixes' => Array('l.duplicates_List'), 'format' => "!la_title_DuplicateLinks! - %s",
+ 'duplicate_links' => Array (
+ 'prefixes' => Array ('l.duplicates_List'), 'format' => "!la_title_DuplicateLinks! - %s",
'toolbar_buttons' => Array ('edit', 'view', 'dbl-click'),
),
- 'duplicate_links_view' => Array(
- 'prefixes' => Array('l.duplicates-sub_List'), 'format' => "!la_title_Links!",
+ 'duplicate_links_view' => Array (
+ 'prefixes' => Array ('l.duplicates-sub_List'), 'format' => "!la_title_Links!",
'toolbar_buttons' => Array ('cancel', 'edit', 'delete', 'merge_links', 'view', 'dbl-click'),
),
- 'tree_in-link' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Link', 'Version')),
+ 'tree_in-link' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Link', 'Version')),
),
'EditTabPresets' => Array (
@@ -230,37 +230,37 @@
'PermItemPrefix' => 'LINK',
'PermTabText' => 'In-Link',
- 'PermSection' => Array('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'email' => 'in-link:configuration_email', 'custom' => 'in-link:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'email' => 'in-link:configuration_email', 'custom' => 'in-link:configuration_custom'),
- 'Sections' => Array(
- 'in-link' => Array(
+ 'Sections' => Array (
+ 'in-link' => Array (
'parent' => 'in-portal:root',
'icon' => 'settings_in-link',
'label' => 'la_title_In-Link',
- 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
'priority' => 2.3,
'container' => true,
'type' => stTREE,
),
- 'in-link:links' => Array(
+ 'in-link:links' => Array (
'parent' => 'in-portal:site',
'icon' => 'links',
'label' => 'la_tab_Links',
- 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-l.showall', 'pass' => 'm'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-l.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'l.showall\')',
- 'permissions' => Array('view'),
+ 'permissions' => Array ('view'),
'priority' => 3.1,
'type' => stTREE,
),
- 'in-link:duplicate_checker' => Array(
+ 'in-link:duplicate_checker' => Array (
'parent' => 'in-link',
'icon' => 'duplicate_checker',
'label' => 'la_tab_DuplicateChecker',
- 'url' => Array('t' => 'in-link/duplicate_checker', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'in-link/duplicate_checker', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 2,
'type' => stTREE,
),
@@ -278,74 +278,74 @@
'type' => stTREE,
),
- /*'in-link:inlink_general' => Array(
+ /*'in-link:inlink_general' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 0.9,
'type' => stTREE,
),*/
- 'in-link:configuration_output' => Array(
+ 'in-link:configuration_output' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
- 'in-link:configuration_search' => Array(
+ 'in-link:configuration_search' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
- 'url' => Array('t' => 'config/config_search', 'module_key' => 'links', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_search', 'module_key' => 'links', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 2,
'type' => stTREE,
),
- 'in-link:configuration_email' => Array(
+ 'in-link:configuration_email' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_email',
'label' => 'la_tab_ConfigE-mail',
- 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
- 'in-link:configuration_custom' => Array(
+ 'in-link:configuration_custom' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
- 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 4, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 4, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 's1' => Array(),
- 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
- 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
- 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
- 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
+ 'Filters' => Array (
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 's1' => Array (),
+ 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
+ 'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
+ 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
+ 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
)
),
@@ -372,7 +372,7 @@
'CacheModRewrite' => true,
- 'AggregatedCalculatedFields' => Array(
+ 'AggregatedCalculatedFields' => Array (
'duplicates' => Array (
'DupeCount' => 'COUNT(*)',
@@ -380,7 +380,7 @@
),
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
@@ -391,13 +391,13 @@
), // key - special, value - list select sql
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc', 'Description' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc', 'Description' => 'desc'),
)
),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
@@ -405,34 +405,44 @@
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'%3$sLinkCustomData cust ON %1$s.ResourceId = cust.ResourceId'),
- 'SubItems' => Array('l-rev', 'l-ci', 'l-rel', 'l-img', 'l-cdata', 'l-fav', 'l-file'),
+ 'SubItems' => Array ('l-rev', 'l-ci', 'l-rel', 'l-img', 'l-cdata', 'l-fav', 'l-file'),
'Fields' => Array (
- 'LinkId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'max_len' => 255, 'default' => ''),
- 'AutomaticFilename' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
- 'Url' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Expire' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'CachedRating' => Array('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
- 'CachedVotesQty' => Array('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
- 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int', 'default' => null),
- 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'OrgId' => Array('type' => 'int', 'default' => null),
- 'CustomTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'LinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'max_len' => 255, 'default' => ''),
+ 'AutomaticFilename' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
+ 'Url' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
+ 'CachedVotesQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
+ 'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2,
+ ),
+ 'EditorsPick' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'OrgId' => Array ('type' => 'int', 'default' => null),
+ 'CustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'MetaKeywords' => Array ('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'ReciprocalLinkFound' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_NotChecked', 1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1,
@@ -440,9 +450,9 @@
),
),
- 'VirtualFields' => Array(
- 'UserName' => Array('type' => 'string', 'default' => ''),
- 'DupeCount' => Array('type' => 'string', 'default' => ''),
+ 'VirtualFields' => Array (
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'DupeCount' => Array ('type' => 'string', 'default' => ''),
'ListingTypeId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM '.TABLE_PREFIX.'ListingTypes ORDER BY Name', 'option_title_field' => 'Name', 'option_key_field' => 'ListingTypeId', 'default' => 0),
@@ -450,47 +460,47 @@
// export related fields: begin
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
- 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
- 'ExportFilename' => Array('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
- 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
- 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
- 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
- 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
- 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
- 'CategorySeparator' => Array('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
- 'IsBaseCategory' => Array('type' => 'int', 'default' => 0),
+ 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+ 'ExportFilename' => Array ('type' => 'string', 'default' => ''),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
+ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+ 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+ 'IncludeFieldTitles' => Array ('type' => 'int', 'default' => 1),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
+ 'CategorySeparator' => Array ('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
+ 'IsBaseCategory' => Array ('type' => 'int', 'default' => 0),
// export related fields: end
// import related fields: begin
- 'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
- 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/system/export') . '/'),
- 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
- 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
- 'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
- 'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Name' => 'NAME', 'Url' => 'URL'), 'default' => '|Name|Url|'),
- 'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
+ 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
+ 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/system/export') . '/'),
+ 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
+ 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
+ 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
+ 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME', 'Url' => 'URL'), 'default' => '|Name|Url|'),
+ 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
// import related fields: end
- 'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
- 'FullImage' => Array('type' => 'string', 'default' => ''),
- 'ImageAlt' => Array('type' => 'string', 'default' => ''),
+ 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''),
+ 'FullImage' => Array ('type' => 'string', 'default' => ''),
+ 'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array('type' => 'string','not_null' => 1,'default' => ''),
- 'CachedNavbar' => Array('type' => 'string', 'default' => ''),
- 'ParentPath' => Array('type' => 'string', 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
// for primary image
- 'SameImages' => Array('type' => 'string', 'default' => ''),
- 'LocalThumb' => Array('type' => 'string', 'default' => ''),
- 'ThumbPath' => Array('type' => 'string', 'default' => ''),
- 'ThumbUrl' => Array('type' => 'string', 'default' => ''),
- 'LocalImage' => Array('type' => 'string', 'default' => ''),
- 'LocalPath' => Array('type' => 'string', 'default' => ''),
- 'FullUrl' => Array('type' => 'string', 'default' => ''),
+ 'SameImages' => Array ('type' => 'string', 'default' => ''),
+ 'LocalThumb' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbPath' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
+ 'LocalImage' => Array ('type' => 'string', 'default' => ''),
+ 'LocalPath' => Array ('type' => 'string', 'default' => ''),
+ 'FullUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
@@ -502,13 +512,13 @@
'NEW' => 'icon16_link_new.png',
),
'Fields' => Array (
- 'LinkId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title'=>'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
+ 'LinkId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
'Url' => Array ('title' => 'la_col_LinkUrl', 'width' => 200, ),
'Description' => Array ('title' => 'la_col_Description', 'first_chars' => 100, 'width' => 100, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Modified' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'Hits' => Array ('title' => 'la_col_Hits', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'CachedRating' => Array ('title' => 'la_col_Rating', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
@@ -525,13 +535,13 @@
),
'Selector' => 'radio',
'Fields' => Array (
- 'LinkId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Name' => Array ('title'=>'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
+ 'LinkId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('title' => 'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
'Url' => Array ('title' => 'la_col_LinkUrl', 'width' => 200, ),
'Description' => Array ('title' => 'la_col_Description', 'first_chars' => 100, 'width' => 100, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Modified' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'Hits' => Array ('title' => 'la_col_Hits', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'CachedRating' => Array ('title' => 'la_col_Rating', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
@@ -556,7 +566,7 @@
),
- 'ConfigMapping' => Array(
+ 'ConfigMapping' => Array (
'PerPage' => 'Perpage_Links',
'ShortListPerPage' => 'Perpage_Links_Short',
'ForceEditorPick' => 'Link_ShowPick',
Index: in-link/units/listings/listings_config.php
===================================================================
--- in-link/units/listings/listings_config.php (revision 12997)
+++ in-link/units/listings/listings_config.php (working copy)
@@ -14,71 +14,71 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'ls',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ListingsEventHandler','file'=>'listings_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ListingsTagProcessor','file'=>'listings_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ListingsEventHandler', 'file' => 'listings_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ListingsTagProcessor', 'file' => 'listings_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
+ 'Hooks' => Array (
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'l',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnBeforeDeleteOriginal'),
+ 'HookToEvent' => Array ('OnBeforeDeleteOriginal'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnMoveEnhancement',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
- 'RegularEvents' => Array(
- 'listings_expiration' => Array('EventName' => 'OnCheckExpiredPaidListings', 'RunInterval' => 1800, 'Type' => reAFTER),
+ 'RegularEvents' => Array (
+ 'listings_expiration' => Array ('EventName' => 'OnCheckExpiredPaidListings', 'RunInterval' => 1800, 'Type' => reAFTER),
),
'IDField' => 'ListingId',
- 'StatusField' => Array('Status', 'PendingRenewal'),
+ 'StatusField' => Array ('Status', 'PendingRenewal'),
'TitleField' => 'LinkName',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('ls'=>'!la_title_AddingListing!'),
- 'edit_status_labels' => Array('ls'=>'!la_title_EditingListing!'),
- 'new_titlefield' => Array('ls'=>'!la_title_NewListing!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('ls' => '!la_title_AddingListing!'),
+ 'edit_status_labels' => Array ('ls' => '!la_title_EditingListing!'),
+ 'new_titlefield' => Array ('ls' => '!la_title_NewListing!'),
),
- 'listing_list' => Array('prefixes' => Array('ls_List'), 'format' => "!la_title_PaidListings!",),
- 'listing_edit' => Array('prefixes' => Array('ls'), 'format' => "#ls_status# '#ls_titlefield#' - !la_title_General!",),
+ 'listing_list' => Array ('prefixes' => Array ('ls_List'), 'format' => "!la_title_PaidListings!",),
+ 'listing_edit' => Array ('prefixes' => Array ('ls'), 'format' => "#ls_status# '#ls_titlefield#' - !la_title_General!",),
),
- 'PermSection' => Array('main' => 'in-link:paid_listings'),
+ 'PermSection' => Array ('main' => 'in-link:paid_listings'),
- 'Sections' => Array(
- 'in-link:paid_listings_folder' => Array(
+ 'Sections' => Array (
+ 'in-link:paid_listings_folder' => Array (
'parent' => 'in-link',
'icon' => 'paid_listings',
'label' => 'la_tab_PaidListings',
'use_parent_header' => 1,
- 'permissions' => Array(),
+ 'permissions' => Array (),
'priority' => 1,
'type' => stTREE,
),
- 'in-link:paid_listings' => Array(
+ 'in-link:paid_listings' => Array (
'parent' => 'in-link:paid_listings_folder',
'icon' => 'paid_listings',
'label' => 'la_tab_Listings',
- 'url' => Array('t' => 'in-link/paid_listings/paid_listings_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+ 'url' => Array ('t' => 'in-link/paid_listings/paid_listings_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 1.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
@@ -86,19 +86,19 @@
'TableName' => TABLE_PREFIX.'Listings',
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Link item_table ON item_table.ResourceId = %1$s.ItemResourceId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = item_table.CreatedById'),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Link item_table ON item_table.ResourceId = %1$s.ItemResourceId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = item_table.CreatedById'),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('PurchasedOn' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('PurchasedOn' => 'desc'),
)
),
@@ -108,40 +108,61 @@
'LinkOwner' => 'IF (ISNULL(u.Login), IF (item_table.CreatedById = -1, "root", IF (item_table.CreatedById = -2, "Guest", "n/a")), u.Login)',
),
),
- 'Fields' => Array
- (
- 'ListingId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'ListingTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ListingTypes ORDER BY Name', 'option_key_field'=>'ListingTypeId', 'option_title_field'=>'Name', 'default' => 0,),
- 'ItemResourceId' => Array('type' => 'int', 'required' => 1, 'unique' => Array('ItemResourceId'), 'error_field' => 'LinkName', 'default' => NULL),
- 'PurchasedOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter','default'=>'#NOW#'),
- 'ExpiresOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter','default' => '#NOW#','required'=>1),
- 'Status' => Array('type' => 'int', 'not_null' => 1, 'default' => 2, 'formatter'=>'kOptionsFormatter','options' => Array(1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'),'use_phrases' => 1),
- 'PendingRenewal' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options' => Array(0 => 'la_NotPendingRenewal', 1 => 'la_PendingRenewal'),'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'RenewalReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array (
+ 'ListingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'ListingTypeId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %s
+ FROM '.TABLE_PREFIX.'ListingTypes
+ ORDER BY Name',
+ 'option_key_field' => 'ListingTypeId', 'option_title_field' => 'Name',
+ 'default' => 0,
+ ),
+ 'ItemResourceId' => Array (
+ 'type' => 'int',
+ 'required' => 1, 'unique' => Array ('ItemResourceId'), 'default' => null,
+ 'error_field' => 'LinkName',
+ ),
+ 'PurchasedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ExpiresOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#', 'required' =>1),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2,
+ ),
+ 'PendingRenewal' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_NotPendingRenewal', 1 => 'la_PendingRenewal'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'RenewalReminderSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
'VirtualFields' => Array (
- 'LinkName' => Array ('type' => 'string'),
- 'LinkOwner' => Array ('type' => 'string'),
- ),
+ 'LinkName' => Array ('type' => 'string'),
+ 'LinkOwner' => Array ('type' => 'string'),
+ ),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array(3), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array (0,1,2), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array (3), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 2 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 3 => Array('label' => 'la_PendingRenewal', 'on_sql' => '', 'off_sql' => '%1$s.PendingRenewal != 1' ),
+ 'Filters' => Array (
+ 0 => Array ('label' => 'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 1 => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 2 => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 3 => Array ('label' => 'la_PendingRenewal', 'on_sql' => '', 'off_sql' => '%1$s.PendingRenewal != 1' ),
)
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'1_0' => 'icon16_link.png',
'0_0' => 'icon16_link_disabled.png',
@@ -151,14 +172,14 @@
'2_1' => 'icon16_link_pending.png'),
'module' => 'core',
- 'Fields' => Array(
- 'ListingId' => Array( 'title'=>'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'LinkName' => Array( 'title'=>'la_col_LinkName' , 'data_block' => 'link_td', 'filter_block' => 'grid_like_filter', 'width' => 170, ),
- 'ListingTypeId' => Array( 'title'=>'la_col_ListingTypeName' , 'data_block' => 'listing_type_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'LinkOwner' => Array( 'title'=>'la_col_LinkOwner', 'filter_block' => 'grid_like_filter', 'width' => 115, ),
- 'PendingRenewal' => Array( 'title'=>'la_col_PendingRenewal', 'filter_block' => 'grid_options_filter', 'width' => 143, ),
- 'PurchasedOn' => Array( 'title'=>'la_col_PurchasedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
- 'ExpiresOn' => Array( 'title'=>'la_col_ExpiresOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'Fields' => Array (
+ 'ListingId' => Array ( 'title' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'LinkName' => Array ( 'title' => 'la_col_LinkName' , 'data_block' => 'link_td', 'filter_block' => 'grid_like_filter', 'width' => 170, ),
+ 'ListingTypeId' => Array ( 'title' => 'la_col_ListingTypeName' , 'data_block' => 'listing_type_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'LinkOwner' => Array ( 'title' => 'la_col_LinkOwner', 'filter_block' => 'grid_like_filter', 'width' => 115, ),
+ 'PendingRenewal' => Array ( 'title' => 'la_col_PendingRenewal', 'filter_block' => 'grid_options_filter', 'width' => 143, ),
+ 'PurchasedOn' => Array ( 'title' => 'la_col_PurchasedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'ExpiresOn' => Array ( 'title' => 'la_col_ExpiresOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
),
),
),
57-Set_formatters_for_checkbox_type_fields-Dmitry-20100314-IN-LINK.patch [^] (73,254 bytes) 2010-03-14 22:05
[Show Content]
Index: in-link/units/listing_types/listing_types_config.php
===================================================================
--- in-link/units/listing_types/listing_types_config.php (revision 13213)
+++ in-link/units/listing_types/listing_types_config.php (working copy)
@@ -14,27 +14,27 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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'),
+ '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(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListListingTypes',
'LocalTagName' => 'PrintList',
),
- Array(
+ Array (
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListingTypeField',
'LocalTagName' => 'Field',
),
),
- 'Hooks' => Array(),
- 'QueryString' => Array(
+ 'Hooks' => Array (),
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
@@ -42,20 +42,20 @@
),
'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!'),
+ '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'),
+ '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!'),
+ '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!'),
+ 'listing_type_shop_cart' =>Array ( 'prefixes' => Array ('lst'),
+ 'new_titlefield' => Array ('lst' => '!la_title_NewPaidListingType!'),
'format' => "#lst_status# '#lst_titlefield#' - !la_title_ShopCartEntry!",
),
@@ -68,15 +68,15 @@
),
),
- 'PermSection' => Array('main' => 'in-link:listing_types'),
+ 'PermSection' => Array ('main' => 'in-link:listing_types'),
- 'Sections' => Array(
- 'in-link:listing_types' => Array(
+ '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'),
+ 'url' => Array ('t' => 'in-link/paid_listings/paid_listing_types_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 1.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
@@ -84,67 +84,76 @@
'TableName' => TABLE_PREFIX.'ListingTypes',
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',), // key - special, value - list select sql
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('ListingTypeId' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('ListingTypeId' => 'asc'),
)
),
- '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),
+ '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),
- '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),
+ '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),
- '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' => ''),
+ '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' => ''),
- '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' => ''),
+ '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' => ''),
- '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','not_null' => '1','default' => 0),
- 'ShopCartName' => Array('type' => 'string', 'default' => null),
- 'Price' => Array('type' => 'double','default' => ''),
- 'Recurring' => Array('type' => 'int','not_null' => '1','default' => 0),
- 'VirtualProductId' => Array('type' => 'int','not_null' => '1','default' => 0),
+ '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' => 1, '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(
+ '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'=>'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
- 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 250),
- 'Duration' => Array( 'title'=>'la_col_Duration' , 'data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100),
+ 'Fields' => Array (
+ 'ListingTypeId' => Array ( 'title' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
+ 'Name' => Array ( 'title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 250),
+ 'Duration' => Array ( 'title' => 'la_col_Duration' , 'data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100),
),
),
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 13213)
+++ in-link/units/links/links_config.php (working copy)
@@ -14,12 +14,12 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'l',
- 'ItemClass' => Array('class'=>'kCatDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kCatDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'LinkTagProcessor','file'=>'link_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'ConfigPriority' => 0,
@@ -33,7 +33,7 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
@@ -44,7 +44,7 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '#file',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineFiles',
@@ -54,14 +54,14 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareCaptcha',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
@@ -82,16 +82,16 @@
'SearchConfigPostfix' => 'links',
'IDField' => 'LinkId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'ItemType' => 4,
- 'StatisticsInfo' => Array(
- 'pending' => Array(
+ 'StatisticsInfo' => Array (
+ 'pending' => Array (
'icon' => 'icon16_link_pending.png',
'label' => 'la_Text_Links',
'js_url' => '#url#',
- 'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'l', 'pass' => 'm,l.showall', 'l.showall_event' => 'OnSetFilterPattern', 'l.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'l', 'pass' => 'm,l.showall', 'l.showall_event' => 'OnSetFilterPattern', 'l.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
'status' => STATUS_PENDING,
),
),
@@ -104,7 +104,7 @@
'CatalogSelectorName' => 'linklist', // used in old catalog section
- 'ItemPropertyMappings' => Array(
+ 'ItemPropertyMappings' => Array (
'NewDays' => 'Link_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Link_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Link_MinPopRating', // minimum rating for an item to be POP
@@ -116,59 +116,59 @@
'TitleField' => 'Name',
- 'TitlePresets' => Array(
- 'default' => Array(
- 'new_status_labels' => Array('l' => '!la_title_AddingLink!'),
- 'edit_status_labels' => Array('l'=>'!la_title_EditingLink!'),
- 'new_titlefield' => Array('l'=>'!la_title_NewLink!'),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('l' => '!la_title_AddingLink!'),
+ 'edit_status_labels' => Array ('l' => '!la_title_EditingLink!'),
+ 'new_titlefield' => Array ('l' => '!la_title_NewLink!'),
),
- 'links_edit' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!",
+ 'links_edit' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
- 'link_list' => Array(
- 'prefixes' => Array('c_List', 'l_List'),
+ 'link_list' => Array (
+ 'prefixes' => Array ('c_List', 'l_List'),
'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Links!",
'toolbar_buttons' => Array (),
),
- 'links_categories' => Array(
- 'prefixes' => Array('l','l-ci_List'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Categories!",
+ 'links_categories' => Array (
+ 'prefixes' => Array ('l', 'l-ci_List'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Categories!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'delete', 'setprimary',),
),
- 'links_relations' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Relations!",
+ 'links_relations' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Relations!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
- 'links_images' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Images!",
+ 'links_images' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Images!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'setprimary', 'view', 'dbl-click'),
),
- 'links_files' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Files!",
+ 'links_files' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Files!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'view', 'dbl-click'),
),
- 'links_reviews' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Reviews!",
+ 'links_reviews' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Reviews!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'move_up', 'move_down', 'view', 'dbl-click'),
),
- 'links_custom' => Array(
- 'prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Custom!",
+ 'links_custom' => Array (
+ 'prefixes' => Array ('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Custom!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
- 'images_edit' => Array(
- 'prefixes' => Array('l', 'l-img'),
- 'new_status_labels' => Array('l-img' => '!la_title_Adding_Image!'),
- 'edit_status_labels' => Array('l-img' => '!la_title_Editing_Image!'),
- 'new_titlefield' => Array('l-img' => '!la_title_New_Image!'),
+ 'images_edit' => Array (
+ 'prefixes' => Array ('l', 'l-img'),
+ 'new_status_labels' => Array ('l-img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('l-img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('l-img' => '!la_title_New_Image!'),
'format' => "#l_status# '#l_titlefield#' - #l-img_status# '#l-img_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel'),
),
@@ -182,37 +182,37 @@
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'reviews_edit' => Array(
- 'prefixes' => Array('l', 'l-rev'),
- 'new_status_labels' => Array('l-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"),
- 'edit_status_labels' => Array('l-rev'=>'!la_title_Editing_Review!'),
+ 'reviews_edit' => Array (
+ 'prefixes' => Array ('l', 'l-rev'),
+ 'new_status_labels' => Array ('l-rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
+ 'edit_status_labels' => Array ('l-rev' => '!la_title_Editing_Review!'),
'format' => "#l_status# '#l_titlefield#' - #l-rev_status#",
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'relations_edit' => Array(
- 'prefixes' => Array('l', 'l-rel'),
- 'new_status_labels' => Array('l-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
- 'edit_status_labels' => Array('l-rel'=>'!la_title_Editing_Relationship!'),
+ 'relations_edit' => Array (
+ 'prefixes' => Array ('l', 'l-rel'),
+ 'new_status_labels' => Array ('l-rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
+ 'edit_status_labels' => Array ('l-rel' => '!la_title_Editing_Relationship!'),
'format' => "#l_status# '#l_titlefield#' - #l-rel_status#",
'toolbar_buttons' => Array ('select', 'cancel'),
),
- 'links_export' => Array('format' => '!la_title_LinksExport!'),
+ 'links_export' => Array ('format' => '!la_title_LinksExport!'),
- 'links_import' => Array('format' => '!la_title_ImportLinks!'),
+ 'links_import' => Array ('format' => '!la_title_ImportLinks!'),
- 'duplicate_links' => Array(
- 'prefixes' => Array('l.duplicates_List'), 'format' => "!la_title_DuplicateLinks! - %s",
+ 'duplicate_links' => Array (
+ 'prefixes' => Array ('l.duplicates_List'), 'format' => "!la_title_DuplicateLinks! - %s",
'toolbar_buttons' => Array ('edit', 'view', 'dbl-click'),
),
- 'duplicate_links_view' => Array(
- 'prefixes' => Array('l.duplicates-sub_List'), 'format' => "!la_title_Links!",
+ 'duplicate_links_view' => Array (
+ 'prefixes' => Array ('l.duplicates-sub_List'), 'format' => "!la_title_Links!",
'toolbar_buttons' => Array ('cancel', 'edit', 'delete', 'merge_links', 'view', 'dbl-click'),
),
- 'tree_in-link' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Link', 'Version')),
+ 'tree_in-link' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Link', 'Version')),
),
'EditTabPresets' => Array (
@@ -230,37 +230,37 @@
'PermItemPrefix' => 'LINK',
'PermTabText' => 'In-Link',
- 'PermSection' => Array('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'email' => 'in-link:configuration_email', 'custom' => 'in-link:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'email' => 'in-link:configuration_email', 'custom' => 'in-link:configuration_custom'),
- 'Sections' => Array(
- 'in-link' => Array(
+ 'Sections' => Array (
+ 'in-link' => Array (
'parent' => 'in-portal:root',
'icon' => 'settings_in-link',
'label' => 'la_title_In-Link',
- 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
'priority' => 2.3,
'container' => true,
'type' => stTREE,
),
- 'in-link:links' => Array(
+ 'in-link:links' => Array (
'parent' => 'in-portal:site',
'icon' => 'links',
'label' => 'la_tab_Links',
- 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-l.showall', 'pass' => 'm'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-l.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'l.showall\')',
- 'permissions' => Array('view'),
+ 'permissions' => Array ('view'),
'priority' => 3.1,
'type' => stTREE,
),
- 'in-link:duplicate_checker' => Array(
+ 'in-link:duplicate_checker' => Array (
'parent' => 'in-link',
'icon' => 'duplicate_checker',
'label' => 'la_tab_DuplicateChecker',
- 'url' => Array('t' => 'in-link/duplicate_checker', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'in-link/duplicate_checker', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 2,
'type' => stTREE,
),
@@ -278,74 +278,74 @@
'type' => stTREE,
),
- /*'in-link:inlink_general' => Array(
+ /*'in-link:inlink_general' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 0.9,
'type' => stTREE,
),*/
- 'in-link:configuration_output' => Array(
+ 'in-link:configuration_output' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
- 'in-link:configuration_search' => Array(
+ 'in-link:configuration_search' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
- 'url' => Array('t' => 'config/config_search', 'module_key' => 'links', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_search', 'module_key' => 'links', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 2,
'type' => stTREE,
),
- 'in-link:configuration_email' => Array(
+ 'in-link:configuration_email' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_email',
'label' => 'la_tab_ConfigE-mail',
- 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
- 'in-link:configuration_custom' => Array(
+ 'in-link:configuration_custom' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
- 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 4, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 4, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 's1' => Array(),
- 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
- 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
- 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
- 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
+ 'Filters' => Array (
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 's1' => Array (),
+ 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
+ 'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
+ 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
+ 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
)
),
@@ -372,7 +372,7 @@
'CacheModRewrite' => true,
- 'AggregatedCalculatedFields' => Array(
+ 'AggregatedCalculatedFields' => Array (
'duplicates' => Array (
'DupeCount' => 'COUNT(*)',
@@ -380,7 +380,7 @@
),
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
@@ -391,13 +391,13 @@
), // key - special, value - list select sql
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc', 'Description' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc', 'Description' => 'desc'),
)
),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
@@ -405,34 +405,44 @@
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'%3$sLinkCustomData cust ON %1$s.ResourceId = cust.ResourceId'),
- 'SubItems' => Array('l-rev', 'l-ci', 'l-rel', 'l-img', 'l-cdata', 'l-fav', 'l-file'),
+ 'SubItems' => Array ('l-rev', 'l-ci', 'l-rel', 'l-img', 'l-cdata', 'l-fav', 'l-file'),
'Fields' => Array (
- 'LinkId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'max_len' => 255, 'default' => ''),
- 'AutomaticFilename' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
- 'Url' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Expire' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'CachedRating' => Array('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
- 'CachedVotesQty' => Array('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
- 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int', 'default' => null),
- 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
- 'OrgId' => Array('type' => 'int', 'default' => null),
- 'CustomTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'LinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'max_len' => 255, 'default' => ''),
+ 'AutomaticFilename' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
+ 'Url' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
+ 'CachedVotesQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
+ 'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2,
+ ),
+ 'EditorsPick' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'OrgId' => Array ('type' => 'int', 'default' => null),
+ 'CustomTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'MetaKeywords' => Array ('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'ReciprocalLinkFound' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_NotChecked', 1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1,
@@ -440,9 +450,9 @@
),
),
- 'VirtualFields' => Array(
- 'UserName' => Array('type' => 'string', 'default' => ''),
- 'DupeCount' => Array('type' => 'string', 'default' => ''),
+ 'VirtualFields' => Array (
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'DupeCount' => Array ('type' => 'string', 'default' => ''),
'ListingTypeId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM '.TABLE_PREFIX.'ListingTypes ORDER BY Name', 'option_title_field' => 'Name', 'option_key_field' => 'ListingTypeId', 'default' => 0),
@@ -450,47 +460,57 @@
// export related fields: begin
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
- 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
- 'ExportFilename' => Array('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
- 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
- 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
- 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
- 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
- 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
- 'CategorySeparator' => Array('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
- 'IsBaseCategory' => Array('type' => 'int', 'default' => 0),
+ 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+ 'ExportFilename' => Array ('type' => 'string', 'default' => ''),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
+ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+ 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+ 'IncludeFieldTitles' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
+ 'CategorySeparator' => Array ('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
+ 'IsBaseCategory' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
// export related fields: end
// import related fields: begin
- 'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
- 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/system/export') . '/'),
- 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
- 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
- 'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
- 'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Name' => 'NAME', 'Url' => 'URL'), 'default' => '|Name|Url|'),
- 'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
+ 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
+ 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/system/export') . '/'),
+ 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
+ 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
+ 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
+ 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME', 'Url' => 'URL'), 'default' => '|Name|Url|'),
+ 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
// import related fields: end
- 'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
- 'FullImage' => Array('type' => 'string', 'default' => ''),
- 'ImageAlt' => Array('type' => 'string', 'default' => ''),
+ 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''),
+ 'FullImage' => Array ('type' => 'string', 'default' => ''),
+ 'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array('type' => 'string','not_null' => 1,'default' => ''),
- 'CachedNavbar' => Array('type' => 'string', 'default' => ''),
- 'ParentPath' => Array('type' => 'string', 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
// for primary image
- 'SameImages' => Array('type' => 'string', 'default' => ''),
- 'LocalThumb' => Array('type' => 'string', 'default' => ''),
- 'ThumbPath' => Array('type' => 'string', 'default' => ''),
- 'ThumbUrl' => Array('type' => 'string', 'default' => ''),
- 'LocalImage' => Array('type' => 'string', 'default' => ''),
- 'LocalPath' => Array('type' => 'string', 'default' => ''),
- 'FullUrl' => Array('type' => 'string', 'default' => ''),
+ 'SameImages' => Array ('type' => 'string', 'default' => ''),
+ 'LocalThumb' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbPath' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
+ 'LocalImage' => Array ('type' => 'string', 'default' => ''),
+ 'LocalPath' => Array ('type' => 'string', 'default' => ''),
+ 'FullUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
@@ -502,13 +522,13 @@
'NEW' => 'icon16_link_new.png',
),
'Fields' => Array (
- 'LinkId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array ('title'=>'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
+ 'LinkId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ('title' => 'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
'Url' => Array ('title' => 'la_col_LinkUrl', 'width' => 200, ),
'Description' => Array ('title' => 'la_col_Description', 'first_chars' => 100, 'width' => 100, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Modified' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'Hits' => Array ('title' => 'la_col_Hits', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'CachedRating' => Array ('title' => 'la_col_Rating', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
@@ -525,13 +545,13 @@
),
'Selector' => 'radio',
'Fields' => Array (
- 'LinkId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Name' => Array ('title'=>'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
+ 'LinkId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('title' => 'la_col_LinkName', 'data_block' => 'grid_catitem_td', 'width' => 200, ),
'Url' => Array ('title' => 'la_col_LinkUrl', 'width' => 200, ),
'Description' => Array ('title' => 'la_col_Description', 'first_chars' => 100, 'width' => 100, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Modified' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'Hits' => Array ('title' => 'la_col_Hits', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'CachedRating' => Array ('title' => 'la_col_Rating', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
@@ -556,7 +576,7 @@
),
- 'ConfigMapping' => Array(
+ 'ConfigMapping' => Array (
'PerPage' => 'Perpage_Links',
'ShortListPerPage' => 'Perpage_Links_Short',
'ForceEditorPick' => 'Link_ShowPick',
Index: in-link/units/listings/listings_config.php
===================================================================
--- in-link/units/listings/listings_config.php (revision 13213)
+++ in-link/units/listings/listings_config.php (working copy)
@@ -14,71 +14,71 @@
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'ls',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ListingsEventHandler','file'=>'listings_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ListingsTagProcessor','file'=>'listings_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ListingsEventHandler', 'file' => 'listings_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ListingsTagProcessor', 'file' => 'listings_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
+ 'Hooks' => Array (
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'l',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnBeforeDeleteOriginal'),
+ 'HookToEvent' => Array ('OnBeforeDeleteOriginal'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnMoveEnhancement',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
- 'RegularEvents' => Array(
- 'listings_expiration' => Array('EventName' => 'OnCheckExpiredPaidListings', 'RunInterval' => 1800, 'Type' => reAFTER),
+ 'RegularEvents' => Array (
+ 'listings_expiration' => Array ('EventName' => 'OnCheckExpiredPaidListings', 'RunInterval' => 1800, 'Type' => reAFTER),
),
'IDField' => 'ListingId',
- 'StatusField' => Array('Status', 'PendingRenewal'),
+ 'StatusField' => Array ('Status', 'PendingRenewal'),
'TitleField' => 'LinkName',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('ls'=>'!la_title_AddingListing!'),
- 'edit_status_labels' => Array('ls'=>'!la_title_EditingListing!'),
- 'new_titlefield' => Array('ls'=>'!la_title_NewListing!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('ls' => '!la_title_AddingListing!'),
+ 'edit_status_labels' => Array ('ls' => '!la_title_EditingListing!'),
+ 'new_titlefield' => Array ('ls' => '!la_title_NewListing!'),
),
- 'listing_list' => Array('prefixes' => Array('ls_List'), 'format' => "!la_title_PaidListings!",),
- 'listing_edit' => Array('prefixes' => Array('ls'), 'format' => "#ls_status# '#ls_titlefield#' - !la_title_General!",),
+ 'listing_list' => Array ('prefixes' => Array ('ls_List'), 'format' => "!la_title_PaidListings!",),
+ 'listing_edit' => Array ('prefixes' => Array ('ls'), 'format' => "#ls_status# '#ls_titlefield#' - !la_title_General!",),
),
- 'PermSection' => Array('main' => 'in-link:paid_listings'),
+ 'PermSection' => Array ('main' => 'in-link:paid_listings'),
- 'Sections' => Array(
- 'in-link:paid_listings_folder' => Array(
+ 'Sections' => Array (
+ 'in-link:paid_listings_folder' => Array (
'parent' => 'in-link',
'icon' => 'paid_listings',
'label' => 'la_tab_PaidListings',
'use_parent_header' => 1,
- 'permissions' => Array(),
+ 'permissions' => Array (),
'priority' => 1,
'type' => stTREE,
),
- 'in-link:paid_listings' => Array(
+ 'in-link:paid_listings' => Array (
'parent' => 'in-link:paid_listings_folder',
'icon' => 'paid_listings',
'label' => 'la_tab_Listings',
- 'url' => Array('t' => 'in-link/paid_listings/paid_listings_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+ 'url' => Array ('t' => 'in-link/paid_listings/paid_listings_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 1.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
@@ -86,19 +86,19 @@
'TableName' => TABLE_PREFIX.'Listings',
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Link item_table ON item_table.ResourceId = %1$s.ItemResourceId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = item_table.CreatedById'),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Link item_table ON item_table.ResourceId = %1$s.ItemResourceId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = item_table.CreatedById'),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('PurchasedOn' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('PurchasedOn' => 'desc'),
)
),
@@ -108,40 +108,61 @@
'LinkOwner' => 'IF (ISNULL(u.Login), IF (item_table.CreatedById = -1, "root", IF (item_table.CreatedById = -2, "Guest", "n/a")), u.Login)',
),
),
- 'Fields' => Array
- (
- 'ListingId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'ListingTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ListingTypes ORDER BY Name', 'option_key_field'=>'ListingTypeId', 'option_title_field'=>'Name', 'default' => 0,),
- 'ItemResourceId' => Array('type' => 'int', 'required' => 1, 'unique' => Array('ItemResourceId'), 'error_field' => 'LinkName', 'default' => NULL),
- 'PurchasedOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter','default'=>'#NOW#'),
- 'ExpiresOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter','default' => '#NOW#','required'=>1),
- 'Status' => Array('type' => 'int', 'not_null' => 1, 'default' => 2, 'formatter'=>'kOptionsFormatter','options' => Array(1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'),'use_phrases' => 1),
- 'PendingRenewal' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options' => Array(0 => 'la_NotPendingRenewal', 1 => 'la_PendingRenewal'),'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'RenewalReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array (
+ 'ListingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'ListingTypeId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %s
+ FROM '.TABLE_PREFIX.'ListingTypes
+ ORDER BY Name',
+ 'option_key_field' => 'ListingTypeId', 'option_title_field' => 'Name',
+ 'default' => 0,
+ ),
+ 'ItemResourceId' => Array (
+ 'type' => 'int',
+ 'required' => 1, 'unique' => Array ('ItemResourceId'), 'default' => null,
+ 'error_field' => 'LinkName',
+ ),
+ 'PurchasedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ExpiresOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#', 'required' =>1),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2,
+ ),
+ 'PendingRenewal' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_NotPendingRenewal', 1 => 'la_PendingRenewal'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'RenewalReminderSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
'VirtualFields' => Array (
- 'LinkName' => Array ('type' => 'string'),
- 'LinkOwner' => Array ('type' => 'string'),
- ),
+ 'LinkName' => Array ('type' => 'string'),
+ 'LinkOwner' => Array ('type' => 'string'),
+ ),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array(3), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array (0,1,2), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array (3), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 2 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 3 => Array('label' => 'la_PendingRenewal', 'on_sql' => '', 'off_sql' => '%1$s.PendingRenewal != 1' ),
+ 'Filters' => Array (
+ 0 => Array ('label' => 'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 1 => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 2 => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 3 => Array ('label' => 'la_PendingRenewal', 'on_sql' => '', 'off_sql' => '%1$s.PendingRenewal != 1' ),
)
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'1_0' => 'icon16_link.png',
'0_0' => 'icon16_link_disabled.png',
@@ -151,14 +172,14 @@
'2_1' => 'icon16_link_pending.png'),
'module' => 'core',
- 'Fields' => Array(
- 'ListingId' => Array( 'title'=>'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'LinkName' => Array( 'title'=>'la_col_LinkName' , 'data_block' => 'link_td', 'filter_block' => 'grid_like_filter', 'width' => 170, ),
- 'ListingTypeId' => Array( 'title'=>'la_col_ListingTypeName' , 'data_block' => 'listing_type_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'LinkOwner' => Array( 'title'=>'la_col_LinkOwner', 'filter_block' => 'grid_like_filter', 'width' => 115, ),
- 'PendingRenewal' => Array( 'title'=>'la_col_PendingRenewal', 'filter_block' => 'grid_options_filter', 'width' => 143, ),
- 'PurchasedOn' => Array( 'title'=>'la_col_PurchasedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
- 'ExpiresOn' => Array( 'title'=>'la_col_ExpiresOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'Fields' => Array (
+ 'ListingId' => Array ( 'title' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'LinkName' => Array ( 'title' => 'la_col_LinkName' , 'data_block' => 'link_td', 'filter_block' => 'grid_like_filter', 'width' => 170, ),
+ 'ListingTypeId' => Array ( 'title' => 'la_col_ListingTypeName' , 'data_block' => 'listing_type_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'LinkOwner' => Array ( 'title' => 'la_col_LinkOwner', 'filter_block' => 'grid_like_filter', 'width' => 115, ),
+ 'PendingRenewal' => Array ( 'title' => 'la_col_PendingRenewal', 'filter_block' => 'grid_options_filter', 'width' => 143, ),
+ 'PurchasedOn' => Array ( 'title' => 'la_col_PurchasedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'ExpiresOn' => Array ( 'title' => 'la_col_ExpiresOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
),
),
),
|