Index: branches/5.3.x/units/emoticons/emoticons_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 15490) +++ branches/5.3.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'emoticon', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'EmoticonEventHandler', 'file' => 'emoticon_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'emoticon', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'EmoticonEventHandler', 'file' => 'emoticon_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'EmoticonId', + 'IDField' => 'EmoticonId', - 'TableName' => TABLE_PREFIX.'Emoticon', + 'TableName' => TABLE_PREFIX.'Emoticon', - 'TitleField' => 'Name', + 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('emoticon' => '!la_title_AddingSmiley!'), - 'edit_status_labels' => Array ('emoticon' => '!la_title_EditingSmiley!'), - ), - - 'emoticon_list' => Array ('prefixes' => Array ('emoticon_List'), 'format' => "!la_tab_ConfigSmileys!"), - 'emoticon_edit' => Array ('prefixes' => Array ('emoticon'), 'format' => "#emoticon_status# '#emoticon_titlefield#'"), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('emoticon' => '!la_title_AddingSmiley!'), + 'edit_status_labels' => Array ('emoticon' => '!la_title_EditingSmiley!'), ), - 'PermSection' => Array('main' => 'in-bulletin:configuration_emoticon'), + 'emoticon_list' => Array ('prefixes' => Array ('emoticon_List'), 'format' => "!la_tab_ConfigSmileys!"), + 'emoticon_edit' => Array ('prefixes' => Array ('emoticon'), 'format' => "#emoticon_status# '#emoticon_titlefield#'"), + ), - 'Sections' => Array ( - 'in-bulletin:configuration_emoticon' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'conf_smileys', - 'label' => 'la_tab_ConfigSmileys', - 'url' => Array('t' => 'in-bulletin/emoticons/emoticon_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - ), + 'PermSection' => Array ('main' => 'in-bulletin:configuration_emoticon'), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s FROM %1$s', + 'Sections' => Array ( + 'in-bulletin:configuration_emoticon' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'conf_smileys', + 'label' => 'la_tab_ConfigSmileys', + 'url' => Array ('t' => 'in-bulletin/emoticons/emoticon_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 2, + 'type' => stTREE, ), + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'desc'), - ) + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'desc'), + ) + ), + + 'Fields' => Array ( + 'EmoticonId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), + 'KeyStroke' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), + 'Enabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, ), + 'EmotionImage' => Array ( + 'type' => 'string', 'max_len' => 255, + 'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg'), + 'upload_dir' => SMILEYS_PATH, + 'not_null' => 1, 'required' => 1, 'default' => '', + ), + ), - 'Fields' => Array ( - 'EmoticonId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), - 'KeyStroke' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), - 'Enabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 1, 'not_null' => 1, + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', ), - 'EmotionImage' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg'), - 'upload_dir' => SMILEYS_PATH, - 'not_null' => 1, 'required' => 1, 'default' => '', + 'Fields' => Array ( + 'EmoticonId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ), + 'KeyStroke' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), + 'EmotionImage' => Array ('title' => 'column:la_fld_Image', 'filter_block' => 'grid_like_filter', 'width' => 150, ), ), ), - - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'EmoticonId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ), - 'KeyStroke' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), - 'EmotionImage' => Array ('title' => 'column:la_fld_Image', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - ), - ), - ), - ); \ No newline at end of file + ), +); \ No newline at end of file Index: branches/5.3.x/units/helpers/helpers_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 15490) +++ branches/5.3.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'in-bulletin-helpers', - 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'in-bulletin-helpers', + 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'RegisterClasses' => Array ( - Array('pseudo' => 'PostHelper', 'class' => 'PostHelper','file' => 'post_helper.php', 'build_event' => ''), - ), - ); \ No newline at end of file + 'RegisterClasses' => Array ( + Array ('pseudo' => 'PostHelper', 'class' => 'PostHelper', 'file' => 'post_helper.php', 'build_event' => ''), + ), +); \ No newline at end of file Index: branches/5.3.x/units/polls/polls_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/polls/polls_config.php (.../polls_config.php) (revision 15490) +++ branches/5.3.x/units/polls/polls_config.php (.../polls_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'poll', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'PollEventHandler', 'file' => 'poll_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'PollTagProcessor', 'file' => 'poll_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'poll', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PollEventHandler', 'file' => 'poll_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PollTagProcessor', 'file' => 'poll_tp.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'PollId', + 'IDField' => 'PollId', - 'TitleField' => 'Name', - 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', + 'StatusField' => Array ('Status'), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('poll' => '!la_title_Adding_Poll!'), + 'edit_status_labels' => Array ('poll' => '!la_title_Editing_Poll!'), + 'new_titlefield' => Array ('poll' => '!la_title_NewPoll!'), + ), - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('poll' => '!la_title_Adding_Poll!'), - 'edit_status_labels' => Array ('poll' => '!la_title_Editing_Poll!'), - 'new_titlefield' => Array ('poll' => '!la_title_NewPoll!'), - ), + 'poll_list' => Array ('prefixes' => Array ('poll_List'), 'format' => "!la_title_Polls!", ), + 'poll_edit' => Array ('prefixes' => Array ('poll'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_General!", ), + 'poll_edit_answers' => Array ('prefixes' => Array ('poll', 'poll-answer_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollAnswers!"), - 'poll_list' => Array ('prefixes' => Array ('poll_List'), 'format' => "!la_title_Polls!", ), - 'poll_edit' => Array ('prefixes' => Array ('poll'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_General!", ), - 'poll_edit_answers' => Array ('prefixes' => Array ('poll', 'poll-answer_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollAnswers!"), + 'poll_edit_comments' => Array ('prefixes' => Array ('poll', 'poll-comment_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollComments!"), - 'poll_edit_comments' => Array ('prefixes' => Array ('poll', 'poll-comment_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollComments!"), + 'answer_edit' => Array ( + 'prefixes' => Array ('poll', 'poll-answer'), + 'new_status_labels' => Array ('poll-answer' => '!la_title_Adding_Answer!'), + 'edit_status_labels' => Array ('poll-answer' => '!la_title_Editing_Answer!'), + 'new_titlefield' => Array ('poll-answer' => '!la_title_New_Answer!'), + 'format' => "#poll_status# '#poll_titlefield#' - #poll-answer_status# '#poll-answer_titlefield#'" + ), + 'comment_edit' => Array ( + 'prefixes' => Array ('poll', 'poll-comment'), + 'new_status_labels' => Array ('poll-comment' => '!la_title_Adding_Comment!'), + 'edit_status_labels' => Array ('poll-comment' => '!la_title_Editing_Comment!'), + 'new_titlefield' => Array ('poll-comment' => '!la_title_NewComment!'), + 'format' => "#poll_status# '#poll_titlefield#' - #poll-comment_status#", + ), + ), - 'answer_edit' => Array ( - 'prefixes' => Array ('poll', 'poll-answer'), - 'new_status_labels' => Array ('poll-answer' => '!la_title_Adding_Answer!'), - 'edit_status_labels' => Array ('poll-answer' => '!la_title_Editing_Answer!'), - 'new_titlefield' => Array ('poll-answer' => '!la_title_New_Answer!'), - 'format' => "#poll_status# '#poll_titlefield#' - #poll-answer_status# '#poll-answer_titlefield#'" - ), + 'PermSection' => Array ('main' => 'in-bulletin:polls'), - 'comment_edit' => Array ( - 'prefixes' => Array ('poll', 'poll-comment'), - 'new_status_labels' => Array ('poll-comment' => '!la_title_Adding_Comment!'), - 'edit_status_labels' => Array ('poll-comment' => '!la_title_Editing_Comment!'), - 'new_titlefield' => Array ('poll-comment' => '!la_title_NewComment!'), - 'format' => "#poll_status# '#poll_titlefield#' - #poll-comment_status#", - ), + 'Sections' => Array ( + 'in-bulletin:polls' => Array ( + 'parent' => 'in-portal:site', + 'icon' => 'polls', + 'label' => 'la_title_Polls', + 'url' => Array ('t' => 'in-bulletin/polls/poll_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 3.6, + 'type' => stTREE, + ), + ), - ), + 'TableName' => TABLE_PREFIX.'Polls', - 'PermSection' => Array ('main' => 'in-bulletin:polls'), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Sections' => Array ( - 'in-bulletin:polls' => Array ( - 'parent' => 'in-portal:site', - 'icon' => 'polls', - 'label' => 'la_title_Polls', - 'url' => Array ('t' => 'in-bulletin/polls/poll_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 3.6, - 'type' => stTREE, - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('PollId' => 'asc'), + ) + ), - 'TableName' => TABLE_PREFIX.'Polls', + 'Fields' => Array ( + 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => 1, 'max_len' => 255), + 'Question' => Array ( + 'type' => 'string', + 'formatter' => 'kMultiLanguage', 'using_fck' => 1, + 'default' => null, 'required' => 1, + ), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'StartDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'EndDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'Image' => Array ( + 'type' => 'string', + 'formatter' => 'kPictureFormatter', + 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/', + 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', + 'multiple' => false, 'thumb_format' => 'resize:200x200', + 'max_len' => 255, 'not_null' => 1, 'default' => '' + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'RequireLogin' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'AllowComments' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'AllowMultipleVotings' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_opt_Disabled', 1 => 'la_opt_Active',), 'use_phrases' => 1, + 'required' => 1, 'default' => 1, 'not_null' => 1, + ), + ), - 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s - FROM %1$s', + 'SubItems' => Array ('poll-answer', 'poll-comment'), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + Array ('title' => 'la_tab_General', 't' => 'in-bulletin/polls/poll_edit', 'priority' => 1), + Array ('title' => 'la_tab_PollAnswers', 't' => 'in-bulletin/polls/poll_edit_answers', 'priority' => 2), + Array ('title' => 'la_tab_PollUserComments', 't' => 'in-bulletin/polls/poll_edit_comments', 'priority' => 3), + ), + ), - 'ItemSQLs' => Array ('' => 'SELECT %1$s.* %2$s - FROM %1$s', - - ), - - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('PollId' => 'asc'), - ) - ), - - 'Fields' => Array ( - 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => 1, 'max_len' => 255), - 'Question' => Array ( - 'type' => 'string', - 'formatter' => 'kMultiLanguage', 'using_fck' => 1, - 'default' => null, 'required' => 1, - ), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'StartDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'EndDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'Image' => Array ( - 'type' => 'string', - 'formatter' => 'kPictureFormatter', - 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/', - 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', - 'multiple' => false, 'thumb_format' => 'resize:200x200', - 'max_len' => 255, 'not_null' => 1, 'default' => '' - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'RequireLogin' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'AllowComments' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 1, 'not_null' => 1, - ), - 'AllowMultipleVotings' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 1, 'not_null' => 1, - ), - 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_opt_Disabled', 1 => 'la_opt_Active',), 'use_phrases' => 1, - 'required' => 1, 'default' => 1, 'not_null' => 1, - ), - - ), - - 'SubItems' => Array ('poll-answer', 'poll-comment'), - - 'VirtualFields' => Array ( -// 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - ), - - 'CalculatedFields' => Array ( - '' => Array ( -// 'DaysLeft' => 'IF( ISNULL(%1$s.EndDate), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', %1$s.PosterAlias, \'n/a\')), \'Never\' )', - ), - ), - - 'EditTabPresets' => Array ( - 'Default' => Array ( - Array ('title' => 'la_tab_General', 't' => 'in-bulletin/polls/poll_edit', 'priority' => 1), - Array ('title' => 'la_tab_PollAnswers', 't' => 'in-bulletin/polls/poll_edit_answers', 'priority' => 2), - Array ('title' => 'la_tab_PollUserComments', 't' => 'in-bulletin/polls/poll_edit_comments', 'priority' => 3), - ), - ), - - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'PollId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'StartDate' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'EndDate' => Array ('data_block' => 'poll_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), -// 'DaysActive' => Array ('title' => 'la_col_NumberOfDaysActive', 'filter_block' => 'grid_range_filter',), - ), - ), - ), - - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'PollId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'StartDate' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'EndDate' => Array ('data_block' => 'poll_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), +// 'DaysActive' => Array ('title' => 'la_col_NumberOfDaysActive', 'filter_block' => 'grid_range_filter',), + ), + ), + ), +); \ No newline at end of file Index: branches/5.3.x/units/poll_comments/poll_comments_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 15490) +++ branches/5.3.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'poll-comment', +$config = Array ( + 'Prefix' => 'poll-comment', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'PollCommentEventHandler', 'file' => 'poll_comment_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PollCommentEventHandler', 'file' => 'poll_comment_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'CommentId', - 'TableName' => TABLE_PREFIX . 'PollsComments', + 'AutoLoad' => true, - 'ParentPrefix' => 'poll', - 'ForeignKey' => 'PollId', - 'ParentTableKey' => 'PollId', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'StatusField' => Array('Status'), + 'IDField' => 'CommentId', + 'TableName' => TABLE_PREFIX . 'PollsComments', - // key - special, value - list select sql - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users pu ON pu.PortalUserId = %1$s.CreatedById', - ), + 'ParentPrefix' => 'poll', + 'ForeignKey' => 'PollId', + 'ParentTableKey' => 'PollId', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'StatusField' => Array ('Status'), - 'ListSortings' => Array ( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('CreatedOn' => 'desc'), - ) - ), + // key - special, value - list select sql + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Users pu ON pu.PortalUserId = %1$s.CreatedById', + ), - 'Fields' => Array ( - 'CommentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'AnswerId' => Array ('type' => 'int', 'default' => NULL), - 'CreatedById' => Array ('type' => 'int', 'formatter'=>'kLEFTFormatter', - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', - 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', - 'required' => 1, 'default' => NULL), - 'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'GuestEmail' => Array('type' => 'string', 'max_len' => 255, 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!'),'required' => 0 ), - 'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'UserIP' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled', 2 => 'la_opt_Pending'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('CreatedOn' => 'desc'), + ) + ), - 'VirtualFields' => Array ( - 'CommentedByUser' => Array('type' => 'string', 'default' => ''), - 'CommentedByEmail' => Array ('type' => 'string', 'default' => ''), + 'Fields' => Array ( + 'CommentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'AnswerId' => Array ('type' => 'int', 'default' => NULL), + 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', + 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', + 'required' => 1, 'default' => NULL), + 'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'GuestEmail' => Array ('type' => 'string', 'max_len' => 255, 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'),'required' => 0 ), + 'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'UserIP' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled', 2 => 'la_opt_Pending'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), + ), + + 'VirtualFields' => Array ( + 'CommentedByUser' => Array ('type' => 'string', 'default' => ''), + 'CommentedByEmail' => Array ('type' => 'string', 'default' => ''), + ), + + 'CalculatedFields' => Array ( + '' => Array ( + 'CommentedByUser' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )', ), + ), - 'CalculatedFields' => Array ( - '' => Array ( - 'CommentedByUser' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )', + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', ), - ), + 'Fields' => Array ( + 'CommentId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'CommentBody' => Array ('title' => 'column:la_fld_PollComment', 'data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'CommentId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'CommentBody' => Array ('title' => 'column:la_fld_PollComment', 'data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'CommentedByUser' => Array ( 'title' => 'la_col_CommentedByUser', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'CommentedByUser' => Array( 'title'=>'la_col_CommentedByUser', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - - 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - ), - ), + 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + ), ), - - ); \ No newline at end of file + ), +); \ No newline at end of file Index: branches/5.3.x/units/posts/posts_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/posts/posts_config.php (.../posts_config.php) (revision 15490) +++ branches/5.3.x/units/posts/posts_config.php (.../posts_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'bb-post', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'PostEventHandler', 'file' => 'post_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'PostTagProcessor', 'file' => 'post_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'bb-post', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PostEventHandler', 'file' => 'post_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PostTagProcessor', 'file' => 'post_tp.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'AutoLoad' => true, - 'IDField' => 'PostingId', - 'StatusField' => Array('Pending'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitleField' => 'Subject', + 'IDField' => 'PostingId', + 'StatusField' => Array ('Pending'), - 'TableName' => TABLE_PREFIX.'Posting', + 'TitleField' => 'Subject', - 'ForeignKey' => 'TopicId', - 'ParentTableKey' => 'TopicId', - 'ParentPrefix' => 'bb', - 'AutoDelete' => true, - 'AutoClone' => true, + 'TableName' => TABLE_PREFIX.'Posting', - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'CatalogImages img ON (img.ResourceId = u.ResourceId) AND (img.DefaultImg = 1 OR img.Name = "avatar")', - ), + 'ForeignKey' => 'TopicId', + 'ParentTableKey' => 'TopicId', + 'ParentPrefix' => 'bb', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'CatalogImages img ON (img.ResourceId = u.ResourceId) AND (img.DefaultImg = 1 OR img.Name = "avatar")', - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.CreatedById = u.PortalUserId + LEFT JOIN '.TABLE_PREFIX.'CatalogImages img ON (img.ResourceId = u.ResourceId) AND (img.DefaultImg = 1 OR img.Name = "avatar")', + ), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('CreatedOn' => 'asc',), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('CreatedOn' => 'asc',), ), + ), - 'CalculatedFields' => Array ( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', + 'CalculatedFields' => Array ( + '' => Array ( + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', - 'AltName' => 'img.AltName', - 'SameImages' => 'img.SameImages', - 'LocalThumb' => 'img.LocalThumb', - 'ThumbPath' => 'img.ThumbPath', - 'ThumbUrl' => 'img.ThumbUrl', - 'LocalImage' => 'img.LocalImage', - 'LocalPath' => 'img.LocalPath', - 'FullUrl' => 'img.Url', - ), + 'AltName' => 'img.AltName', + 'SameImages' => 'img.SameImages', + 'LocalThumb' => 'img.LocalThumb', + 'ThumbPath' => 'img.ThumbPath', + 'ThumbUrl' => 'img.ThumbUrl', + 'LocalImage' => 'img.LocalImage', + 'LocalPath' => 'img.LocalPath', + 'FullUrl' => 'img.Url', ), + ), - 'Fields' => Array ( - 'PostingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'IPAddress' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'PosterAlias' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'Pending' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), - 'PostingText' => Array ('type' => 'string', 'allow_html' => 1, 'default' => NULL), - 'GraphicsUrl' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), - 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), - 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ReplyTo' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - ), + 'Fields' => Array ( + 'PostingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'IPAddress' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'PosterAlias' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Pending' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), + 'PostingText' => Array ('type' => 'string', 'allow_html' => 1, 'default' => NULL), + 'GraphicsUrl' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), + 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), + 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ReplyTo' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), - 'VirtualFields' => Array ( - 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), - 'UserName' => Array ('type' => 'string', 'default' => ''), - // for avatar image - 'AltName' => 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' => ''), - ), + 'VirtualFields' => Array ( + 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), + 'UserName' => Array ('type' => 'string', 'default' => ''), + // for avatar image + 'AltName' => 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' => ''), + ), - 'ConfigMapping' => Array ( - 'PerPage' => 'Perpage_Postings', - ), - ); \ No newline at end of file + 'ConfigMapping' => Array ( + 'PerPage' => 'Perpage_Postings', + ), +); \ No newline at end of file Index: branches/5.3.x/units/censorship/censorship_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/censorship/censorship_config.php (.../censorship_config.php) (revision 15490) +++ branches/5.3.x/units/censorship/censorship_config.php (.../censorship_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'censorship', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'censorship', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'CensorshipId', + 'IDField' => 'CensorshipId', - 'TableName' => TABLE_PREFIX.'Censorship', + 'TableName' => TABLE_PREFIX.'Censorship', - 'TitleField' => 'BadWord', + 'TitleField' => 'BadWord', - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('censorship' => '!la_title_AddingCensorship!'), - 'edit_status_labels' => Array ('censorship' => '!la_title_EditingCensorship!'), - ), - - 'censorship_list' => Array ('prefixes' => Array ('censorship_List'), 'format' => "!la_tab_ConfigCensorship!"), - 'censorship_edit' => Array ('prefixes' => Array ('censorship'), 'format' => "#censorship_status# '#censorship_titlefield#'"), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('censorship' => '!la_title_AddingCensorship!'), + 'edit_status_labels' => Array ('censorship' => '!la_title_EditingCensorship!'), ), - 'PermSection' => Array('main' => 'in-bulletin:configuration_censorship'), + 'censorship_list' => Array ('prefixes' => Array ('censorship_List'), 'format' => "!la_tab_ConfigCensorship!"), + 'censorship_edit' => Array ('prefixes' => Array ('censorship'), 'format' => "#censorship_status# '#censorship_titlefield#'"), + ), - 'Sections' => Array ( - 'in-bulletin:configuration_censorship' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'conf_censorship', - 'label' => 'la_tab_ConfigCensorship', - 'url' => Array('t' => 'in-bulletin/censorship/censorship_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 1, - 'type' => stTREE, - ), - ), + 'PermSection' => Array ('main' => 'in-bulletin:configuration_censorship'), - - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s FROM %1$s', + 'Sections' => Array ( + 'in-bulletin:configuration_censorship' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'conf_censorship', + 'label' => 'la_tab_ConfigCensorship', + 'url' => Array ('t' => 'in-bulletin/censorship/censorship_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 1, + 'type' => stTREE, ), + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('BadWord' => 'asc'), - ) - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Fields' => Array ( - 'CensorshipId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'BadWord' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''), - 'Replacement' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('BadWord' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'CensorshipId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), - 'BadWord' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), - 'Replacement' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), - ), + 'Fields' => Array ( + 'CensorshipId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'BadWord' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''), + 'Replacement' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', ), + 'Fields' => Array ( + 'CensorshipId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), + 'BadWord' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), + 'Replacement' => Array ('filter_block' => 'grid_like_filter', 'width' => 250), + ), ), - ); \ No newline at end of file + ), +); \ No newline at end of file Index: branches/5.3.x/units/poll_answers/poll_answers_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/poll_answers/poll_answers_config.php (.../poll_answers_config.php) (revision 15490) +++ branches/5.3.x/units/poll_answers/poll_answers_config.php (.../poll_answers_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'poll-answer', +$config = Array ( + 'Prefix' => 'poll-answer', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'AnswerId', - 'TableName' => TABLE_PREFIX . 'PollsAnswers', + 'AutoLoad' => true, - 'ParentPrefix' => 'poll', - 'ForeignKey' => 'PollId', - 'ParentTableKey' => 'PollId', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitleField' => 'Answer', - 'StatusField' => Array ('Status'), + 'IDField' => 'AnswerId', + 'TableName' => TABLE_PREFIX . 'PollsAnswers', - // key - special, value - list select sql - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - ', - ), + 'ParentPrefix' => 'poll', + 'ForeignKey' => 'PollId', + 'ParentTableKey' => 'PollId', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'TitleField' => 'Answer', + 'StatusField' => Array ('Status'), - 'ListSortings' => Array ( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('Answer' => 'asc'), - ) - ), + // key - special, value - list select sql + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Fields' => Array ( - 'AnswerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Answer' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'using_fck' => 1, 'default' => '', 'required' => 1), - 'VotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('Answer' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'AnswerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Answer' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 300, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'VotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Fields' => Array ( + 'AnswerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Answer' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'using_fck' => 1, 'default' => '', 'required' => 1), + 'VotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), + ), - ), - ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AnswerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Answer' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 300, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'VotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + ), ), - - ); \ No newline at end of file + ), +); \ No newline at end of file Index: branches/5.3.x/units/private_messages/private_messages_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 15490) +++ branches/5.3.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'private-message', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'PrivateMessageEventHandler', 'file' => 'private_message_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'PrivateMessageTagProcessor', 'file' => 'private_message_tp.php', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'private-message', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PrivateMessageEventHandler', 'file' => 'private_message_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PrivateMessageTagProcessor', 'file' => 'private_message_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'PmId', - 'StatusField' => Array ('Status'), - 'TitleField' => 'Subject', + 'IDField' => 'PmId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Subject', - 'PermSection' => Array('main' => 'in-bulletin:private_messages',), + 'PermSection' => Array ('main' => 'in-bulletin:private_messages',), - 'TableName' => TABLE_PREFIX.'PrivateMessages', + 'TableName' => TABLE_PREFIX.'PrivateMessages', - 'CalculatedFields' => Array ( - '' => Array ( - 'Subject' => 'pmb.Subject', - 'Body' => 'pmb.Body', - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Subject' => 'pmb.Subject', + 'Body' => 'pmb.Body', ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sPrivateMessageBody pmb ON pmb.PMBodyId = %1$s.PMBodyId - LEFT JOIN '.TABLE_PREFIX.'Users from_user ON from_user.PortalUserId = %1$s.FromId - LEFT JOIN '.TABLE_PREFIX.'Users to_user ON to_user.PortalUserId = %1$s.ToId', - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'%3$sPrivateMessageBody pmb ON pmb.PMBodyId = %1$s.PMBodyId + LEFT JOIN '.TABLE_PREFIX.'Users from_user ON from_user.PortalUserId = %1$s.FromId + LEFT JOIN '.TABLE_PREFIX.'Users to_user ON to_user.PortalUserId = %1$s.ToId', + ), - 'ListSortings' => Array ( - '' => Array( - 'ForcedSorting' => Array('CreatedOn' => 'desc'), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('CreatedOn' => 'desc'), ), + ), - 'ItemSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sPrivateMessageBody pmb ON pmb.PMBodyId = %1$s.PMBodyId - LEFT JOIN '.TABLE_PREFIX.'Users from_user ON from_user.PortalUserId = %1$s.FromId - LEFT JOIN '.TABLE_PREFIX.'Users to_user ON to_user.PortalUserId = %1$s.ToId', - ), + 'SubItems' => Array ('private-message-body'), - 'SubItems' => Array('private-message-body'), + 'CalculatedFields' => Array ( + '' => Array ( + 'Subject' => 'pmb.Subject', + 'Body' => 'pmb.Body', + 'Options' => 'pmb.Options', - 'CalculatedFields' => Array ( - '' => Array ( - 'Subject' => 'pmb.Subject', - 'Body' => 'pmb.Body', - 'Options' => 'pmb.Options', + 'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Username)', + 'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Username)', - 'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Username)', - 'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Username)', - - 'FromFullName' => 'TRIM(CONCAT(from_user.FirstName, " ", from_user.LastName))', - 'ToFullName' => 'TRIM(CONCAT(to_user.FirstName, " ", to_user.LastName))', - ), + 'FromFullName' => 'TRIM(CONCAT(from_user.FirstName, " ", from_user.LastName))', + 'ToFullName' => 'TRIM(CONCAT(to_user.FirstName, " ", to_user.LastName))', ), + ), - 'Fields' => Array ( - 'PmId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FromId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), - 'ToId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), - 'FolderId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_Inbox', 1 => 'lu_Sent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => PM_FOLDER_SENT), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_opt_MessageUnread', 1 => 'lu_opt_MessageViewed', 2 => 'lu_opt_MessageRead', 3 => 'lu_opt_MessageReplied', 4 => 'lu_opt_MessageSent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - ), + 'Fields' => Array ( + 'PmId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FromId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), + 'ToId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), + 'FolderId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_Inbox', 1 => 'lu_Sent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => PM_FOLDER_SENT), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_opt_MessageUnread', 1 => 'lu_opt_MessageViewed', 2 => 'lu_opt_MessageRead', 3 => 'lu_opt_MessageReplied', 4 => 'lu_opt_MessageSent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + ), - 'VirtualFields' => Array ( - 'FromName' => Array ('type' => 'string', 'default' => ''), - 'FromFullName' => Array ('type' => 'string', 'default' => ''), - 'ToName' => Array ('type' => 'string', 'default' => ''), - 'ToFullName' => Array ('type' => 'string', 'default' => ''), - 'Subject' => Array ('type' => 'string', 'default' => ''), - 'Body' => Array ('type' => 'string', 'required' => 1, 'default' => ''), - 'Options' => Array ('type' => 'string', 'default' => 0), + 'VirtualFields' => Array ( + 'FromName' => Array ('type' => 'string', 'default' => ''), + 'FromFullName' => Array ('type' => 'string', 'default' => ''), + 'ToName' => Array ('type' => 'string', 'default' => ''), + 'ToFullName' => Array ('type' => 'string', 'default' => ''), + 'Subject' => Array ('type' => 'string', 'default' => ''), + 'Body' => Array ('type' => 'string', 'required' => 1, 'default' => ''), + 'Options' => Array ('type' => 'string', 'default' => 0), - 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), - ), - - - ); \ No newline at end of file + 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), + ), +); \ No newline at end of file Index: branches/5.3.x/units/topics/topics_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15490) +++ branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15655) @@ -1,6 +1,6 @@ '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', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => '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', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'build_event' => 'OnBuild'), - 'ConfigPriority' => 0, + 'AutoLoad' => true, - 'RewritePriority' => 103, - 'RewriteListener' => 'CategoryItemRewrite:RewriteListener', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => 'cdata', - 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineCustomFields', - ), + 'ConfigPriority' => 0, - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'rev', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + 'RewritePriority' => 103, + 'RewriteListener' => 'CategoryItemRewrite:RewriteListener', - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'fav', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => 'cdata', + 'DoSpecial' => '*', + 'DoEvent' => 'OnDefineCustomFields', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'rel', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rev', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'img', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'fav', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'ci', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rel', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'topics', - 'AdminTemplatePrefix' => 'topics_', - 'SearchConfigPostfix' => 'topics', + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'img', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - 'IDField' => 'TopicId', - 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'ci', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + ), - 'TitleField' => 'TopicText', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Topic', // phrase used to specify item type in relationship list - 'OwnerField' => 'OwnerId', // usually it is CreatedById + 'CatalogItem' => true, + 'AdminTemplatePath' => 'topics', + 'AdminTemplatePrefix' => 'topics_', + 'SearchConfigPostfix' => 'topics', - '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!'), - ), + 'IDField' => 'TopicId', + 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events - '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!"), + 'TitleField' => 'TopicText', // field, used in bluebar when editing existing item + 'TitlePhrase' => 'la_Text_Topic', // phrase used to specify item type in relationship list + 'OwnerField' => 'OwnerId', // usually it is CreatedById - '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#'", - ), + '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!'), + ), - '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#", - ), + '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!"), - '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#", - ), + '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#'", + ), - 'tree_in-bulletin' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')), - ), + '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#", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-bulletin/topics/topics_edit', 'priority' => 1), - 'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-bulletin/topics/topics_categories', 'priority' => 2), - 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-bulletin/topics/topics_relations', 'priority' => 3), - 'images' => Array ('title' => 'la_tab_Images', 't' => 'in-bulletin/topics/topics_images', 'priority' => 4), - 'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-bulletin/topics/topics_reviews', 'priority' => 5), - 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-bulletin/topics/topics_custom', 'priority' => 6), - ), - ), + '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#", + ), - 'PermItemPrefix' => 'TOPIC', + 'tree_in-bulletin' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')), + ), - 'PermTabText' => 'In-Bulletin', - 'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'custom' => 'in-bulletin:configuration_custom'), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-bulletin/topics/topics_edit', 'priority' => 1), + 'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-bulletin/topics/topics_categories', 'priority' => 2), + 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-bulletin/topics/topics_relations', 'priority' => 3), + 'images' => Array ('title' => 'la_tab_Images', 't' => 'in-bulletin/topics/topics_images', 'priority' => 4), + 'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-bulletin/topics/topics_reviews', 'priority' => 5), + 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-bulletin/topics/topics_custom', 'priority' => 6), + ), + ), - 'Sections' => Array ( - /*'in-bulletin' => Array ( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-bulletin', - 'label' => 'la_title_In-Bulletin', - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 3.3, - 'container' => true, - 'type' => stTREE, - ),*/ + 'PermItemPrefix' => 'TOPIC', - 'in-bulletin:topics' => Array ( - 'parent' => 'in-portal:site', - 'icon' => 'topics', - 'label' => 'la_tab_Topics', - 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-bb.showall', 'pass' => 'm'), - 'onclick' => 'setCatalogTab(\'bb.showall\')', - 'permissions' => Array ('view'), - 'priority' => 3.4, - 'type' => stTREE, - ), + 'PermTabText' => 'In-Bulletin', + 'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'custom' => 'in-bulletin:configuration_custom'), - // topic settings - 'in-bulletin:setting_folder' => Array ( - 'parent' => 'in-portal:system', - 'icon' => 'conf_topics', - 'label' => 'la_title_In-Bulletin', - 'use_parent_header' => 1, - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 3.5, - 'container' => true, - 'type' => stTREE, - ), + 'Sections' => Array ( + /*'in-bulletin' => Array ( + 'parent' => 'in-portal:root', + 'icon' => 'settings_in-bulletin', + 'label' => 'la_title_In-Bulletin', + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 3.3, + 'container' => true, + 'type' => stTREE, + ),*/ - /*'in-bulletin:inbulletin_general' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'core:settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit'), - 'priority' => 2.9, - 'type' => stTREE, - ),*/ + 'in-bulletin:topics' => Array ( + 'parent' => 'in-portal:site', + 'icon' => 'topics', + 'label' => 'la_tab_Topics', + 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-bb.showall', 'pass' => 'm'), + 'onclick' => 'setCatalogTab(\'bb.showall\')', + 'permissions' => Array ('view'), + 'priority' => 3.4, + 'type' => stTREE, + ), - 'in-bulletin:configuration_output' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'core:conf_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), + // topic settings + 'in-bulletin:setting_folder' => Array ( + 'parent' => 'in-portal:system', + 'icon' => 'conf_topics', + 'label' => 'la_title_In-Bulletin', + 'use_parent_header' => 1, + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 3.5, + 'container' => true, + 'type' => stTREE, + ), - 'in-bulletin:configuration_search' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'core:conf_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array ('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), + /*'in-bulletin:inbulletin_general' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'core:settings_general', + 'label' => 'la_tab_GeneralSettings', + 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 2.9, + 'type' => stTREE, + ),*/ - 'in-bulletin:configuration_custom' => Array ( - 'parent' => 'in-bulletin:setting_folder', - 'icon' => 'core:conf_customfields', - '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' => 5, - 'type' => stTREE, - ), - ), + 'in-bulletin:configuration_output' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'core:conf_output', + 'label' => 'la_tab_ConfigOutput', + 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 3, + 'type' => stTREE, + ), - 'FilterMenu' => Array ( - 'Groups' => Array ( - Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER), - ), - 'Filters' => 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' ), - ), - ), + 'in-bulletin:configuration_search' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'core:conf_search', + 'label' => 'la_tab_ConfigSearch', + 'url' => Array ('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), + 'priority' => 4, + 'type' => stTREE, + ), - 'CatalogSelectorName' => 'topiclist', + 'in-bulletin:configuration_custom' => Array ( + 'parent' => 'in-bulletin:setting_folder', + 'icon' => 'core:conf_customfields', + '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' => 5, + 'type' => stTREE, + ), + ), - '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 + 'FilterMenu' => Array ( + 'Groups' => Array ( + Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER), + ), + 'Filters' => 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' ), + ), + ), - 'HotLimit' => 'Topic_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Views', // item click count is stored here (in item table) - ), + 'CatalogSelectorName' => 'topiclist', - 'ItemType' => 3, // this is used when relation to product is added from in-portal and via-versa + '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 - 'ViewMenuPhrase' => 'la_title_Topics', - 'CatalogTabIcon' => 'in-bulletin:icon16_topics.png', - 'UsePendingEditing' => true, // item editing is controlled by TOPIC.ADD/EDIT, TOPIC.ADD/EDIT.PENDING permissions + 'HotLimit' => 'Topic_HotLimit', // variable name in inp_Cache table + 'ClickField' => 'Views', // item click count is stored here (in item table) + ), - 'StatisticsInfo' => Array ( - 'pending' => Array ( - 'icon' => 'icon16_topic_pending.gif', - 'label' => 'la_Text_Topics', - 'js_url' => '#url#', - 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'bb', 'pass' => 'm,bb.showall', 'bb.showall_event' => 'OnSetFilterPattern', 'bb.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, - ), - ), + 'ItemType' => 3, // this is used when relation to product is added from in-portal and via-versa - 'TableName' => TABLE_PREFIX.'Topic', - 'CustomDataTableName' => TABLE_PREFIX . 'TopicCustomData', + 'ViewMenuPhrase' => 'la_title_Topics', + 'CatalogTabIcon' => 'in-bulletin:icon16_topics.png', + 'UsePendingEditing' => true, // item editing is controlled by TOPIC.ADD/EDIT, TOPIC.ADD/EDIT.PENDING permissions - 'CalculatedFields' => Array ( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', - 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', - 'ParentPath' => TABLE_PREFIX.'Categories.ParentPath', + 'StatisticsInfo' => Array ( + 'pending' => Array ( + 'icon' => 'icon16_topic_pending.gif', + 'label' => 'la_Text_Topics', + 'js_url' => '#url#', + 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'bb', 'pass' => 'm,bb.showall', 'bb.showall_event' => 'OnSetFilterPattern', 'bb.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, + ), + ), - 'AltName' => 'img.AltName', - 'SameImages' => 'img.SameImages', - 'LocalThumb' => 'img.LocalThumb', - 'ThumbPath' => 'img.ThumbPath', - 'ThumbUrl' => 'img.ThumbUrl', - 'LocalImage' => 'img.LocalImage', - 'LocalPath' => 'img.LocalPath', - 'FullUrl' => 'img.Url', + 'TableName' => TABLE_PREFIX.'Topic', + 'CustomDataTableName' => TABLE_PREFIX . 'TopicCustomData', - 'LastPoster' => 'IF (ISNULL(last_post.PosterAlias), "Guest", last_post.PosterAlias)', - 'LastPosterId' => 'last_post.CreatedById', - ), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', + 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', + 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', + 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', + 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', + 'ParentPath' => TABLE_PREFIX.'Categories.ParentPath', - '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.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.OwnerId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId - LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql + 'AltName' => 'img.AltName', + 'SameImages' => 'img.SameImages', + 'LocalThumb' => 'img.LocalThumb', + 'ThumbPath' => 'img.ThumbPath', + 'ThumbUrl' => 'img.ThumbUrl', + 'LocalImage' => 'img.LocalImage', + 'LocalPath' => 'img.LocalPath', + 'FullUrl' => 'img.Url', - '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.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.OwnerId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId - LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId'), + 'LastPoster' => 'IF (ISNULL(last_post.PosterAlias), "Guest", last_post.PosterAlias)', + 'LastPosterId' => 'last_post.CreatedById', + ), + ), - 'SubItems' => Array ('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata', 'bb-fav', 'bb-post'), + '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.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 + LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.OwnerId = u.PortalUserId + LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId + LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId', + ), - 'Fields' => Array ( - 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'NotifyOwnerOnChanges' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Modified' => Array ( - 'type' => 'int', - 'formatter' => 'kDateFormatter', - 'required' => 1, 'default' => '#NOW#', - ), - 'TopicText' => Array ( - 'type' => 'string', - 'required' => 1, 'default' => '', 'not_null' => 1, - ), - '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 (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 0 => 'la_Disabled', - 1 => 'la_Active', - 2 => 'la_Pending', - ), - 'use_phrases' => 1, - 'not_null' => 1, 'default' => 2, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OwnerId' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', - 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users - WHERE `%s` = \'%s\' ', - 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Username', - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, - ), - 'ModifiedById' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', - 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users - WHERE `%s` = \'%s\' ', - 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Username', - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'default' => NULL, - ), - 'ResourceId' => Array ('type' => 'int', 'default' => null), - '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#', - ), - 'CachedReviewsQty' => Array ('type' => 'int' , 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0), - 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'NewItem' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( - 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', - ), - 'default' => 2, 'not_null' => 1, - ), - 'PopItem' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( - 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', - ), - 'default' => 2, 'not_null' => 1, - ), - 'HotItem' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( - 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', - ), - 'default' => 2, 'not_null' => 1, - ), - 'PostedBy' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'OrgId' => Array ('type' => 'int', 'default' => null), - 'LastPostId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'LastPostDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'TodayDate' => Array ('type' => 'string', 'default' => null), - 'TodayPosts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'MetaKeywords' => Array ('type' => 'string', 'default' => null), - 'MetaDescription' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('EditorsPick' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('TopicText' => 'asc'), + ) + ), - 'VirtualFields' => Array ( - 'Relevance' => Array ('type' => 'float', 'default' => 0), - 'UserName' => Array ('type' => 'string', 'default' => ''), - 'CategoryId' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (), - 'default' => 0, - ), - 'Filename' => Array ('type' => 'string', 'default' => ''), - 'CategoryFilename' => Array ('type' => 'string', 'default' => ''), - 'PrimaryCat' => Array ('type' => 'int', 'default' => 0), - 'IsHot' => Array ('type' => 'int', 'default' => 0), - 'IsNew' => Array ('type' => 'int', 'default' => 0), - 'IsPop' => Array ('type' => 'int', 'default' => 0), - 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), - 'ParentPath' => Array ('type' => 'string', 'default' => ''), + '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.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.OwnerId = u.PortalUserId + LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId + LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId' + ), - 'LastPoster' => Array ('type' => 'string', 'default' => ''), - 'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST), - 'PostingText' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', 'using_fck' => 1, - 'required' => 1, 'allow_html' => 1, 'default' => '', - ), - 'DisableBBCodes' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, - ), - 'DisableSmileys' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, - ), - 'ShowSignatures' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 1, - ), + 'SubItems' => Array ('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata', 'bb-fav', 'bb-post'), - // for primary image - 'AltName' => 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' => ''), - ), + 'Fields' => Array ( + 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'NotifyOwnerOnChanges' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Modified' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'required' => 1, 'default' => '#NOW#', + ), + 'TopicText' => Array ( + 'type' => 'string', + 'required' => 1, 'default' => '', 'not_null' => 1, + ), + '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 (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 0 => 'la_Disabled', + 1 => 'la_Active', + 2 => 'la_Pending', + ), + 'use_phrases' => 1, + 'not_null' => 1, 'default' => 2, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OwnerId' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users + WHERE `%s` = \'%s\' ', + 'left_key_field' => 'PortalUserId', + 'left_title_field' => 'Username', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, + ), + 'ModifiedById' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users + WHERE `%s` = \'%s\' ', + 'left_key_field' => 'PortalUserId', + 'left_title_field' => 'Username', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'default' => NULL, + ), + 'ResourceId' => Array ('type' => 'int', 'default' => null), + '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#', + ), + 'CachedReviewsQty' => Array ('type' => 'int' , 'not_null' => 1, 'default' => 0), + 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0), + 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'NewItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'PopItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'HotItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'PostedBy' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'OrgId' => Array ('type' => 'int', 'default' => null), + 'LastPostId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'LastPostDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'TodayDate' => Array ('type' => 'string', 'default' => null), + 'TodayPosts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'MetaKeywords' => Array ('type' => 'string', 'default' => null), + 'MetaDescription' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null + ), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_topic.png', - 0 => 'icon16_topic_disabled.png', - 1 => 'icon16_topic.png', - 2 => 'icon16_topic_pending.png', - 'NEW' => 'icon16_topic_new.png', - ), - 'Fields' => Array ( - 'TopicId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), - 'Priority' => Array('filter_block' => 'grid_range_filter', 'width' => 65), - 'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), - 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Views' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), - ), - ), + 'VirtualFields' => Array ( + 'Relevance' => Array ('type' => 'float', 'default' => 0), + 'UserName' => Array ('type' => 'string', 'default' => ''), + 'CategoryId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (), + 'default' => 0, + ), + 'Filename' => Array ('type' => 'string', 'default' => ''), + 'CategoryFilename' => Array ('type' => 'string', 'default' => ''), + 'PrimaryCat' => Array ('type' => 'int', 'default' => 0), + 'IsHot' => Array ('type' => 'int', 'default' => 0), + 'IsNew' => Array ('type' => 'int', 'default' => 0), + 'IsPop' => Array ('type' => 'int', 'default' => 0), + 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), + 'ParentPath' => Array ('type' => 'string', 'default' => ''), - 'Radio' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_topic.png', - 0 => 'icon16_topic_disabled.png', - 1 => 'icon16_topic.png', - 2 => 'icon16_topic_pending.png', - 'NEW' => 'icon16_topic_new.png', ), - 'Selector' => 'radio', - 'Fields' => Array ( - 'TopicId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), - 'Priority' => Array('filter_block' => 'grid_range_filter', 'width' => 65), - 'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), - 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Views' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), - ), - ), - ), + 'LastPoster' => Array ('type' => 'string', 'default' => ''), + 'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST), + 'PostingText' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'using_fck' => 1, + 'required' => 1, 'allow_html' => 1, 'default' => '', + ), + 'DisableBBCodes' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, + ), + 'DisableSmileys' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, + ), + 'ShowSignatures' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, + ), - 'ConfigMapping' => Array ( - 'PerPage' => 'Perpage_Topics', - 'ShortListPerPage' => 'Perpage_Topics_Short', - 'ForceEditorPick' => 'Topic_EditorPicksAbove', - 'DefaultSorting1Field' => 'Topic_SortField', - 'DefaultSorting2Field' => 'Topic_SortField2', - 'DefaultSorting1Dir' => 'Topic_SortOrder', - 'DefaultSorting2Dir' => 'Topic_SortOrder2', + // for primary image + 'AltName' => 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' => ''), + ), - 'RatingDelayValue' => 'topic_RatingDelay_Value', - 'RatingDelayInterval' => 'topic_RatingDelay_Interval', - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_topic.png', + 0 => 'icon16_topic_disabled.png', + 1 => 'icon16_topic.png', + 2 => 'icon16_topic_pending.png', + 'NEW' => 'icon16_topic_new.png', + ), + 'Fields' => Array ( + 'TopicId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), + 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65), + 'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), + 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Views' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), + ), + ), + + 'Radio' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_topic.png', + 0 => 'icon16_topic_disabled.png', + 1 => 'icon16_topic.png', + 2 => 'icon16_topic_pending.png', + 'NEW' => 'icon16_topic_new.png', + ), + 'Selector' => 'radio', + 'Fields' => Array ( + 'TopicId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), + 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65), + 'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), + 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Views' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), + ), + ), + ), + + 'ConfigMapping' => Array ( + 'PerPage' => 'Perpage_Topics', + 'ShortListPerPage' => 'Perpage_Topics_Short', + 'ForceEditorPick' => 'Topic_EditorPicksAbove', + 'DefaultSorting1Field' => 'Topic_SortField', + 'DefaultSorting2Field' => 'Topic_SortField2', + 'DefaultSorting1Dir' => 'Topic_SortOrder', + 'DefaultSorting2Dir' => 'Topic_SortOrder2', + + 'RatingDelayValue' => 'topic_RatingDelay_Value', + 'RatingDelayInterval' => 'topic_RatingDelay_Interval', + ), +); \ No newline at end of file Index: branches/5.3.x/units/private_message_body/private_message_body_config.php =================================================================== diff -u -N -r15490 -r15655 --- branches/5.3.x/units/private_message_body/private_message_body_config.php (.../private_message_body_config.php) (revision 15490) +++ branches/5.3.x/units/private_message_body/private_message_body_config.php (.../private_message_body_config.php) (revision 15655) @@ -1,6 +1,6 @@ 'private-message-body', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'PrivateMessageBodyEventHandler', 'file' => 'private_message_body_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'private-message-body', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PrivateMessageBodyEventHandler', 'file' => 'private_message_body_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'AutoLoad' => true, - 'IDField' => 'PMBodyId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitleField' => 'Subject', + 'IDField' => 'PMBodyId', - 'TableName' => TABLE_PREFIX.'PrivateMessageBody', + 'TitleField' => 'Subject', - 'ForeignKey' => 'PMBodyId', - 'ParentTableKey' => 'PMBodyId', - 'ParentPrefix' => 'private-message', - 'AutoDelete' => true, - 'AutoClone' => true, + 'TableName' => TABLE_PREFIX.'PrivateMessageBody', - 'ListSQLs' => Array ('' => ' SELECT %1$s.* %2$s FROM %1$s',), - 'ItemSQLs' => Array ('' => ' SELECT %1$s.* %2$s FROM %1$s',), + 'ForeignKey' => 'PMBodyId', + 'ParentTableKey' => 'PMBodyId', + 'ParentPrefix' => 'private-message', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Fields' => Array ( - 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'Body' => Array ('type' => 'string', 'default' => NULL), - 'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ReferenceCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 2), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'VirtualFields' => Array ( - 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Body' => Array ('type' => 'string', 'default' => NULL), + 'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ReferenceCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 2), + ), + + 'VirtualFields' => Array ( + 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), + 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), + ), +); \ No newline at end of file