Alex Trofimov 10 лет назад
Родитель
Сommit
abe22c3d25

+ 0 - 17
modules/boonex/posts/classes/BxPostsTemplate.php

@@ -22,23 +22,6 @@ class BxPostsTemplate extends BxBaseModTextTemplate
         $this->MODULE = 'bx_posts';
         parent::__construct($oConfig, $oDb);
     }
-
-    function getAuthorAddon ($aData, $oProfile)
-    {
-        $s = parent::getAuthorAddon ($aData, $oProfile);
-        if (!$aData['cat'])
-            return $s;
-
-        if (!($oCat = BxTemplCategory::getObjectInstance('bx_posts_cats')))
-            return $s;
-
-        if (!($aCats = BxDolForm::getDataItems('bx_posts_cats')) || !isset($aCats[$aData['cat']]))
-            return $s;
-
-        $s = _t('_bx_posts_txt_category_link', $oCat->getCategoryUrl($aData['cat']), $aCats[$aData['cat']]) . '<br />' . $s;
-
-        return $s;
-    }
 }
 
 /** @} */

+ 5 - 1
modules/boonex/posts/install/langs/en.xml

@@ -36,6 +36,10 @@
     <string name="_bx_posts_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
     <string name="_bx_posts_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
     <string name="_bx_posts_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_posts_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_posts_form_entry_input_date_changed"><![CDATA[Updated]]></string>
 
 	<string name="_bx_posts_acl_action_create_entry"><![CDATA[Create Post]]></string>
 	<string name="_bx_posts_acl_action_delete_entry"><![CDATA[Delete Post]]></string>
@@ -98,6 +102,7 @@
 	<string name="_bx_posts_page_block_title_manage"><![CDATA[Manage]]></string>    
 	<string name="_bx_posts_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
 	<string name="_bx_posts_page_block_title_cats"><![CDATA[Posts Categories]]></string>
+	<string name="_bx_posts_page_block_title_entry_info"><![CDATA[Info]]></string>
 
     <string name="_bx_posts_menu_set_title_view_entry"><![CDATA[Post Actions]]></string>
     <string name="_bx_posts_menu_title_view_entry"><![CDATA[Post Actions]]></string>
@@ -186,7 +191,6 @@
     <string name="_bx_posts_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
 
     <string name="_bx_posts_txt_all_entries_by"><![CDATA[<a href="{0}">All Posts by {1} ({2})</a>]]></string>
-    <string name="_bx_posts_txt_category_link"><![CDATA[<a href="{0}">{1}</a> category]]></string>
     <string name="_bx_posts_txt_sample_single"><![CDATA[post]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[post's comment]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[post's vote]]></string>

+ 5 - 4
modules/boonex/posts/install/sql/enable.sql

