Explorar o código

Ticket #967 - Videos modules.

AntonLV %!s(int64=9) %!d(string=hai) anos
pai
achega
0a059dcb09

+ 3 - 0
modules/boonex/videos/classes/BxVideosConfig.php

@@ -37,6 +37,7 @@ class BxVideosConfig extends BxBaseModTextConfig
             'FIELD_TITLE' => 'title',
             'FIELD_TEXT' => 'text',
             'FIELD_TEXT_ID' => 'video-text',
+            'FIELD_CATEGORY' => 'cat',
             'FIELD_DURATION' => 'duration',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_PHOTO' => 'pictures',
@@ -91,6 +92,7 @@ class BxVideosConfig extends BxBaseModTextConfig
             'OBJECT_FEATURED' => 'bx_videos',
             'OBJECT_METATAGS' => 'bx_videos',
             'OBJECT_COMMENTS' => 'bx_videos',
+            'OBJECT_CATEGORY' => 'bx_videos_cats',
             'OBJECT_PRIVACY_VIEW' => 'bx_videos_allow_view_to',
             'OBJECT_FORM_ENTRY' => 'bx_videos',
             'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_videos_entry_view',
@@ -102,6 +104,7 @@ class BxVideosConfig extends BxBaseModTextConfig
             'OBJECT_MENU_SUBMENU' => 'bx_videos_submenu', // main module submenu
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_videos_view_submenu', // view entry submenu
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'videos-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_SNIPPET_META' => 'bx_videos_snippet_meta', // menu for snippet meta info
             'OBJECT_MENU_MANAGE_TOOLS' => 'bx_videos_menu_manage_tools', //manage menu in content administration tools
             'OBJECT_GRID_ADMINISTRATION' => 'bx_videos_administration',
         	'OBJECT_GRID_COMMON' => 'bx_videos_common',

+ 22 - 0
modules/boonex/videos/classes/BxVideosMenuSnippetMeta.php

@@ -0,0 +1,22 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosMenuSnippetMeta extends BxBaseModTextMenuSnippetMeta
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_videos';
+
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 1 - 1
modules/boonex/videos/install/sql/disable.sql

@@ -15,7 +15,7 @@ DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_videos' OR `object` IN('bx_v
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_videos';
 DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_videos';
-DELETE FROM `sys_menu_items` WHERE `module` = 'bx_videos' OR `set_name` IN('bx_videos_view', 'bx_videos_submenu', 'bx_videos_view_submenu', 'bx_videos_my');
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_videos' OR `set_name` IN('bx_videos_view', 'bx_videos_submenu', 'bx_videos_view_submenu', 'bx_videos_snippet_meta', 'bx_videos_my');
 
 
 -- PRIVACY 

+ 16 - 0
modules/boonex/videos/install/sql/enable.sql

@@ -202,6 +202,22 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_videos_view_submenu', 'bx_videos', 'view-video', '_bx_videos_menu_item_title_system_view_entry', '_bx_videos_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-video&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
 ('bx_videos_view_submenu', 'bx_videos', 'view-video-comments', '_bx_videos_menu_item_title_system_view_entry_comments', '_bx_videos_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-video-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
 
+-- MENU: custom menu for snippet meta info
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_videos_snippet_meta', 'bx_videos', 15, 0, 1, 'BxVideosMenuSnippetMeta', 'modules/boonex/videos/classes/BxVideosMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_snippet_meta', 'bx_videos', '_sys_menu_set_title_snippet_meta', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_videos_snippet_meta', 'bx_videos', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
+('bx_videos_snippet_meta', 'bx_videos', 'rating', '_sys_menu_item_title_system_sm_rating', '_sys_menu_item_title_sm_rating', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
+('bx_videos_snippet_meta', 'bx_videos', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 3),
+('bx_videos_snippet_meta', 'bx_videos', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_videos_snippet_meta', 'bx_videos', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_videos_snippet_meta', 'bx_videos', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 6),
+('bx_videos_snippet_meta', 'bx_videos', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 7);
+
 -- MENU: profile stats
 SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
 INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES

+ 1 - 7
modules/boonex/videos/template/unit.html

@@ -7,13 +7,7 @@
     </bx_if:thumb>
     <div class="bx-base-text-unit-text bx-def-padding bx-def-box-sizing">
         <h2 class="bx-base-text-unit-title"><a href="__content_url__">__title__</a></h2>
-        <div class="bx-base-text-unit-info bx-def-margin-sec-top">
-            <span class="bx-def-font-small bx-def-font-grayed">__entry_posting_date__</span>
-            <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
-            <span>__entry_rating__</span>
-            <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
-            <a class="bx-base-text-unit-author bx-def-font-small" href="__author_url__">__author__</a>
-        </div>
+        <div class="bx-base-text-unit-info bx-def-margin-sec-top">__meta__</div>
         <div class="bx-base-text-unit-summary bx-def-margin-sec-top bx-clearfix">
             __summary__
         </div> 

+ 1 - 5
modules/boonex/videos/template/unit_full.html

@@ -6,11 +6,7 @@
         </div>
     </bx_if:thumb>
     <h1 class="bx-base-text-unit-title bx-def-padding-sec-top"><a href="__content_url__">__title__</a></h1>
-    <div class="bx-base-text-unit-info">
-        <span class="bx-def-font-grayed">__entry_posting_date__</span>
-        <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
-        <a class="bx-base-text-unit-author" href="__author_url__">__author__</a>
-    </div>
+    <div class="bx-base-text-unit-info">__meta__</div>
     <div class="bx-base-text-unit-summary bx-def-margin-sec-top bx-clearfix">
         __text__
     </div> 

+ 1 - 7
modules/boonex/videos/template/unit_gallery.html

@@ -18,13 +18,7 @@
         </bx_if:no_thumb>
         <div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
             <h2><a href="__content_url__">__title__</a></h2>
-            <div class="bx-base-text-unit-info bx-def-font-small bx-def-font-light">
-                <a class="bx-base-text-unit-author" href="__author_url__">__author__</a>
-                <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
-                <span class="bx-def-font-grayed">__entry_views__</span>
-                <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
-                <span class="bx-def-font-grayed">__entry_posting_date__</span>
-            </div>
+            <div class="bx-base-text-unit-info bx-def-font-small">__meta__</div>
         </div>
     </div>
 </div>