'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'), 'AutoLoad' => true, 'Hooks' => Array(), 'QueryString' => Array( 1 => 'id', 2 => 'Page', 3 => 'Reviews_Page', // depricated (for old in-link) 4 => 'event', ), 'IDField' => 'LinkId', 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events 'ItemType' => 4, 'StatisticsInfo' => Array( 'pending' => Array( 'icon' => 'icon16_link_pending.gif', 'label' => 'la_Text_Links', 'js_url' => "set_persistant_var('Link_View', 47, 'advanced_view', '#url#')", 'url' => Array('t' => 'advanced_view', 'index_file' => 'advanced_view.php', 'SetTab' => 'links', 'pass' => 'm'), 'status' => STATUS_PENDING, ), ), 'TitlePhrase' => 'la_Text_Link', // phrase used to specify item type in relationship list 'ViewMenuPhrase' => 'la_text_K4Links', 'CatalogSelectorName' => 'linklist', 'ItemPropertyMappings' => Array( 'NewDays' => 'Link_NewDays', // number of days item to be NEW 'VotesToPop' => 'Link_MinVotes', // minimum number of votes for an item to be POP 'RatingToPop' => 'Link_RatingToPop', // minimum rating for an item to be POP 'HotCount' => 'Link_TopCount', // number of top sellers (HOT) items 'HotLimit' => 'Link_HotLimit', // variable name in inp_Cache table ), '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!'), ), 'links_edit' => Array('prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!"), 'link_list'=>Array( 'prefixes' => Array('c_List', 'l_List'), 'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Links! (#l_recordcount#)", ), 'link_edit'=>Array( 'prefixes' => Array('l'), 'new_titlefield' => Array('l'=>'!la_title_NewLink!'), 'format' => "#l_status# '#l_titlefield#' - !la_title_General!", ), 'links_categories'=>Array('prefixes' => Array('l','l-ci_List'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Link_Categories!"), 'links_relations'=> Array('prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Link_Relations!"), 'links_images' => Array('prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Link_Images!"), 'links_reviews' => Array('prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Link_Reviews!"), 'links_custom' => Array('prefixes' => Array('l'), 'format' => "#l_status# '#l_titlefield#' - !la_title_Link_Custom!"), '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#'", ), '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#", ), '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#", ), 'links_export' => Array('format' => '!la_title_LinksExport!'), 'links_import' => Array('format' => '!la_title_ImportLinks!'), 'duplicate_links' => Array('prefixes' => Array('l.duplicates_List'), 'format' => "!la_title_DuplicateLinks! (#l.duplicates_recordcount#)"), 'tree_in-link' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Link', 'Version')), ), 'PermItemPrefix' => 'LINK', '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( 'parent' => 'in-portal:root', 'icon' => 'settings_in-link', 'label' => 'la_title_In-Link', 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view'), 'priority' => 3.1, 'type' => stTREE, ), 'in-link:inlink_general' => Array( 'parent' => 'in-link', 'icon' => 'settings_general', 'label' => 'la_tab_GeneralSettings', 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 1, 'type' => stTREE, ), 'in-link:configuration_output' => Array( 'parent' => 'in-link', 'icon' => 'settings_output', 'label' => 'la_tab_ConfigOutput', 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 2, 'type' => stTREE, ), 'in-link:configuration_search' => Array( 'parent' => 'in-link', 'icon' => 'settings_search', 'label' => 'la_tab_ConfigSearch', 'url' => Array('t' => 'config/config_search', 'module_key' => 'links', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 3, 'type' => stTREE, ), 'in-link:configuration_email' => Array( 'parent' => 'in-link', 'icon' => 'settings_email', 'label' => 'la_tab_ConfigE-mail', 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 4, 'type' => stTREE, ), 'in-link:configuration_custom' => Array( 'parent' => 'in-link', 'icon' => 'settings_custom', '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'), 'priority' => 5, 'type' => stTREE, ), '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'), 'priority' => 6, 'type' => stTREE, ), 'in-link:validation_list' => Array( 'parent' => 'in-link', 'icon' => 'validate', 'label' => 'la_tab_LinkValidation', 'url' => Array('index_file' => '../in-link/admin/validation.php', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit'), 'priority' => 7, '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), ), 'Filters' => Array( 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1' ), 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2' ), 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ), 's1' => Array(), 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), 'show_hot' => Array('label' => 'la_Text_TopSellers', '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' => '`EditorsPick` != 1' ), ) ), 'TableName' => TABLE_PREFIX.'Link', 'CalculatedFields' => Array( '' => Array ( 'UserName' => 'IF( LENGTH(u.Login), u.Login, "")', 'CategoryId' => TABLE_PREFIX.'CategoryItems.CategoryId', ), ), 'AggregatedCalculatedFields' => Array( 'duplicates' => Array ( 'DupeCount' => 'COUNT(*)', ), ), 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId 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', ), // key - special, value - list select sql 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), 'Sorting' => Array('Name' => 'asc', 'Description' => 'desc'), ) ), 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId 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'), 'Fields' => Array ( 'LinkId' => Array('type' => 'int','not_null' => '1','default' => ''), 'Name' => Array('required'=>true, 'max_len'=>255), 'Filename' => Array('type' => 'string','not_null' => '1','default' => ''), 'AutomaticFilename' => Array('type' => 'int', 'not_null' => '1', 'default' => '1'), 'Description' => Array('type' => 'string','default' => ''), 'Url' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), 'CreatedOn' => Array('type' => 'double','formatter' => 'kDateFormatter', 'default'=>'#NOW#','not_null' => '1'), 'Modified' => Array('type' => 'double','formatter' => 'kDateFormatter', 'default'=>'#NOW#','not_null' => '1'), 'Expire' => Array('type' => 'double', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => ''), 'Hits' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => true, 'default' => 0), 'CachedRating' => Array('type' => 'string','default' => ''), 'CachedVotesQty' => Array('type' => 'int','not_null' => '1','default' => '0'), 'CachedReviewsQty' => Array('type' => 'int','default' => ''), 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', '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' => '0'), 'ModifiedById' => Array('type' => 'int','not_null' => '1','default' => '0'), 'Priority' => Array('type' => 'int','not_null' => '1','default' => '0'), 'Status' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'not_null' => 1, 'default' => 2 ), 'EditorsPick' => Array('type' => 'int','default' => '0'), 'ResourceId' => Array('type' => 'int', 'default' => '0'), 'HotItem' => Array('options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'not_null' => true, 'default' => 2 ), 'PopItem' => Array('options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'not_null' => true, 'default' => 2 ), 'NewItem' => Array('options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'not_null' => true, 'default' => 2 ), 'OrgId' => Array('type' => 'int','default' => ''), ), 'VirtualFields' => Array( 'UserName' => Array('type' => 'string', 'default' => ''), 'DupeCount' => Array('type' => 'string', 'default' => ''), // export related fields: begin 'CategoryId' => 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'), 'default' => 1), 'CategorySeparator' => Array('type' => 'string', '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'), 'default' => 1), 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'default' => 2), 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => '/admin/export/'), 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''), 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), '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'), 'default' => 1), // import related fields: end 'ThumbnailImage' => Array('type' => 'string', 'default' => ''), 'FullImage' => Array('type' => 'string', 'default' => ''), 'ImageAlt' => Array('type' => 'string', 'default' => ''), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array(0 => 'icon16_link_disabled.gif', 1 => 'icon16_link.gif', 2 => 'icon16_link_pending.gif', 'HOT' => 'icon16_link_hot.gif', 'POP' => 'icon16_link_pop.gif', 'NEW' => 'icon16_link_new.gif', 'PICK' => 'icon16_link_pick.gif'), 'Fields' => Array( 'Name' => Array( 'title'=>'la_col_LinkName' , 'data_block' => 'grid_checkbox_td'), 'Url' => Array( 'title'=>'la_col_LinkUrl' ), 'Description' => Array( 'title'=>'la_col_Description' ), 'Modified' => Array( 'title'=>'la_col_Modified' ), ), ), 'Duplicates' => Array( 'Icons' => Array('default' => 'icon16_link.gif'), 'Fields' => Array( 'Name' => Array( 'title'=>'la_col_LinkName' , 'data_block' => 'grid_checkbox_td'), 'Url' => Array( 'title'=>'la_col_LinkUrl' ), 'Description' => Array( 'title'=>'la_col_Description' ), 'Modified' => Array( 'title'=>'la_col_Modified' ), ), ), ), 'ConfigMapping' => Array( 'PerPage' => 'Perpage_Links', 'ShortListPerPage' => 'Perpage_Links_Short', 'DefaultSorting1Field' => 'Link_SortField', 'DefaultSorting2Field' => 'Link_SortField2', 'DefaultSorting1Dir' => 'Link_SortOrder', 'DefaultSorting2Dir' => 'Link_SortOrder2', ), ); if (constOn('K4_LINKS')) { $config['QueryString'][5] = 'mode'; $config['Fields']['Name']['formatter'] = 'kMultiLanguage'; $config['Fields']['Description']['formatter'] = 'kMultiLanguage'; } ?>