AntonLV 10 лет назад
Родитель
Сommit
d4cfd3665d

+ 2 - 0
modules/boonex/forum/classes/BxForumConfig.php

@@ -41,6 +41,7 @@ class BxForumConfig extends BxBaseModTextConfig
             'FIELD_THUMB' => '',
             'FIELD_COMMENTS' => 'comments',
         	'FIELD_STATUS' => 'status',
+	        'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
 
             // page URIs
             'URI_VIEW_ENTRY' => 'view-discussion',
@@ -73,6 +74,7 @@ class BxForumConfig extends BxBaseModTextConfig
             'OBJECT_VIEWS' => 'bx_forum',
             'OBJECT_VOTES' => '',
             'OBJECT_COMMENTS' => 'bx_forum',
+        	'OBJECT_METATAGS' => 'bx_forum',
             'OBJECT_PRIVACY_VIEW' => 'bx_forum_allow_view_to',
             'OBJECT_FORM_ENTRY' => 'bx_forum',
             'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_forum_entry_view',

+ 9 - 3
modules/boonex/forum/classes/BxForumGrid.php

@@ -64,10 +64,9 @@ class BxForumGrid extends BxTemplGrid
         return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
     }
 
-    protected function _getCellLastReplyTimestamp($mixedValue, $sKey, $aField, $aRow)
+    protected function _getRowHeader ()
     {
-        $s = $this->_oModule->_oTemplate->getEntryPreviewGrid($aRow);
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
+    	return array();
     }
 
     protected function _getCellAuthor($mixedValue, $sKey, $aField, $aRow)
@@ -77,6 +76,13 @@ class BxForumGrid extends BxTemplGrid
         return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
     }
 
