Index: admin/system_presets/simple/promo_blocks_promo-block.php =================================================================== --- admin/system_presets/simple/promo_blocks_promo-block.php (revision 0) +++ admin/system_presets/simple/promo_blocks_promo-block.php (revision 0) @@ -0,0 +1,48 @@ + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + " id="" value="" tabindex="" size="" datepickerIcon="core/admin_templates/img/calendar_icon.gif">  + " + style="cursor: pointer; margin-right: 5px" + title="Date selector" + /> + + + " id="" value=""> + + + + " id="" value="" tabindex="" size="" datepickerIcon="core/admin_templates/img/calendar_icon.gif">  + " + style="cursor: pointer; margin-right: 5px" + title="Date selector" + /> + + + " id="" value=""> + +
+
+ + + + Index: core/admin_templates/promo_blocks/promo_block_list.tpl =================================================================== --- core/admin_templates/promo_blocks/promo_block_list.tpl (revision 0) +++ core/admin_templates/promo_blocks/promo_block_list.tpl (revision 0) @@ -0,0 +1,66 @@ + + + + + + + + + + +
+ +
+ + + "> + + + + + \ No newline at end of file Index: core/install/english.lang =================================================================== --- core/install/english.lang (revision 14592) +++ core/install/english.lang (working copy) @@ -1495,6 +1495,47 @@ QXV0by1EZXRlY3Q= Q29va2llcw== UXVlcnkgU3RyaW5nIChTSUQp + TGluZWFy + U3dpbmc= + UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp + UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw== + UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q= + VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk= + UHJvbW8gU2V0dGluZ3M= + VGV4dA== + T3BlbiBJbiBOZXcgV2luZG93 + RXh0ZXJuYWwgTGluaw== + Q1RSLCAl + Q1RSLCAl + U2V0IFN0aWNreQ== + UmVzZXQgQ291bnRlcnM= + UHJvbW8gQmxvY2tz + SUQ= + VGl0bGU= + U3RhdHVz + U3RpY2t5 + Q1RSLCAl + Q1NTIENsYXNzIE5hbWU= + TGluayBUeXBl + U2VjdGlvbg== + RXh0ZXJuYWwgTGluaw== + U2NoZWR1bGUgRnJvbSBEYXRl + U2NoZWR1bGUgVG8gRGF0ZQ== + TnVtYmVyIE9mIENsaWNrcw== + TnVtYmVyIE9mIFZpZXdz + T3JkZXI= + QWRkaW5nIFByb21vIEJsb2Nr + RWRpdGluZyBQcm9tbyBCbG9jaw== + VGV4dA== + T3JkZXI= + Q1NTIENsYXNzIE5hbWU= + TGluayBUeXBl + RXh0ZXJuYWwgTGluaw== + U2NoZWR1bGUgRGF0ZQ== + T3BlbiBJbiBOZXcgV2luZG93 + RnJvbQ== + dG8= + UHJvbW8gQmxvY2tz U3ViamVjdDogTmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIC0gQWRkZWQKCllvdXIgc3VnZ2VzdGVkIGNhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGhhcyBiZWVuIGFkZGVkLg== Index: core/install/install_data.sql =================================================================== --- core/install/install_data.sql (revision 14592) +++ core/install/install_data.sql (working copy) @@ -131,6 +131,12 @@ INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CategoriesRebuildSerial', '0', 'In-Portal', '', '', '', '', NULL, NULL, 0, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoRotationDelay', '2', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoRotationDelay', 'text', '', '', 10.01, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionTime', '0.7', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionTime', 'text', '', '', 10.02, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionControls', '1', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionControls', 'select', '', '1=la_Enabled||0=la_Disabled', 10.03, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionEffect', 'swing', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionEffect', 'select', '', 'swing=la_opt_FadeSwing||linear=la_opt_FadeLinear', 10.04, 2, 1, NULL); + + INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category'); INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User'); Index: core/install/install_schema.sql =================================================================== --- core/install/install_schema.sql (revision 14592) +++ core/install/install_schema.sql (working copy) @@ -1186,4 +1186,34 @@ KEY ExternalUrl (ExternalUrl), KEY RedirectOnIPMatch (RedirectOnIPMatch), KEY Priority (Priority) -); \ No newline at end of file +); + +CREATE TABLE PromoBlocks ( + BlockId int(11) NOT NULL AUTO_INCREMENT, + Title varchar(50) NOT NULL DEFAULT '', + Priority int(11) NOT NULL DEFAULT '0', + Status tinyint(1) NOT NULL DEFAULT '0', + l1_Image varchar(255) NOT NULL DEFAULT '', + l2_Image varchar(255) NOT NULL DEFAULT '', + l3_Image varchar(255) NOT NULL DEFAULT '', + l4_Image varchar(255) NOT NULL DEFAULT '', + l5_Image varchar(255) NOT NULL DEFAULT '', + CSSClassName varchar(255) NOT NULL DEFAULT '', + LinkType tinyint(1) NOT NULL DEFAULT '1', + CategoryId int(11) NOT NULL DEFAULT '0', + ExternalLink varchar(255) NOT NULL DEFAULT '', + OpenInNewWindow tinyint(3) unsigned NOT NULL DEFAULT '0', + ScheduleFromDate int(11) DEFAULT NULL, + ScheduleToDate int(11) DEFAULT NULL, + NumberOfClicks int(11) NOT NULL DEFAULT '0', + NumberOfViews int(11) NOT NULL DEFAULT '0', + Sticky tinyint(1) NOT NULL DEFAULT '0', + Html text, + l1_Html text, + l2_Html text, + l3_Html text, + l4_Html text, + l5_Html text, + PRIMARY KEY (BlockId), + KEY OpenInNewWindow (OpenInNewWindow) +); Index: core/install/upgrades.sql =================================================================== --- core/install/upgrades.sql (revision 14592) +++ core/install/upgrades.sql (working copy) @@ -2105,4 +2105,39 @@ UPDATE Category SET DirectLinkAuthKey = SUBSTRING( MD5( CONCAT(CategoryId, ':', ParentId, ':', l<%PRIMARY_LANGUAGE%>_Name, ':b38') ), 1, 20) -WHERE DirectLinkAuthKey = ''; \ No newline at end of file +WHERE DirectLinkAuthKey = ''; + +CREATE TABLE PromoBlocks ( + BlockId int(11) NOT NULL AUTO_INCREMENT, + Title varchar(50) NOT NULL DEFAULT '', + Priority int(11) NOT NULL DEFAULT '0', + Status tinyint(1) NOT NULL DEFAULT '0', + l1_Image varchar(255) NOT NULL DEFAULT '', + l2_Image varchar(255) NOT NULL DEFAULT '', + l3_Image varchar(255) NOT NULL DEFAULT '', + l4_Image varchar(255) NOT NULL DEFAULT '', + l5_Image varchar(255) NOT NULL DEFAULT '', + CSSClassName varchar(255) NOT NULL DEFAULT '', + LinkType tinyint(1) NOT NULL DEFAULT '1', + CategoryId int(11) NOT NULL DEFAULT '0', + ExternalLink varchar(255) NOT NULL DEFAULT '', + OpenInNewWindow tinyint(3) unsigned NOT NULL DEFAULT '0', + ScheduleFromDate int(11) DEFAULT NULL, + ScheduleToDate int(11) DEFAULT NULL, + NumberOfClicks int(11) NOT NULL DEFAULT '0', + NumberOfViews int(11) NOT NULL DEFAULT '0', + Sticky tinyint(1) NOT NULL DEFAULT '0', + Html text, + l1_Html text, + l2_Html text, + l3_Html text, + l4_Html text, + l5_Html text, + PRIMARY KEY (BlockId), + KEY OpenInNewWindow (OpenInNewWindow) +); + +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoRotationDelay', '2', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoRotationDelay', 'text', '', '', 10.01, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionTime', '0.7', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionTime', 'text', '', '', 10.02, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionControls', '1', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionControls', 'select', '', '1=la_Enabled||0=la_Disabled', 10.03, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionEffect', 'swing', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionEffect', 'select', '', 'swing=la_opt_FadeSwing||linear=la_opt_FadeLinear', 10.04, 2, 1, NULL); Index: core/units/promo_blocks/promo_block_eh.php =================================================================== --- core/units/promo_blocks/promo_block_eh.php (revision 0) +++ core/units/promo_blocks/promo_block_eh.php (revision 0) @@ -0,0 +1,236 @@ + Array ('self' => 'view'), + 'OnRegisterView' => Array ('self' => true), + 'OnFollowLink' => Array ('self' => true), + 'OnResetCounters' => Array ('self' => 'add|edit'), + ); + + $this->permMapping = array_merge($this->permMapping, $permissions); + } + + function SetCustomQuery(&$event) + { + parent::SetCustomQuery($event); + + if ($this->Application->isAdminUser) { + return ; + } + + $object =& $event->getObject(); + /* @var $object kDBList */ + + if ($event->Special == 'home') { + $object->addFilter('status_filter', '%1$s.Status = 1 AND (ScheduleFromDate IS NULL OR ScheduleFromDate <= UNIX_TIMESTAMP()) AND (ScheduleToDate IS NULL OR ScheduleToDate >= UNIX_TIMESTAMP())'); + } + } + + + /** + * Updates structure config + * + * @param kEvent $event + */ + function OnAfterConfigRead(&$event) + { + parent::OnAfterConfigRead($event); + + $category_helper =& $this->Application->recallObject('CategoryHelper'); + /* @var $category_helper CategoryHelper */ + + $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); + + $fields['CategoryId']['default'] = ''; + $fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions(); + + // images multilang fields + $a_image = Array( + 'type' => 'string', + 'max_len' => 255, + 'formatter' => 'kUploadFormatter', + 'upload_dir' => IMAGES_PATH, + 'not_null' => 1, + 'default' => '', + 'multiple' => 1, + 'required' => 1, + 'direct_links' => 1, + 'file_types' => '*.jpg;*.gif;*.png', + 'files_description' => '!la_Image_Files!', + ); + + // get active languages + $sql = 'SELECT LanguageId + FROM '.TABLE_PREFIX.'Language'; + $a_languages = $this->Conn->GetCol($sql); + + foreach ($a_languages AS $lang_id) { + $fields['l'.$lang_id.'_Image'] = $a_image; + } + + $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); + } + + /** + * Set's block as sticky + * + * @param kEvent $event + */ + function OnSetSticky(&$event) + { + $object =& $event->getObject( Array('skip_autoload' => true) ); + $this->StoreSelectedIDs($event); + $ids=$this->getSelectedIDs($event); + if($ids) + { + $id = array_shift($ids); + $table_info = $object->getLinkedInfo(); + + $this->Conn->Query('UPDATE '.$object->TableName.' SET Sticky = 0 '); + $this->Conn->Query('UPDATE '.$object->TableName.' SET Sticky = 1, Status = 1 WHERE BlockId = '.$id.' '); + } + $event->redirect_params = Array('opener' => 's'); //stay! + } + + + /** + * Set Required fields + * + * @param kEvent $event + */ + function OnBeforeItemCreate(&$event) + { + parent::OnBeforeItemCreate($event); + $this->_checkScheduleDates($event); + } + + /** + * Set Required fields + * + * @param kEvent $event + */ + function OnBeforeItemUpdate(&$event) + { + parent::OnBeforeItemUpdate($event); + $this->_checkScheduleDates($event); + } + + + /** + * Schedule dates + * + * @param kEvent $event + */ + function _checkScheduleDates(&$event) + { + $object =& $event->getObject(); + /* @var $object kDBItem */ + $date_from = $object->GetDBField('ScheduleFromDate_date'); + $date_to = $object->GetDBField('ScheduleToDate_date'); + if (is_null($date_from) || is_null($date_to)) { + return; + } + if ($date_from >= $date_to) { + $object->SetError('ScheduleFromDate_date', 'wrong_date_interval', 'la_ToDateMustBeGreaterThanFromDate'); + } + } + + /** + * Registers view of the promo block + * + * @param kEvent $event + */ + function OnRegisterView(&$event) + { + $this->_incrementField($event, 'NumberOfViews'); + } + + /** + * Registers click on the promo block + * + * @param kEvent $event + */ + function OnFollowLink(&$event) + { + $object =& $event->getObject(); + /* @var $object kDBItem */ + + $this->_incrementField($event, 'NumberOfClicks', false); + + if ($object->GetDBField('LinkType') == 1) { // Internal + $sql = 'SELECT NamedParentPath + FROM ' . TABLE_PREFIX . 'Category + WHERE CategoryId = ' . $object->GetDBField('CategoryId'); + $event->redirect = $this->Conn->GetOne($sql); + + $event->SetRedirectParam('pass', 'm'); + } + else { + $ext_url = $object->GetDBField('ExternalLink'); + $event->redirect = 'external:' . (preg_match('/^(http|ftp):\\/\\/.*/', $ext_url) ? $ext_url : $this->Application->BaseURL().$ext_url); + } + } + + /** + * Incrmenet given promo block counters + * + * @param kEvent $event + * @param string $field + * @param bool $is_ajax + */ + function _incrementField(&$event, $field, $is_ajax = true) + { + if ( $is_ajax ) { + $event->status = erSTOP; + + if ( $this->Application->GetVar('ajax') != 'yes' ) { + return ; + } + } + + $object =& $event->getObject(); + /* @var $object kDBItem */ + + if ( !$object->isLoaded() ) { + echo 'FAILED'; + return ; + } + + // don't use kDBItem::Update to support concurrent view updates from different visitors + $sql = 'UPDATE ' . $object->TableName . ' + SET ' . $field . ' = ' . $field . ' + 1 + WHERE ' . $object->IDField . ' = ' . $object->GetID(); + $this->Conn->Query($sql); + + echo 'OK'; + } + + /** + * Resets promo block counters + * + * @param kEvent $event + */ + function OnResetCounters(&$event) + { + $object =& $event->getObject( Array ('skip_autoload' => true) ); + /* @var $object kDBItem */ + + $ids = $this->StoreSelectedIDs($event); + + foreach ($ids as $id) { + $object->Load($id); + $object->SetDBField('NumberOfViews', 0); + $object->SetDBField('NumberOfClicks', 0); + $object->Update(); + } + + $this->clearSelectedIDs($event); + } +} Index: core/units/promo_blocks/promo_block_tp.php =================================================================== --- core/units/promo_blocks/promo_block_tp.php (revision 0) +++ core/units/promo_blocks/promo_block_tp.php (revision 0) @@ -0,0 +1,34 @@ +getObject($params); + + $url_params = Array ( + $this->Prefix . '_event' => 'OnFollowLink', + 'pass' => 'm,' . $this->Prefix, + '__NO_REWRITE__' => 1, + ); + + return $this->Application->HREF('index', '', $url_params); + } + + /** + * Checks, that link should be opened in new window + * + * @param Array $params + * @return bool + */ + function LinkInNewWindow($params) + { + $object =& $this->getObject($params); + + if ($object->GetDBField('LinkType') == 1) { // Internal + return false; + } + + return $object->GetDBField('OpenInNewWindow'); + } +} Index: core/units/promo_blocks/promo_blocks_config.php =================================================================== --- core/units/promo_blocks/promo_blocks_config.php (revision 0) +++ core/units/promo_blocks/promo_blocks_config.php (revision 0) @@ -0,0 +1,178 @@ + 'promo-block', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PromoBlockEventHandler', 'file' => 'promo_block_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PromoBlockTagProcessor', 'file' => 'promo_block_tp.php', 'build_event' => 'OnBuild'), + + 'AutoLoad' => true, + + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'event', + 4 => 'mode', + ), + + 'IDField' => 'BlockId', + + 'TableName' => TABLE_PREFIX.'PromoBlocks', + + 'TitleField' => 'Title', + + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('promo-block' => '!la_title_AddingPromoBlock!'), + 'edit_status_labels' => Array ('promo-block' => '!la_title_EditingPromoBlock!'), + ), + + 'promo_block_list' => Array ('prefixes' => Array ('promo-block_List'), 'format' => "!la_tab_PromoBlocks! (#promo-block_recordcount#)"), + 'promo_block_edit' => Array ('prefixes' => Array ('promo-block'), 'format' => "#promo-block_status# '#promo-block_titlefield#'"), + ), + + 'PermSection' => Array('main' => 'in-portal:promo_blocks'), + + 'Sections' => Array ( + 'in-portal:promo_blocks' => Array( + 'parent' => 'in-portal:site', + 'icon' => 'custom', + 'label' => 'la_tab_PromoBlocks', + 'url' => Array('t' => 'promo_blocks/promo_block_list', 'pass' => 'm'), + 'permissions' => Array('view', 'add', 'edit', 'delete'), + 'priority' => 7, + 'type' => stTREE, + ), + ), + + 'CalculatedFields' => Array ( + '' => Array ( + 'ConversionPercent' => 'IF(%1$s.NumberOfViews > 0, NumberOfClicks / NumberOfViews * 100, NULL)', + ), + ), + + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s FROM %1$s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Priority' => 'desc'), + ) + ), + + 'Fields' => Array ( + 'BlockId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Title' => Array ( + 'type' => 'string', + 'not_null' => 1, + 'default' => '', + 'max_len' => 50, + ), + 'Status' => Array ( + 'type' => 'int', + 'not_null' => 1, + 'default' => 1, + 'formatter' => 'kOptionsFormatter', + 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled'), + 'use_phrases' => 1, + ), + 'Priority' => Array( + 'type' => 'int', 'not_null' => 1, + 'formatter' => 'kOptionsFormatter', + 'options' => array(), + 'required' => 1, 'default' => 0 + ), + 'Sticky' => Array ( + 'type' => 'int', + 'not_null' => 1, + 'default' => 0, + 'formatter' => 'kOptionsFormatter', + 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), + 'use_phrases' => 1, + ), + 'CSSClassName' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options' => Array( + 'promo-orange' => 'Orange', + 'promo-green' => 'Green', + 'promo-blue' => 'Blue', + ), + 'not_null' => 1, + 'default' => '', + ), + 'LinkType' => Array ( + 'type' => 'int', + 'not_null' => 1, + 'required' => 1, + 'default' => 0, + 'formatter' => 'kOptionsFormatter', + 'options' => Array(1 => 'la_Internal', 2 => 'la_External'), + 'use_phrases' => 1, + ), + 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'not_null' => 1, 'default' => 1), + 'ExternalLink' => Array( + 'type' => 'string', + 'not_null' => 1, + 'default' => '', + ), + 'OpenInNewWindow' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'ScheduleFromDate' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'default' => null, + 'time_format' => '', + 'input_time_format' => '', + ), + 'ScheduleToDate' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'default' => null, + 'time_format' => '', + 'input_time_format' => '', + 'error_field' => 'ScheduleFromDate', + ), + 'NumberOfClicks' => Array ( + 'type' => 'int', + 'default' => 0, + 'not_null' => 1, + ), + 'NumberOfViews' => Array ( + 'type' => 'int', + 'default' => 0, + 'not_null' => 1, + ), + 'Html' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null), + ), + + 'VirtualFields' => Array( + 'ConversionPercent' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.0f', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Fields' => Array ( + 'BlockId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', ), + 'Title' => Array ('title' => 'la_col_Title', 'filter_block' => 'grid_like_filter', ), + 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', ), + 'Priority' => Array ('title' => 'la_col_Order', 'filter_block' => 'grid_range_filter', ), + 'Sticky' => Array ('title' => 'la_col_Sticky', 'filter_block' => 'grid_options_filter', ), + 'CSSClassName' => Array ('title' => 'la_col_CSSClassName', 'filter_block' => 'grid_options_filter', ), + 'LinkType' => Array ('title' => 'la_col_LinkType', 'filter_block' => 'grid_options_filter', ), + 'CategoryId' => Array ('title' => 'la_col_Category', 'filter_block' => 'grid_options_filter', ), + 'ExternalLink' => Array ('title' => 'la_col_ExternalLink', 'filter_block' => 'grid_like_filter', ), + 'ScheduleFromDate' => Array ('title' => 'la_col_ScheduleFromDate', 'filter_block' => 'grid_date_range_filter', ), + 'ScheduleToDate' => Array ('title' => 'la_col_ScheduleToDate', 'filter_block' => 'grid_date_range_filter', ), + 'NumberOfClicks' => Array ('title' => 'la_col_NumberOfClicks', 'filter_block' => 'grid_range_filter', ), + 'NumberOfViews' => Array ('title' => 'la_col_NumberOfViews', 'filter_block' => 'grid_range_filter', ), + 'ConversionPercent' => Array ('title' => 'la_col_ConversionPercent', 'filter_block' => 'grid_range_filter', ), + ), + ), + ), + ); \ No newline at end of file Index: core/units/sections/sections_config.php =================================================================== --- core/units/sections/sections_config.php (revision 14592) +++ core/units/sections/sections_config.php (working copy) @@ -182,6 +182,16 @@ 'type' => stTREE, ), + 'in-portal:configure_promo_blocks' => Array ( + 'parent' => 'in-portal:website_setting_folder', + 'icon' => 'custom', + 'label' => 'la_title_PromoBlocks', + 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), + 'priority' => 3, + 'type' => stTREE, + ), + // "Tools" section 'in-portal:tools' => Array ( 'parent' => 'in-portal:root',