Просмотр исходного кода

Ticket #715 - Integration with content modules.

AntonLV 9 лет назад
Родитель
Сommit
c1275ca310

+ 1 - 0
modules/boonex/files/classes/BxFilesConfig.php

@@ -111,6 +111,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_files_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_files_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_files_txt_sample_vote_single',
+             	'form_field_author' => '_bx_files_form_entry_input_author',
             	'grid_action_err_delete' => '_bx_files_grid_action_err_delete',
             	'grid_txt_account_manager' => '_bx_files_grid_txt_account_manager',
 				'filter_item_active' => '_bx_files_grid_filter_item_title_adm_active',

+ 13 - 1
modules/boonex/files/install/langs/en.xml

@@ -8,7 +8,7 @@
 	<string name="_bx_files_option_per_page_browse"><![CDATA[Number of items per page]]></string>
     <string name="_bx_files_option_per_page_profile"><![CDATA[Number of items per page on profile/group page]]></string>
 	<string name="_bx_files_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
-	<string name="_bx_files_option_searchable_fields"><![CDATA[Searchable fields]]></string>
+	<string name="_bx_files_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
 
 	<string name="_bx_files_form_upload"><![CDATA[Files Upload]]></string>
 	<string name="_bx_files_form_entry"><![CDATA[Files]]></string>
@@ -16,6 +16,7 @@
 	<string name="_bx_files_form_entry_display_edit"><![CDATA[Edit File]]></string>
 	<string name="_bx_files_form_entry_display_delete"><![CDATA[Delete File]]></string>
 	<string name="_bx_files_form_entry_display_view"><![CDATA[View File]]></string>
+	<string name="_bx_files_form_entry_input_author"><![CDATA[Author]]></string>
 	<string name="_bx_files_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
 	<string name="_bx_files_form_entry_input_do_submit"><![CDATA[Submit]]></string>
 	<string name="_bx_files_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
@@ -112,6 +113,12 @@
 	<string name="_bx_files_page_block_title_my_entries"><![CDATA[My Files]]></string>
 	<string name="_bx_files_page_block_title_entry_file_preview"><![CDATA[File Preview]]></string>
 	<string name="_bx_files_page_block_title_group_entries"><![CDATA[Files]]></string>
+	<string name="_bx_files_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_files_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_files_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_files_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_files_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_files_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
 
     <string name="_bx_files_menu_set_title_view_entry"><![CDATA[File Actions]]></string>
     <string name="_bx_files_menu_title_view_entry"><![CDATA[File Actions]]></string>
@@ -128,6 +135,8 @@
     <string name="_bx_files_menu_item_title_entries_home"><![CDATA[Files]]></string>
     <string name="_bx_files_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
     <string name="_bx_files_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_files_menu_item_title_entries_search"><![CDATA[Search]]></string>
     <string name="_bx_files_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
     <string name="_bx_files_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
     <string name="_bx_files_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
@@ -170,6 +179,9 @@
     <string name="_bx_files_chart_growth"><![CDATA[Files: Growth]]></string>
     <string name="_bx_files_chart_growth_speed"><![CDATA[Files: Growth Speed]]></string>
 
+    <string name="_bx_files_search_extended"><![CDATA[Files Search]]></string>
+    <string name="_bx_files_search_extended_cmts"><![CDATA[Files Comments Search]]></string>
+
     <string name="_bx_files_pre_lists_cats"><![CDATA[File categories]]></string>
     <string name="_bx_files_cat_documentation"><![CDATA[Documentation]]></string>
     <string name="_bx_files_cat_presentation"><![CDATA[Presentation]]></string>

+ 4 - 1
modules/boonex/files/install/sql/disable.sql