+    protected function _getCellLastReplyTimestamp($mixedValue, $sKey, $aField, $aRow)
+    {
+        $mixedValue = $this->_oModule->_oTemplate->getEntryPreviewGrid($aRow);
+
+        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
+    }
+
     protected function _getCellComments($mixedValue, $sKey, $aField, $aRow)
     {
         $mixedValue = $this->_oModule->_oTemplate->getEntryLabel($aRow, array('show_count' => 1));

+ 3 - 7
modules/boonex/forum/install/langs/en.xml

@@ -80,8 +80,8 @@
     <string name="_bx_forum_page_block_title_new_entries"><![CDATA[New]]></string>
     <string name="_bx_forum_page_block_title_new_entries_view_extended"><![CDATA[New (Extended View)]]></string>
     <string name="_bx_forum_page_block_title_new_entries_view_full"><![CDATA[New (Full View)]]></string>
-    <string name="_bx_forum_page_block_title_latest_entries"><![CDATA[Latest (Gallery View)]]></string>
-    <string name="_bx_forum_page_block_title_latest_entries_view_extended"><![CDATA[Latest]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries"><![CDATA[Discussions With Recent Posts]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries_view_extended"><![CDATA[Latest (Extended View)]]></string>
     <string name="_bx_forum_page_block_title_latest_entries_view_full"><![CDATA[Latest (Full View)]]></string>
     <string name="_bx_forum_page_block_title_top_entries"><![CDATA[Top]]></string>
     <string name="_bx_forum_page_block_title_top_entries_view_extended"><![CDATA[Top (Extended View)]]></string>
@@ -108,7 +108,7 @@
 	<string name="_bx_forum_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
 	<string name="_bx_forum_page_block_title_manage"><![CDATA[Manage]]></string>    
     <string name="_bx_forum_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
-	<string name="_bx_forum_page_block_title_cats"><![CDATA[Discussions Categories]]></string>
+	<string name="_bx_forum_page_block_title_cats"><![CDATA[Categories]]></string>
 	<string name="_bx_forum_page_block_title_my_entries"><![CDATA[My Discussions]]></string>
 
     <string name="_bx_forum_menu_title_submenu"><![CDATA[Forum Submenu]]></string>
@@ -162,10 +162,6 @@
     <string name="_bx_forum_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
     <string name="_bx_forum_grid_action_err_delete"><![CDATA[Cannot delete the selected discussion(s).]]></string>
     <string name="_bx_forum_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
-	<string name="_bx_forum_grid_column_title_author"><![CDATA[]]></string>
-    <string name="_bx_forum_grid_column_title_comments"><![CDATA[#]]></string>
-    <string name="_bx_forum_grid_column_title_preview"><![CDATA[Preview]]></string>    
-    <string name="_bx_forum_grid_action_title_delete"><![CDATA[Delete]]></string>
     <string name="_bx_forum_grid_action_title_add"><![CDATA[New discussion]]></string>
 
 	<string name="_bx_forum_pre_lists_cats"><![CDATA[Forum categories]]></string>

+ 7 - 9
modules/boonex/forum/install/sql/enable.sql

@@ -104,9 +104,9 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 ('bx_forum_home', 'discussions-home', '_bx_forum_page_title_sys_home', '_bx_forum_page_title_home', @sName, 2, 2147483647, 1, 'page.php?i=discussions-home', '', '', '', 0, 1, 0, 'BxForumPageBrowse', 'modules/boonex/forum/classes/BxForumPageBrowse.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
-('bx_forum_home', 1, @sName, '', '_bx_forum_page_block_title_latest_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_forum";s:6:"method";s:13:"browse_latest";s:6:"params";a:1:{i:0;s:5:"table";}}', 0, 1, 1, 0),
-('bx_forum_home', 2, @sName, '', '_bx_forum_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_forum";i:1;s:8:"bx_forum";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 0),
-('bx_forum_home', 2, @sName, '', '_bx_forum_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_forum_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 1);
+('bx_forum_home', 1, @sName, '', '_bx_forum_page_block_title_latest_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_forum";s:6:"method";s:13:"browse_latest";s:6:"params";a:1:{i:0;s:5:"table";}}', 0, 1, 1, 0),
+('bx_forum_home', 2, @sName, '', '_bx_forum_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_forum_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 0),
+('bx_forum_home', 2, @sName, '', '_bx_forum_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_forum";i:1;s:8:"bx_forum";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 1);
 
 -- 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 
@@ -226,16 +226,14 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 
 -- GRIDS: main
 INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_mode`, `sorting_fields`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-(@sName, 'Sql', 'SELECT `c`.`id`, `c`.`author`, `c`.`text`, `c`.`added`, `c`.`comments`, `c`.`last_reply_timestamp`, `c`.`last_reply_profile_id`, `cmt`.`cmt_text` FROM `bx_forum_discussions` AS `c` LEFT JOIN `bx_forum_cmts` AS `cmt` ON (`cmt`.`cmt_id` = `c`.`last_reply_comment_id`)', 'bx_forum_discussions', 'id', 'last_reply_timestamp', '', 10, NULL, 'start', '', 'text', 'auto', 'comments,last_reply_timestamp', 2147483646, 'BxForumGrid', 'modules/boonex/forum/classes/BxForumGrid.php');
+(@sName, 'Sql', 'SELECT `c`.`id`, `c`.`author`, `c`.`text`, `c`.`added`, `c`.`comments`, `c`.`last_reply_timestamp`, `c`.`last_reply_profile_id`, `cmt`.`cmt_text` FROM `bx_forum_discussions` AS `c` LEFT JOIN `bx_forum_cmts` AS `cmt` ON (`cmt`.`cmt_id` = `c`.`last_reply_comment_id`)', 'bx_forum_discussions', 'id', 'last_reply_timestamp', '', 10, NULL, 'start', '', 'text', 'auto', '', 2147483646, 'BxForumGrid', 'modules/boonex/forum/classes/BxForumGrid.php');
 
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
-(@sName, 'checkbox', '_sys_select', '2%', '', 1),
-(@sName, 'author', '_bx_forum_grid_column_title_author', '25%', '', 2),
-(@sName, 'last_reply_timestamp', '_bx_forum_grid_column_title_preview', '68%', '', 3),
-(@sName, 'comments', '_bx_forum_grid_column_title_comments', '5%', '', 4);
+(@sName, 'author', '', '10%', '', 1),
+(@sName, 'last_reply_timestamp', '', '85%', '', 2),
+(@sName, 'comments', '', '5%', '', 3);
 
 INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
-(@sName, 'bulk', 'delete', '_bx_forum_grid_action_title_delete', '', 1, 1),
 (@sName, 'independent', 'add', '_bx_forum_grid_action_title_add', '', 0, 1);
 
 -- GRIDS: moderation tools

+ 3 - 1
modules/boonex/forum/template/entry-author.html

@@ -1 +1,3 @@
-<a href="__url__" title="__title_attr__"><img class="bx-def-thumb bx-def-thumb-size" src="__thumb_url__" /></a>
+<div class="bx-def-font-align-center">
+	<a href="__url__" title="__title_attr__"><img class="bx-def-thumb bx-def-thumb-size" src="__thumb_url__" /></a>
+</div>

+ 3 - 7
modules/boonex/russian/data/langs/bx_forum/ru.xml

@@ -80,8 +80,8 @@
     <string name="_bx_forum_page_block_title_new_entries"><![CDATA[Новые]]></string>
     <string name="_bx_forum_page_block_title_new_entries_view_extended"><![CDATA[Новые Обсуждения (Расширенный просмотр)]]></string>
     <string name="_bx_forum_page_block_title_new_entries_view_full"><![CDATA[Новые Обсуждения (Полный просмотр)]]></string>
-    <string name="_bx_forum_page_block_title_latest_entries"><![CDATA[Недавние Обсуждения (Галерея)]]></string>
-    <string name="_bx_forum_page_block_title_latest_entries_view_extended"><![CDATA[Недавние Обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries"><![CDATA[Обсуждения с последними сообщениями]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries_view_extended"><![CDATA[Недавние Обсуждения (Расширенный просмотр)]]></string>
     <string name="_bx_forum_page_block_title_latest_entries_view_full"><![CDATA[Недавние Обсуждения (Полный просмотр)]]></string>
     <string name="_bx_forum_page_block_title_top_entries"><![CDATA[ТОП]]></string>
     <string name="_bx_forum_page_block_title_top_entries_view_extended"><![CDATA[ТОП (Расширенный просмотр)]]></string>
@@ -108,7 +108,7 @@
 	<string name="_bx_forum_page_block_title_system_manage_administration"><![CDATA[Управление всеми Обсуждениями]]></string>
 	<string name="_bx_forum_page_block_title_manage"><![CDATA[Управление Обсуждениями]]></string>
     <string name="_bx_forum_page_block_title_popular_keywords"><![CDATA[Популярные Хэштеги]]></string>
-    <string name="_bx_forum_page_block_title_cats"><![CDATA[Категории Обсуждений]]></string>
+    <string name="_bx_forum_page_block_title_cats"><![CDATA[Категории]]></string>
     <string name="_bx_forum_page_block_title_my_entries"><![CDATA[Мои обсуждения]]></string>
 
 	<string name="_bx_forum_menu_title_submenu"><![CDATA[Форум - Подменю]]></string>
@@ -162,10 +162,6 @@
     <string name="_bx_forum_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
     <string name="_bx_forum_grid_action_err_delete"><![CDATA[Невозможно удалить выбранное(ные) обсуждение(ния).]]></string>
     <string name="_bx_forum_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
-    <string name="_bx_forum_grid_column_title_author"><![CDATA[Автор]]></string>
-    <string name="_bx_forum_grid_column_title_comments"><![CDATA[#]]></string>
-    <string name="_bx_forum_grid_column_title_preview"><![CDATA[Предпросмотр]]></string>
-    <string name="_bx_forum_grid_action_title_delete"><![CDATA[Удалить]]></string>
     <string name="_bx_forum_grid_action_title_add"><![CDATA[Новое сообщение]]></string>
 
     <string name="_bx_forum_pre_lists_cats"><![CDATA[Категории обсуждений]]></string>