'bb', 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), 'EventHandlerClass' => Array('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', // topic id 2 => 'post_id', // post id 3 => 'Page', // topic page 4 => 'Post_Page', // posts page 5 => 'pm_Page', // private message page 6 => 'pm_id', // private message id 7 => 'Reviews_Page', 8 => 'event', 9 => 'mode', ), 'CatalogItem' => true, 'AdminTemplatePath' => 'topics', 'AdminTemplatePrefix' => 'topics_', 'IDField' => 'TopicId', 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events 'TitleField' => 'TopicText', // field, used in bluebar when editing existing item 'TitlePhrase' => 'la_Text_Topic', // phrase used to specify item type in relationship list 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('bb' => '!la_title_AddingTopic!'), 'edit_status_labels' => Array('bb' => '!la_title_EditingTopic!'), 'new_titlefield' => Array('bb' => '!la_title_NewTopic!'), ), 'topics_edit' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_General!"), 'topics_categories' => Array('prefixes' => Array('bb','bb-ci_List'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Categories!"), 'topics_relations' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Relations!"), 'topics_images' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Images!"), 'topics_reviews' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Reviews!"), 'topics_custom' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Custom!"), 'images_edit' => Array( 'prefixes' => Array('bb', 'bb-img'), 'new_status_labels' => Array('bb-img'=>'!la_title_Adding_Image!'), 'edit_status_labels' => Array('bb-img'=>'!la_title_Editing_Image!'), 'new_titlefield' => Array('bb-img'=>'!la_title_New_Image!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-img_status# '#bb-img_titlefield#'", ), 'reviews_edit' => Array( 'prefixes' => Array('bb', 'bb-rev'), 'new_status_labels' => Array('bb-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), 'edit_status_labels' => Array('bb-rev'=>'!la_title_Editing_Review!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-rev_status#", ), 'relations_edit' => Array( 'prefixes' => Array('bb', 'bb-rel'), 'new_status_labels' => Array('bb-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), 'edit_status_labels' => Array('bb-rel'=>'!la_title_Editing_Relationship!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-rel_status#", ), 'tree_in-bulletin' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')), ), 'PermItemPrefix' => 'TOPIC', 'PermTabText' => 'In-Bulletin', 'PermSection' => Array('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'email' => 'in-bulletin:configuration_email', 'custom' => 'in-bulletin:configuration_custom'), 'Sections' => Array( 'in-bulletin' => Array( 'parent' => 'in-portal:root', 'icon' => 'settings_in-bulletin', 'label' => 'la_title_In-Bulletin', 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view'), 'priority' => 3.3, 'type' => stTREE, ), 'in-bulletin:inbulletin_general' => Array( 'parent' => 'in-bulletin', '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-bulletin:configuration_output' => Array( 'parent' => 'in-bulletin', '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-bulletin:configuration_search' => Array( 'parent' => 'in-bulletin', 'icon' => 'settings_search', 'label' => 'la_tab_ConfigSearch', 'url' => Array('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 3, 'type' => stTREE, ), 'in-bulletin:configuration_censorship' => Array( 'parent' => 'in-bulletin', 'icon' => 'settings_censor', 'label' => 'la_tab_ConfigCensorship', 'url' => Array('index_file' => '../in-bulletin/admin/censor_config.php', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit'), 'priority' => 4, 'type' => stTREE, ), 'in-bulletin:configuration_emoticon' => Array( 'parent' => 'in-bulletin', 'icon' => 'settings_smiley', 'label' => 'la_tab_ConfigSmileys', 'url' => Array('index_file' => '../in-bulletin/admin/emoticon_config.php', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit'), 'priority' => 5, 'type' => stTREE, ), 'in-bulletin:configuration_email' => Array( 'parent' => 'in-bulletin', 'icon' => 'settings_email', 'label' => 'la_tab_ConfigE-mail', 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), 'permissions' => Array('view', 'edit'), 'priority' => 6, 'type' => stTREE, ), 'in-bulletin:configuration_custom' => Array( 'parent' => 'in-bulletin', 'icon' => 'settings_custom', 'label' => 'la_tab_ConfigCustom', 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 3, 'pass_section' => true, 'pass' => 'm,cf'), 'permissions' => Array('view', 'add', 'edit', 'delete'), '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' => '%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' ), ) ), 'CatalogSelectorName' => 'topiclist', 'ItemPropertyMappings' => Array( 'NewDays' => 'Topic_NewDays', // number of days item to be NEW 'MinPopVotes' => 'Topic_MinPopVotes', // minimum number of votes for an item to be POP 'MinPopRating' => 'Topic_MinPopRating', // minimum rating for an item to be POP 'MaxHotNumber' => 'Topic_MaxHotNumber', // maximum number of HOT items 'HotLimit' => 'Topic_HotLimit', // variable name in inp_Cache table 'ClickField' => 'Views', // item click count is stored here (in item table) ), 'ItemType' => 3, // this is used when relation to product is added from in-portal and via-versa 'ViewMenuPhrase' => 'la_title_Topics', 'StatisticsInfo' => Array( 'pending' => Array( 'icon' => 'icon16_topic_pending.gif', 'label' => 'la_Text_Topics', 'js_url' => "set_persistant_var('Topic_View', 47, 'advanced_view', '#url#')", 'url' => Array('t' => 'advanced_view', 'index_file' => 'advanced_view.php', 'SetTab' => 'topics', 'pass' => 'm'), 'status' => STATUS_PENDING, ), ), 'TableName' => TABLE_PREFIX.'Topic', 'CalculatedFields' => Array( '' => Array ( 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.OwnerId = -1, "root", IF (%1$s.OwnerId = -2, "Guest", "n/a")), u.Login)', 'CategoryId' => TABLE_PREFIX.'CategoryItems.CategoryId', 'Filename' => TABLE_PREFIX.'CategoryItems.Filename', ), ), '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.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.OwnerId = u.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId', ), // key - special, value - list select sql 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), 'Sorting' => Array('TopicText' => 'asc'), ) ), '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.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.OwnerId = u.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId'), 'SubItems' => Array('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata'), 'Fields' => Array ( 'TopicId' => Array(), 'NotifyOwnerOnChanges' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), 'TopicText' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), 'Posts' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Views' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, '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), 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), 'OwnerId' => 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, 'required' => 1, 'default' => -1), 'ModifiedById' => 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), 'ResourceId' => Array('type' => 'int', 'default' => ''), 'TopicType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Yes', 1 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), 'CreatedOn' => Array('type' => 'double', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#', 'not_null' => 1), 'CachedReviewsQty' => Array('type' => 'int' ,'not_null' => 1, 'default' => 0), 'CachedRating' => Array('type' => 'string', 'default' => ''), 'CachedVotesQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), '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), '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), '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), 'PostedBy' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'OrgId' => Array('type' => 'int', 'default' => 0), 'LastPostId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'LastPostDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => ''), 'TodayDate' => Array('type' => 'string', 'not_null' => 1, 'default' => '0000-00-00'), 'TodayPosts' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), ), 'VirtualFields' => Array( 'UserName' => Array('type'=>'string', 'default' => ''), 'CategoryId' => Array('type' => 'int', 'default' => 0), 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'CachedNavbar' => Array('type' => 'string', 'default' => ''), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array(1 => 'icon16_topic.gif', 2 => 'icon16_topic_pending.gif', 0 => 'icon16_topic_disabled.gif', 'HOT' => 'icon16_topic_hot.gif', 'POP' => 'icon16_topic_pop.gif', 'NEW' => 'icon16_topic_new.gif', 'PICK' => 'icon16_topic_pick.gif'), 'Fields' => Array( 'TopicId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), 'TopicText' => Array('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td'), 'UserName' => Array('title' => 'la_col_PostedBy'), 'Modified_formatted' => Array('title' => 'la_col_ModifiedDate', 'sort_field' => 'Modified'), 'Posts' => Array('title' => 'la_col_Posts'), 'Views' => Array('title' => 'la_col_Views'), ), ), 'Radio' => Array( 'Icons' => Array(1 => 'icon16_topic.gif', 2 => 'icon16_topic_pending.gif', 0 => 'icon16_topic_disabled.gif', 'HOT' => 'icon16_topic_hot.gif', 'POP' => 'icon16_topic_pop.gif', 'NEW' => 'icon16_topic_new.gif', 'PICK' => 'icon16_topic_pick.gif'), 'Fields' => Array( 'TopicId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), 'TopicText' => Array('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td'), 'UserName' => Array('title' => 'la_col_PostedBy'), 'Modified_formatted' => Array('title' => 'la_col_ModifiedDate', 'sort_field' => 'Modified'), 'Posts' => Array('title' => 'la_col_Posts'), 'Views' => Array('title' => 'la_col_Views'), ), ), ), 'ConfigMapping' => Array( 'PerPage' => 'Perpage_Topics', 'ShortListPerPage' => 'Perpage_Topics_Short', 'DefaultSorting1Field' => 'Topic_SortField', 'DefaultSorting2Field' => 'Topic_SortField2', 'DefaultSorting1Dir' => 'Topic_SortOrder', 'DefaultSorting2Dir' => 'Topic_SortOrder2', ), ); ?>