@@ -8,7 +8,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 
 -- PAGES
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_files';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_files' OR `object` IN('bx_files_create_entry', 'bx_files_edit_entry', 'bx_files_delete_entry', 'bx_files_view_entry', 'bx_files_view_entry_comments', 'bx_files_home', 'bx_files_popular', 'bx_files_updated', 'bx_files_author', 'bx_files_group');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_files' OR `object` IN('bx_files_create_entry', 'bx_files_edit_entry', 'bx_files_delete_entry', 'bx_files_view_entry', 'bx_files_view_entry_comments', 'bx_files_home', 'bx_files_popular', 'bx_files_updated', 'bx_files_author', 'bx_files_group', 'bx_files_search', 'bx_files_manage');
 
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_files';
@@ -25,6 +25,9 @@ DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_files';
 -- SEARCH
 DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_files', 'bx_files_cmts');
 
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_files';
+
 -- METATAGS
 DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_files';
 

+ 17 - 1
modules/boonex/files/install/sql/enable.sql

@@ -119,6 +119,16 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_files_home', 2, 'bx_files', '', '_bx_files_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:14:\"keywords_cloud\";s:6:\"params\";a:2:{i:0;s:8:\"bx_files\";i:1;s:8:\"bx_files\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 1, 1, 0),
 ('bx_files_home', 2, 'bx_files', '', '_bx_files_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:15:\"categories_list\";s:6:\"params\";a:2:{i:0;s:13:\"bx_files_cats\";i:1;a:1:{s:10:\"show_empty\";b:1;}}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1, 1);
 
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_files_search', '_bx_files_page_title_sys_entries_search', '_bx_files_page_title_entries_search', 'bx_files', 5, 2147483647, 1, 'files-search', 'page.php?i=files-search', '', '', '', 0, 1, 0, 'BxFilesPageBrowse', 'modules/boonex/files/classes/BxFilesPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_files_search', 1, 'bx_files', '_bx_files_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:8:"bx_files";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_files_search', 1, 'bx_files', '_bx_files_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:8:"bx_files";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_files_search', 1, 'bx_files', '_bx_files_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:13:"bx_files_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_files_search', 1, 'bx_files', '_bx_files_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:13:"bx_files_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
 -- PAGE: module manage own
 INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_files_manage', '_bx_files_page_title_sys_manage', '_bx_files_page_title_manage', 'bx_files', 5, 2147483647, 1, 'files-manage', 'page.php?i=files-manage', '', '', '', 0, 1, 0, 'BxFilesPageBrowse', 'modules/boonex/files/classes/BxFilesPageBrowse.php');
@@ -211,7 +221,8 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
 ('bx_files_submenu', 'bx_files', 'files-home', '_bx_files_menu_item_title_system_entries_public', '_bx_files_menu_item_title_entries_public', 'page.php?i=files-home', '', '', '', '', 2147483647, 1, 1, 1),
 ('bx_files_submenu', 'bx_files', 'files-popular', '_bx_files_menu_item_title_system_entries_popular', '_bx_files_menu_item_title_entries_popular', 'page.php?i=files-popular', '', '', '', '', 2147483647, 1, 1, 2),
-('bx_files_submenu', 'bx_files', 'files-manage', '_bx_files_menu_item_title_system_entries_manage', '_bx_files_menu_item_title_entries_manage', 'page.php?i=files-manage', '', '', '', '', 2147483646, 1, 1, 3);
+('bx_files_submenu', 'bx_files', 'files-search', '_bx_files_menu_item_title_system_entries_search', '_bx_files_menu_item_title_entries_search', 'page.php?i=files-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_files_submenu', 'bx_files', 'files-manage', '_bx_files_menu_item_title_system_entries_manage', '_bx_files_menu_item_title_entries_manage', 'page.php?i=files-manage', '', '', '', '', 2147483646, 1, 1, 4);
 
 -- MENU: sub-menu for view entry
 
@@ -321,6 +332,11 @@ INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `
 ('bx_files', '_bx_files', @iSearchOrder + 1, 'BxFilesSearchResult', 'modules/boonex/files/classes/BxFilesSearchResult.php'),
 ('bx_files_cmts', '_bx_files_cmts', @iSearchOrder + 2, 'BxFilesCmtsSearchResult', 'modules/boonex/files/classes/BxFilesCmtsSearchResult.php');
 
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_files', 'bx_files', 'bx_files', '_bx_files_search_extended', 1, '', ''),
+('bx_files_cmts', 'bx_files_cmts', 'bx_files', '_bx_files_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
 -- METATAGS
 INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
 ('bx_files', 'bx_files_meta_keywords', '', '', '', '');

+ 13 - 1
modules/boonex/russian/data/langs/bx_files/ru.xml

@@ -8,7 +8,7 @@
 	<string name="_bx_files_option_per_page_browse"><![CDATA[Количество файлов на странице]]></string>
     <string name="_bx_files_option_per_page_profile"><![CDATA[Количество файлов на странице профайла]]></string>
 	<string name="_bx_files_option_rss_num"><![CDATA[Количество файлов в RSS]]></string>
-	<string name="_bx_files_option_searchable_fields"><![CDATA[Поисковые поля]]></string>
+	<string name="_bx_files_option_searchable_fields"><![CDATA[Поля для поиска по ключевому слову]]></string>
 
 	<string name="_bx_files_form_upload"><![CDATA[Загрузка файлов]]></string>
 	<string name="_bx_files_form_entry"><![CDATA[Файлы]]></string>
@@ -16,6 +16,7 @@
 	<string name="_bx_files_form_entry_display_edit"><![CDATA[Редактирование файла]]></string>
 	<string name="_bx_files_form_entry_display_delete"><![CDATA[Удаление файла]]></string>
 	<string name="_bx_files_form_entry_display_view"><![CDATA[Просмотр файла]]></string>
+	<string name="_bx_files_form_entry_input_author"><![CDATA[Автор]]></string>
 	<string name="_bx_files_form_entry_input_sys_do_submit"><![CDATA[Отправить]]></string>
 	<string name="_bx_files_form_entry_input_do_submit"><![CDATA[Отправить]]></string>
 	<string name="_bx_files_form_entry_input_sys_do_publish"><![CDATA[Опубликовать]]></string>
@@ -112,6 +113,12 @@
 	<string name="_bx_files_page_block_title_my_entries"><![CDATA[Мои файлы]]></string>
 	<string name="_bx_files_page_block_title_entry_file_preview"><![CDATA[Предварительный просмотр файла]]></string>
 	<string name="_bx_files_page_block_title_group_entries"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_files_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_files_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_files_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
 
     <string name="_bx_files_menu_set_title_view_entry"><![CDATA[Действия с файлом]]></string>
     <string name="_bx_files_menu_title_view_entry"><![CDATA[Действия с файлом]]></string>
@@ -128,6 +135,8 @@
     <string name="_bx_files_menu_item_title_entries_home"><![CDATA[Файлы]]></string>
     <string name="_bx_files_menu_item_title_system_entries_public"><![CDATA[Последние]]></string>
     <string name="_bx_files_menu_item_title_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
     <string name="_bx_files_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
     <string name="_bx_files_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
     <string name="_bx_files_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
@@ -170,6 +179,9 @@
     <string name="_bx_files_chart_growth"><![CDATA[Файлы: Развитие]]></string>
     <string name="_bx_files_chart_growth_speed"><![CDATA[Файлы: Скорость развития]]></string>
 
+    <string name="_bx_files_search_extended"><![CDATA[Поиск публикаций]]></string>
+    <string name="_bx_files_search_extended_cmts"><![CDATA[Поиск комментариев к публикациям]]></string>
+
     <string name="_bx_files_pre_lists_cats"><![CDATA[Категории файлов]]></string>
     <string name="_bx_files_cat_documentation"><![CDATA[Документация]]></string>
     <string name="_bx_files_cat_presentation"><![CDATA[Презентация]]></string>