@@ -51,13 +51,14 @@ INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `lay
 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_posts_view_entry', 1, 'bx_posts', '', '_bx_posts_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
 ('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 0),
-('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 0),
-('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:8:\"bx_posts\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 0),
-('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 1),
+('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 1),
+('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 1),
+('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 2),
 ('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 1),
 ('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 2),
 ('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"entity_attachments\";}', 0, 0, 0, 3),
-('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 4);
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 4),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:8:\"bx_posts\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 5);
 
 
 -- PAGE: view entry comments

+ 9 - 4
modules/boonex/posts/install/sql/install.sql

@@ -179,7 +179,10 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_posts', 'bx_posts', 'pictures', 'a:1:{i:0;s:9:"sys_html5";}', 'a:2:{s:10:"sys_simple";s:26:"_sys_uploader_simple_title";s:9:"sys_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_posts_form_entry_input_sys_pictures', '_bx_posts_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_posts', 'bx_posts', 'text', '', '', 0, 'textarea', '_bx_posts_form_entry_input_sys_text', '_bx_posts_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_posts_form_entry_input_text_err', 'XssHtml', '', 1, 0),
 ('bx_posts', 'bx_posts', 'title', '', '', 0, 'text', '_bx_posts_form_entry_input_sys_title', '_bx_posts_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_posts_form_entry_input_title_err', 'Xss', '', 1, 0),
-('bx_posts', 'bx_posts', 'cat', '', '#!bx_posts_cats', 0, 'select', '_bx_posts_form_entry_input_sys_cat', '_bx_posts_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_posts_form_entry_input_cat_err', 'Xss', '', 1, 0);
+('bx_posts', 'bx_posts', 'cat', '', '#!bx_posts_cats', 0, 'select', '_bx_posts_form_entry_input_sys_cat', '_bx_posts_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_posts_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_posts', 'bx_posts', 'added', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_added', '_bx_posts_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'changed', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_changed', '_bx_posts_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 ('bx_posts_entry_add', 'delete_confirm', 2147483647, 0, 1),
@@ -210,14 +213,16 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_posts_entry_edit', 'location', 2147483647, 1, 8),
 ('bx_posts_entry_edit', 'do_submit', 2147483647, 1, 9),
 ('bx_posts_entry_view', 'location', 2147483647, 0, 0),
-('bx_posts_entry_view', 'cat', 2147483647, 0, 0),
 ('bx_posts_entry_view', 'pictures', 2147483647, 0, 0),
 ('bx_posts_entry_view', 'delete_confirm', 2147483647, 0, 0),
-('bx_posts_entry_view', 'text', 2147483647, 1, 0),
+('bx_posts_entry_view', 'text', 2147483647, 0, 0),
 ('bx_posts_entry_view', 'do_publish', 2147483647, 0, 0),
 ('bx_posts_entry_view', 'title', 2147483647, 0, 0),
 ('bx_posts_entry_view', 'do_submit', 2147483647, 0, 0),
-('bx_posts_entry_view', 'allow_view_to', 2147483647, 0, 0);
+('bx_posts_entry_view', 'allow_view_to', 2147483647, 0, 0),
+('bx_posts_entry_view', 'cat', 2147483647, 1, 1),
+('bx_posts_entry_view', 'added', 2147483647, 1, 2),
+('bx_posts_entry_view', 'changed', 2147483647, 1, 3);
 
 -- PRE-VALUES
 

+ 6 - 2
modules/boonex/russian/data/langs/bx_posts/ru.xml

@@ -36,6 +36,10 @@
     <string name="_bx_posts_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
     <string name="_bx_posts_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
     <string name="_bx_posts_form_entry_input_picture_use_as_thumb"><![CDATA[Изображение обложки]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_posts_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_posts_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
 
 	<string name="_bx_posts_acl_action_create_entry"><![CDATA[Создать публикацию]]></string>
 	<string name="_bx_posts_acl_action_delete_entry"><![CDATA[Удалить публикацию]]></string>
@@ -97,7 +101,8 @@
 	<string name="_bx_posts_page_block_title_system_manage_administration"><![CDATA[Управление всеми Публикациями]]></string>
 	<string name="_bx_posts_page_block_title_manage"><![CDATA[Управление Публикациями]]></string>    
 	<string name="_bx_posts_page_block_title_popular_keywords"><![CDATA[Популярные Хэштеги]]></string>
-	<string name="_bx_posts_page_block_title_cats"><![CDATA[Категории Публикаций]]></string>
+    <string name="_bx_posts_page_block_title_cats"><![CDATA[Категории Публикаций]]></string>
+    <string name="_bx_posts_page_block_title_entry_info"><![CDATA[Инфо]]></string>
 
     <string name="_bx_posts_menu_set_title_view_entry"><![CDATA[Действия для публикации]]></string>
     <string name="_bx_posts_menu_title_view_entry"><![CDATA[Действия для публикации]]></string>
@@ -186,7 +191,6 @@
     <string name="_bx_posts_cat_Womens_Fashion"><![CDATA[Женская мода]]></string>
 
     <string name="_bx_posts_txt_all_entries_by"><![CDATA[<a href="{0}">Все публикации от {1} ({2})</a>]]></string>
-    <string name="_bx_posts_txt_category_link"><![CDATA[Категория <a href="{0}">{1}</a>]]></string>
     <string name="_bx_posts_txt_sample_single"><![CDATA[публикация]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[комментарии к публикации]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[голос за публикацию]]></string>