Răsfoiți Sursa

Ticket #5298 - Resources module.

AntonLV 10 luni în urmă
părinte
comite
37c18c955f
36 a modificat fișierele cu 3081 adăugiri și 0 ștergeri
  1. 40 0
      modules/boonex/resources/classes/BxResourcesAlertsResponse.php
  2. 29 0
      modules/boonex/resources/classes/BxResourcesCmts.php
  3. 23 0
      modules/boonex/resources/classes/BxResourcesCmtsSearchResult.php
  4. 234 0
      modules/boonex/resources/classes/BxResourcesConfig.php
  5. 102 0
      modules/boonex/resources/classes/BxResourcesDb.php
  6. 132 0
      modules/boonex/resources/classes/BxResourcesFormEntry.php
  7. 22 0
      modules/boonex/resources/classes/BxResourcesFormListEntry.php
  8. 36 0
      modules/boonex/resources/classes/BxResourcesFormsEntryHelper.php
  9. 48 0
      modules/boonex/resources/classes/BxResourcesGridAdministration.php
  10. 43 0
      modules/boonex/resources/classes/BxResourcesGridCommon.php
  11. 24 0
      modules/boonex/resources/classes/BxResourcesMenuAttachments.php
  12. 25 0
      modules/boonex/resources/classes/BxResourcesMenuManageTools.php
  13. 23 0
      modules/boonex/resources/classes/BxResourcesMenuView.php
  14. 38 0
      modules/boonex/resources/classes/BxResourcesMenuViewActions.php
  15. 280 0
      modules/boonex/resources/classes/BxResourcesModule.php
  16. 31 0
      modules/boonex/resources/classes/BxResourcesPageAuthor.php
  17. 23 0
      modules/boonex/resources/classes/BxResourcesPageBrowse.php
  18. 31 0
      modules/boonex/resources/classes/BxResourcesPageEntry.php
  19. 87 0
      modules/boonex/resources/classes/BxResourcesSearchResult.php
  20. 193 0
      modules/boonex/resources/classes/BxResourcesTemplate.php
  21. 26 0
      modules/boonex/resources/classes/BxResourcesUploaderHTML5.php
  22. 136 0
      modules/boonex/resources/install/config.php
  23. 19 0
      modules/boonex/resources/install/installer.php
  24. 228 0
      modules/boonex/resources/install/langs/en.xml
  25. 48 0
      modules/boonex/resources/install/sql/disable.sql
  26. 305 0
      modules/boonex/resources/install/sql/enable.sql
  27. 346 0
      modules/boonex/resources/install/sql/install.sql
  28. 49 0
      modules/boonex/resources/install/sql/uninstall.sql
  29. 55 0
      modules/boonex/resources/js/main.js
  30. 42 0
      modules/boonex/resources/js/manage_tools.js
  31. 17 0
      modules/boonex/resources/request.php
  32. 37 0
      modules/boonex/resources/template/browse_entries.html
  33. 38 0
      modules/boonex/resources/template/css/main.css
  34. 25 0
      modules/boonex/resources/template/images/icons/std-icon.svg
  35. 18 0
      modules/boonex/resources/template/popup_form.html
  36. 228 0
      modules/boonex/russian/data/langs/bx_resources/ru.xml

+ 40 - 0
modules/boonex/resources/classes/BxResourcesAlertsResponse.php

@@ -0,0 +1,40 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesAlertsResponse extends BxBaseModTextAlertsResponse
+{
+    public function __construct()
+    {
+        $this->MODULE = 'bx_resources';
+
+        parent::__construct();
+    }
+
+    public function response($oAlert)
+    {
+        parent::response($oAlert);
+
+        if(($sMethod = '_process' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction)) && method_exists($this, $sMethod))
+            $this->$sMethod($oAlert);
+    }
+
+    protected function _processProfileSearchByTerm($oAlert)
+    {
+        $sName = $oAlert->aExtras['params']['name'] ?? '';
+
+        if($sName == $this->MODULE . '_initial_members' && ($oContext = BxDolProfile::getInstance((int)$oAlert->aExtras['params']['context_pid'])) !== false) {
+            $aIds = bx_srv($oContext->getModule(), 'fans', [$oContext->getContentId(), true]);
+
+            $oAlert->aExtras['where'] .= " AND `p`.`id` IN (" . $this->_oModule->_oDb->implode_escape($aIds) . ")";
+        }
+    }
+}
+
+/** @} */

+ 29 - 0
modules/boonex/resources/classes/BxResourcesCmts.php

@@ -0,0 +1,29 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesCmts extends BxTemplCmts
+{
+    protected $_sModule;
+    protected $_oModule;
+
+    public function __construct($sSystem, $iId, $iInit = 1)
+    {
+        parent::__construct($sSystem, $iId, $iInit);
+
+        $this->_sModule = 'bx_resources';
+        $this->_oModule = BxDolModule::getInstance($this->_sModule);
+
+        $this->_aT = array_merge($this->_aT, [
+            'block_comments_title' => '_bx_resources_page_block_title_entry_comments'
+        ]);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/resources/classes/BxResourcesCmtsSearchResult.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesCmtsSearchResult extends BxBaseModGeneralCmtsSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+    	$this->sModule = 'bx_resources';
+
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent['title'] = _t('_bx_resources_page_block_title_browse_cmts');
+    }
+}
+
+/** @} */

+ 234 - 0
modules/boonex/resources/classes/BxResourcesConfig.php

@@ -0,0 +1,234 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolInformer');
+
+class BxResourcesConfig extends BxBaseModTextConfig
+{
+    protected $_aProperties;
+
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2Methods = array (
+            'approve' => 'checkAllowedApprove',
+            'edit-resource' => 'checkAllowedEdit',
+            'edit-resource-state' => 'checkAllowedManage',
+            'delete-resource' => 'checkAllowedDelete',
+        );
+
+        $this->CNF = array_merge($this->CNF, array (
+
+            // module icon
+            'ICON' => 'warehouse col-green2',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'entries',
+            'TABLE_LISTS' => $aModule['db_prefix'] . 'lists',
+            'TABLE_POLLS' => '',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+
+            // database fields
+            'FIELD_LIST_ID' => 'id',
+            'FIELD_LIST_TITLE' => 'title',
+
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_PUBLISHED' => 'published',
+            'FIELD_LINK' => 'link',
+            'FIELD_TITLE' => 'title',
+            'FIELD_TEXT' => 'text',
+            'FIELD_TEXT_ID' => 'post-text',
+            'FIELD_CATEGORY' => 'cat',
+            'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELD_CF' => 'cf',
+            'FIELD_COVER' => 'covers',
+            'FIELD_PHOTO' => '',
+            'FIELD_VIDEO' => '',
+            'FIELD_FILE' => '',
+            'FIELD_THUMB' => 'thumb',
+            'FIELD_ATTACHMENTS' => '',
+            'FIELD_VIEWS' => 'views',
+            'FIELD_COMMENTS' => 'comments',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_LABELS' => 'labels',
+            'FIELD_LIST' => 'list',
+            'FIELD_ANONYMOUS' => 'anonymous',
+            'FIELD_ALLOW_COMMENTS' => 'allow_comments',
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+            'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
+
+             // some params
+            'PARAM_MULTICAT_ENABLED' => false,
+            'PARAM_MULTICAT_AUTO_ACTIVATION_FOR_CATEGORIES' => 'bx_resources_auto_activation_for_categories',
+            'PARAM_POLL_ENABLED' => false,
+
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-resource',
+            'URI_ENTRIES_BY_CONTEXT' => 'resources-context',
+            'URI_ADD_ENTRY' => 'create-resource',
+            'URI_EDIT_ENTRY' => 'edit-resource',
+            'URI_MANAGE_COMMON' => 'resources-manage',
+
+            'URL_HOME' => '',
+            'URL_POPULAR' => '',
+            'URL_TOP' => '',
+            'URL_UPDATED' => '',
+            'URL_MANAGE_COMMON' => 'page.php?i=resources-manage',
+            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=resources-administration',
+
+            // some params
+            'PARAM_AUTO_APPROVE' => 'bx_resources_enable_auto_approve',
+            'PARAM_CHARS_SUMMARY' => 'bx_resources_summary_chars',
+            'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_resources_plain_summary_chars',
+            'PARAM_NUM_RSS' => 'bx_resources_rss_num',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_resources_searchable_fields',
+            'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_resources_per_page_browse_showcase',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_resources_covers',
+            'OBJECT_STORAGE_FILES' => '',
+            'OBJECT_STORAGE_PHOTOS' => '',
+            'OBJECT_STORAGE_VIDEOS' => '',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_resources_preview',
+            'OBJECT_IMAGES_TRANSCODER_MINIATURE' => 'bx_resources_miniature',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_resources_gallery',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_resources_cover',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW_FILES' => '',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY_FILES' => '',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW_PHOTOS' => '',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY_PHOTOS' => '',
+            'OBJECT_VIDEOS_TRANSCODERS' => [],
+            'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
+            'OBJECT_REPORTS' => 'bx_resources',
+            'OBJECT_VIEWS' => 'bx_resources',
+            'OBJECT_VOTES' => 'bx_resources',
+            'OBJECT_REACTIONS' => 'bx_resources_reactions',
+            'OBJECT_SCORES' => 'bx_resources',
+            'OBJECT_FAVORITES' => '',
+            'OBJECT_FEATURED' => '',
+            'OBJECT_COMMENTS' => 'bx_resources',
+            'OBJECT_NOTES' => '',
+            'OBJECT_CATEGORY' => 'bx_resources_cats',
+            'OBJECT_PRIVACY_VIEW' => 'bx_resources_allow_view_to',
+            'OBJECT_FORM_ENTRY' => 'bx_resources',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_resources_entry_view',
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_resources_entry_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_resources_entry_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_resources_entry_delete',
+            'OBJECT_FORM_LIST_ENTRY' => 'bx_resources_list',
+            'OBJECT_FORM_LIST_ENTRY_DISPLAY_ADD' => 'bx_resources_list_entry_add',
+            'OBJECT_FORM_LIST_ENTRY_DISPLAY_EDIT' => 'bx_resources_list_entry_edit',
+            'OBJECT_MENU_ENTRY_ATTACHMENTS' => '', // attachments menu in create/edit forms
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_resources_view', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_resources_view_actions', // all actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_resources_my', // actions menu on my entries page
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_resources_view_submenu', // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'resources-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_SNIPPET_META' => '', // menu for snippet meta info
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_resources_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_resources_administration',
+            'OBJECT_GRID_COMMON' => 'bx_resources_common',
+            'OBJECT_UPLOADERS' => array('bx_resources_html5'),
+            'OBJECT_CONTENT_INFO' => 'bx_resources',
+            'OBJECT_CMTS_CONTENT_INFO' => 'bx_resources_cmts',
+
+            'BADGES_AVALIABLE' => false,
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+                'bx_resources_view' => $aMenuItems2Methods,
+            ),
+
+            // informer messages
+            'INFORMERS' => array (
+                'approving' => array (
+                    'name' => 'bx-resources-approving',
+                    'map' => array (
+                        'pending' => array('msg' => '_bx_resources_txt_msg_status_pending', 'type' => BX_INFORMER_ALERT),
+                        'hidden' => array('msg' => '_bx_resources_txt_msg_status_hidden', 'type' => BX_INFORMER_ERROR),
+                    ),
+                ),
+                'processing' => array (
+                    'name' => 'bx-resources-processing',
+                    'map' => array (
+                        'awaiting' => array('msg' => '_bx_resources_txt_processing_awaiting', 'type' => BX_INFORMER_ALERT),
+                        'failed' => array('msg' => '_bx_resources_txt_processing_failed', 'type' => BX_INFORMER_ERROR)
+                    ),
+                ),
+                'scheduled' => array (
+                    'name' => 'bx-resources-scheduled',
+                    'map' => array (
+                        'awaiting' => array('msg' => '_bx_resources_txt_scheduled_awaiting', 'type' => BX_INFORMER_ALERT),
+                    ),
+                ),
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_resources_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_resources_txt_sample_single_with_article',
+            	'txt_sample_comment_single' => '_bx_resources_txt_sample_comment_single',
+            	'txt_sample_vote_single' => '_bx_resources_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_resources_txt_sample_reaction_single',
+                'txt_sample_score_up_single' => '_bx_resources_txt_sample_score_up_single',
+                'txt_sample_score_down_single' => '_bx_resources_txt_sample_score_down_single',
+                'form_field_author' => '_bx_resources_form_entry_input_author',
+                'form_field_covers_uploader_simple' => '_bx_resources_form_entry_input_covers_uploader_simple_title',
+                'form_field_covers_uploader_html5' => '_bx_resources_form_entry_input_covers_uploader_html5_title',
+                'grid_action_err_delete' => '_bx_resources_grid_action_err_delete',
+                'grid_txt_account_manager' => '_bx_resources_grid_txt_account_manager',
+                'filter_item_active' => '_bx_resources_grid_filter_item_title_adm_active',
+            	'filter_item_hidden' => '_bx_resources_grid_filter_item_title_adm_hidden',
+                'filter_item_pending' => '_bx_resources_grid_filter_item_title_adm_pending',
+            	'filter_item_select_one_filter1' => '_bx_resources_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_resources_grid_filter_item_title_adm_select_one_filter2',
+                'filter_item_select_one_filter3' => '_bx_resources_grid_filter_item_title_adm_select_one_filter3',
+            	'menu_item_manage_my' => '_bx_resources_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_resources_menu_item_title_manage_all',
+                'txt_all_entries_by' => '_bx_resources_txt_all_entries_by',
+                'txt_all_entries_in' => '_bx_resources_txt_all_entries_in',
+                'txt_all_entries_by_author' => '_bx_resources_page_title_browse_by_author',
+                'txt_all_entries_by_context' => '_bx_resources_page_title_browse_by_context',
+                'txt_err_cannot_perform_action' => '_bx_resources_txt_err_cannot_perform_action',
+            ),
+        ));
+
+        $this->_aJsClasses = array_merge($this->_aJsClasses, [
+            'main' => 'BxResourcesMain',
+            'manage_tools' => 'BxResourcesManageTools',
+        ]);
+
+        $this->_aJsObjects = array_merge($this->_aJsObjects, [
+            'main' => 'oBxResourcesMain',
+            'manage_tools' => 'oBxResourcesManageTools',
+        ]);
+
+        $this->_aGridObjects = [
+            'common' => $this->CNF['OBJECT_GRID_COMMON'],
+            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
+        ];
+
+        $sPrefix = str_replace('_', '-', $this->_sName);
+        $this->_aHtmlIds = array_merge($this->_aHtmlIds, [
+            'lists' => $sPrefix . '-lists',
+            'list' =>  $sPrefix . '-list-',
+        ]);
+
+        $this->_bAttachmentsInTimeline = false;
+    }
+}
+
+/** @} */

+ 102 - 0
modules/boonex/resources/classes/BxResourcesDb.php

@@ -0,0 +1,102 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module database queries
+ */
+class BxResourcesDb extends BxBaseModTextDb
+{
+    public function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+
+    public function addList ($iContextId, $sTitle, $bDefault = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $this->query("INSERT INTO `" . $CNF['TABLE_LISTS'] . "` (`context_id`, `title`, `default`) VALUES (:context_id, :title, :default)", [
+            'context_id' => $iContextId,
+            'title' => $sTitle,
+            'default' => $bDefault
+        ]) ? $this->lastId() : false;
+    }
+
+    public function addListDefault ($iContextId)
+    {
+        return $this->addList ($iContextId, '', 1);
+    }
+
+    public function getLists ($iContextId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $this->getAll("SELECT * FROM `" . $CNF['TABLE_LISTS'] . "` WHERE `context_id` = :context_id", [
+            'context_id' => $iContextId
+        ]);
+    }
+
+    public function getListDefault ($iContextId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $this->getRow("SELECT * FROM `" . $CNF['TABLE_LISTS'] . "` WHERE `context_id` = :context_id AND `default`='1'", [
+            'context_id' => $iContextId
+        ]);
+    }
+
+    public function getList ($iId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $this->getRow("SELECT * FROM `" . $CNF['TABLE_LISTS'] . "` WHERE `id` = :id", [
+            'id' => $iId
+        ]);
+    }
+
+    public function deleteList ($iId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $this->query("DELETE FROM `" . $CNF['TABLE_LISTS'] . "` WHERE `id` = :id", [
+            'id' => $iId
+        ]);
+
+        $this->query("DELETE FROM `" . $CNF['TABLE_ENTRIES'] . "` WHERE `" . $CNF['FIELD_LIST'] . "` = :list", [
+            'list' => $iId
+        ]);
+    }
+
+    public function getResources ($iContextId = 0, $iListId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aBindings = [];
+        $sSelectClause = "`te`.*";
+        $sJoinClause = $sWhereClause = "";
+
+        if(($sField = $CNF['FIELD_ALLOW_VIEW_TO']) && $iContextId) {
+            $aBindings[$sField] = $iContextId;
+            $sWhereClause .= " AND ABS(`te`.`" . $sField . "`) = :" . $sField;
+        }
+
+        if(($sField = $CNF['FIELD_LIST']) && $iListId) {
+            $aBindings[$sField] = $iListId;
+            $sWhereClause .= " AND `te`.`" . $sField . "` = :" . $sField;
+        }
+
+        if(($oCf = BxDolContentFilter::getInstance()) && $oCf->isEnabled())
+            $sWhereClause .= $oCf->getSQLParts('te', $CNF['FIELD_CF']);
+
+        return $this->getAll("SELECT " . $sSelectClause . " FROM `" . $CNF['TABLE_ENTRIES'] . "` AS `te`" . $sJoinClause . " WHERE 1" . $sWhereClause, $aBindings);
+    }
+}
+
+/** @} */

+ 132 - 0
modules/boonex/resources/classes/BxResourcesFormEntry.php

@@ -0,0 +1,132 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit entry form
+ */
+class BxResourcesFormEntry extends BxBaseModTextFormEntry
+{
+    protected $_iContextId;
+
+    protected $_sGhostTemplateCover = 'form_ghost_template_cover.html';
+
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_resources';
+
+        parent::__construct($aInfo, $oTemplate);
+    }
+
+    public function setContextId($iContextId)
+    {
+        $this->_iContextId = $iContextId;
+    }
+
+    public function getCode($bDynamicMode = false)
+    {
+        $this->_replaceMarkersInControls('controls_edit');
+
+    	return parent::getCode($bDynamicMode);
+    }
+
+    public function initChecker ($aValues = array (), $aSpecificValues = array())
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $bValues = $aValues && !empty($aValues['id']);
+
+        $aContentInfo = $bValues ? $this->_oModule->_oDb->getContentInfoById($aValues['id']) : false;
+        if(!empty($aContentInfo) && is_array($aContentInfo))
+            $this->setContextId(abs($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]));
+
+        if($this->aParams['display'] == $CNF['OBJECT_FORM_ENTRY_DISPLAY_EDIT'] && isset($CNF['FIELD_PUBLISHED']) && isset($this->aInputs[$CNF['FIELD_PUBLISHED']]))
+            if($bValues && in_array($aValues[$CNF['FIELD_STATUS']], array('active', 'hidden')))
+                unset($this->aInputs[$CNF['FIELD_PUBLISHED']]);
+
+        if(($sKey = 'FIELD_COVER') && isset($CNF[$sKey], $this->aInputs[$CNF[$sKey]])) {
+            if($bValues)
+                $this->aInputs[$CNF['FIELD_COVER']]['content_id'] = $aValues['id'];
+
+            $this->aInputs[$CNF['FIELD_COVER']]['ghost_template'] = $this->_oModule->_oTemplate->parseHtmlByName($this->_sGhostTemplateCover, $this->_getCoverGhostTmplVars($aContentInfo));
+        }
+
+        parent::initChecker ($aValues, $aSpecificValues);
+    }
+
+    public function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(isset($CNF['FIELD_ADDED']) && empty($aValsToAdd[$CNF['FIELD_ADDED']])) {
+            $iAdded = 0;
+            if(isset($this->aInputs[$CNF['FIELD_ADDED']]))
+                $iAdded = $this->getCleanValue($CNF['FIELD_ADDED']);
+            
+            if(empty($iAdded))
+                 $iAdded = time();
+
+            $aValsToAdd[$CNF['FIELD_ADDED']] = $iAdded;
+        }
+
+        if(empty($aValsToAdd[$CNF['FIELD_PUBLISHED']])) {
+            $iPublished = 0;
+            if(isset($this->aInputs[$CNF['FIELD_PUBLISHED']]))
+                $iPublished = $this->getCleanValue($CNF['FIELD_PUBLISHED']);
+                
+             if(empty($iPublished))
+                 $iPublished = time();
+
+             $aValsToAdd[$CNF['FIELD_PUBLISHED']] = $iPublished;
+        }
+
+        $aValsToAdd[$CNF['FIELD_STATUS']] = $aValsToAdd[$CNF['FIELD_PUBLISHED']] > $aValsToAdd[$CNF['FIELD_ADDED']] ? 'awaiting' : 'active';
+
+        $iContentId = parent::insert ($aValsToAdd, $isIgnore);
+        if(!empty($iContentId))
+            $this->processFiles($CNF['FIELD_COVER'], $iContentId, true);
+
+        return $iContentId;
+    }
+
+    public function update ($iContentId, $aValsToAdd = array(), &$aTrackTextFieldsChanges = null)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(empty($aValsToAdd[$CNF['FIELD_PUBLISHED']]) && isset($this->aInputs[$CNF['FIELD_PUBLISHED']])) {
+            $iPublished = $this->getCleanValue($CNF['FIELD_PUBLISHED']);
+            if(empty($iPublished))
+                $iPublished = time();
+
+            $aValsToAdd[$CNF['FIELD_PUBLISHED']] = $iPublished;
+        }
+
+        $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
+        $aValsToAdd[$CNF['FIELD_ALLOW_VIEW_TO']] = $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
+
+        $iResult = parent::update ($iContentId, $aValsToAdd, $aTrackTextFieldsChanges);
+        $this->processFiles($CNF['FIELD_COVER'], $iContentId, false);   
+        return $iResult;
+    }
+
+    protected function _getCoverGhostTmplVars($aContentInfo = [])
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	return [
+            'name' => $this->aInputs[$CNF['FIELD_COVER']]['name'],
+            'content_id' => $this->aInputs[$CNF['FIELD_COVER']]['content_id'],
+            'editor_id' => $CNF['FIELD_TEXT_ID'] ?? '',
+            'thumb_id' => isset($CNF['FIELD_THUMB']) && isset($aContentInfo[$CNF['FIELD_THUMB']]) ? $aContentInfo[$CNF['FIELD_THUMB']] : 0,
+            'name_thumb' => $CNF['FIELD_THUMB'] ?? ''
+        ];
+    }
+}
+
+/** @} */

+ 22 - 0
modules/boonex/resources/classes/BxResourcesFormListEntry.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    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit list entry form
+ */
+class BxResourcesFormListEntry extends BxTemplFormView
+{
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        parent::__construct($aInfo, $oTemplate);
+    }
+}
+
+/** @} */

+ 36 - 0
modules/boonex/resources/classes/BxResourcesFormsEntryHelper.php

@@ -0,0 +1,36 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry forms helper functions
+ */
+class BxResourcesFormsEntryHelper extends BxBaseModTextFormsEntryHelper
+{
+    public function __construct($oModule)
+    {
+        parent::__construct($oModule);
+    }
+
+    protected function redirectAfterDelete($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $sUrl = BX_DOL_URL_ROOT;
+        if((int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] < 0)
+            $sUrl = 'page.php?i=' . $CNF['URI_ENTRIES_BY_CONTEXT'] . '&profile_id=' . abs($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);
+
+        $this->_redirectAndExit($sUrl, true, array(
+            'account_id' => getLoggedId(),
+            'profile_id' => bx_get_logged_profile_id(),
+        ));
+    }
+}
+
+/** @} */

+ 48 - 0
modules/boonex/resources/classes/BxResourcesGridAdministration.php

@@ -0,0 +1,48 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesGridAdministration extends BxBaseModTextGridAdministration
+{
+    protected $_sFilter3Name;
+    protected $_sFilter3Value;
+    protected $_aFilter3Values;
+
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_resources';
+        parent::__construct ($aOptions, $oTemplate);
+
+        $this->_initFilter(3, $this->_oModule->getContexts());
+    }
+
+    protected function _getCellContextModule($mixedValue, $sKey, $aField, $aRow)
+    {
+        return parent::_getCellDefault($this->_oModule->getModuleTitle($mixedValue), $sKey, $aField, $aRow);
+    }
+
+    protected function _getFilterControls()
+    {
+        $sContent = $this->_getFilterSelectOne($this->_sFilter3Name, $this->_sFilter3Value, $this->_aFilter3Values);
+        return $sContent . parent::_getFilterControls();
+    }
+    
+    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+    {
+        $this->_parseFilterValue($sFilter);
+
+        if(!empty($this->_sFilter3Value))
+            $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`type`=?", $this->_sFilter3Value);
+
+        return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+}
+
+/** @} */

+ 43 - 0
modules/boonex/resources/classes/BxResourcesGridCommon.php

@@ -0,0 +1,43 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesGridCommon extends BxBaseModTextGridCommon
+{
+    protected $_sFilter3Name;
+    protected $_sFilter3Value;
+    protected $_aFilter3Values;
+
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_resources';
+        parent::__construct ($aOptions, $oTemplate);
+
+        $this->_initFilter(3, $this->_oModule->getContexts());
+    }
+
+    protected function _getFilterControls()
+    {
+        $sContent = $this->_getFilterSelectOne($this->_sFilter3Name, $this->_sFilter3Value, $this->_aFilter3Values);
+        return $sContent . parent::_getFilterControls();
+    }
+
+    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+    {
+        $this->_parseFilterValue($sFilter);
+
+        if(!empty($this->_sFilter3Value))
+            $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`type`=?", $this->_sFilter3Value);
+
+        return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/resources/classes/BxResourcesMenuAttachments.php

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

+ 25 - 0
modules/boonex/resources/classes/BxResourcesMenuManageTools.php

@@ -0,0 +1,25 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * 'Resources manage tools' menu.
+ */
+class BxResourcesMenuManageTools extends BxBaseModTextMenuManageTools
+{
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_resources';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/resources/classes/BxResourcesMenuView.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry menu
+ */
+class BxResourcesMenuView extends BxBaseModTextMenuView
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_resources';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 38 - 0
modules/boonex/resources/classes/BxResourcesMenuViewActions.php

@@ -0,0 +1,38 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry social actions menu
+ */
+class BxResourcesMenuViewActions extends BxBaseModTextMenuViewActions
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_resources';
+
+        parent::__construct($aObject, $oTemplate);
+
+        $this->addMarkers([
+            'js_object' => $this->_oModule->_oConfig->getJsObject('main')
+        ]);
+    }
+
+    protected function _getMenuItemEditResource($aItem)
+    {
+        return $this->_getMenuItemByNameActions($aItem);
+    }
+
+    protected function _getMenuItemDeleteResource($aItem)
+    {
+        return $this->_getMenuItemByNameActions($aItem);
+    }
+}
+
+/** @} */

+ 280 - 0
modules/boonex/resources/classes/BxResourcesModule.php

@@ -0,0 +1,280 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesModule extends BxBaseModTextModule 
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $CNF = &$this->_oConfig->CNF;
+        $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, [
+            $CNF['FIELD_PUBLISHED'],
+            $CNF['FIELD_ALLOW_COMMENTS']
+        ]);
+    }
+	
+    /**
+    * Action methods
+    */
+    public function actionProcessListForm($iContextId, $iId)
+    {
+        if(!$this->isAllowAdd($iContextId))
+            return '';
+
+        $CNF = &$this->_oConfig->CNF;
+
+        $bAdd = $iId == 0;
+
+        $oForm = null;
+        $sPopupTitle = "";
+        $aContentInfo = [];
+        if ($bAdd) {
+            $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_LIST_ENTRY'], $CNF['OBJECT_FORM_LIST_ENTRY_DISPLAY_ADD']);
+            $sPopupTitle = _t('_bx_resources_form_list_entry_display_add');
+        }
+        else {
+            $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_LIST_ENTRY'], $CNF['OBJECT_FORM_LIST_ENTRY_DISPLAY_EDIT']);
+            $sPopupTitle = _t('_bx_resources_form_list_entry_display_edit');
+            $aContentInfo = $this->_oDb->getList($iId);
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'process_list_form/' . $iContextId . '/' . $iId . '/';
+        if(!$oForm)
+            return '';
+		
+        $oForm->initChecker($aContentInfo, []);
+        if($oForm->isSubmittedAndValid()) {
+            if ($bAdd)
+                $oForm->insert(['context_id' => $iContextId]);
+            else
+                $oForm->update($iId);
+
+            return echoJson([
+                'eval' => $this->_oConfig->getJsObject('main') . '.reloadData(oData, ' . $iContextId . ')',
+            ]);
+        }
+        else {
+            $sContent = $this->_oTemplate->parseHtmlByName('popup_form.html', [
+                'form_id' => $oForm->getId(),
+                'form' => $oForm->getCode(true)
+            ]);
+
+            if($oForm->isSubmitted() && !$oForm->isValid()) 
+                return echoJson([
+                    'form' => $sContent, 
+                    'form_id' => $oForm->getId()
+                ]);
+
+            echo $sContent;
+        }
+    }
+
+    public function actionDeleteList($iContextId, $iListId)
+    {
+        if(!$this->isAllowManageByContext($iContextId))
+            return echoJson([]);
+
+        $this->_oDb->deleteList($iListId);
+
+        echoJson([
+            'context_id' => $iContextId,
+        ]);
+    }
+	
+    public function actionProcessEntryForm($iContextId, $iListId = 0)
+    {
+        if(!$this->isAllowAdd($iContextId))
+            return echoJson([]);
+
+        $CNF = &$this->_oConfig->CNF;
+
+        $sForm = $CNF['OBJECT_FORM_ENTRY_DISPLAY_ADD'];
+        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ENTRY'], $sForm);
+        if(!$oForm)
+            return echoJson([]);
+
+        $oForm->setId($sForm);
+        $oForm->setAction(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'process_entry_form/' . $iContextId . '/' . $iListId . '/');
+        $oForm->setContextId($iContextId);
+
+        $oForm->initChecker();
+        if($oForm->isSubmittedAndValid()) {
+            if(!$iListId) {
+                $aList = $this->_oDb->getListDefault($iContextId);
+                if(empty($aList) || !is_array($aList))
+                    $iListId = $this->_oDb->addListDefault($iContextId);
+                else
+                    $iListId = (int)$aList[$CNF['FIELD_LIST_ID']];
+            }
+
+            $iContentId = $oForm->insert([$CNF['FIELD_ALLOW_VIEW_TO'] => -$iContextId, $CNF['FIELD_LIST'] => $iListId]);
+            if($iContentId)
+                $this->onPublished($iContentId);
+
+            return echoJson([
+                'eval' => $this->_oConfig->getJsObject('main') . '.reloadData(oData, ' . $iContextId . ')',
+            ]);
+        }
+        else {
+            $sContent = $this->_oTemplate->parseHtmlByName('popup_form.html', [
+                'form_id' => $oForm->getId(),
+                'form' => $oForm->getCode(true)
+            ]);
+
+            if($oForm->isSubmitted()) 
+                return echoJson(['form' => $sContent, 'form_id' => $oForm->getId()]);
+
+            echo $sContent;
+        }
+    }
+
+    public function serviceManageTools($sType = 'common')
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $mixedResults = '';
+        if(!($mixedResults = parent::serviceManageTools($sType)))
+            return $mixedResults;
+
+        return array_merge(parent::serviceManageTools($sType), [
+            'menu' => BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_MANAGE_TOOLS_SUBMENU'])
+        ]);
+    }
+
+    public function serviceCheckAllowedManageInContext($iContextPid)
+    {
+        if(!$this->isAllowManageByContext($iContextPid))
+            return false;
+
+        return true;
+    }
+
+    public function serviceCheckAllowedManage($iContentId)
+    {
+        if(!$this->isAllowManage($iContentId))
+            return false;
+
+        return true;
+    }
+    
+    public function serviceIsAllowBadges($iContentId)
+    {
+        if (!$this->isAllowManage($iContentId))
+            return false;
+        
+        if (!$this->serviceIsBadgesAvaliable())
+            return false;
+        
+        return true; 
+    }
+
+    public function serviceCheckAllowedCommentsPost($iContentId, $sObjectComments) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if($aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
+            return false;
+
+        return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments);
+    }
+
+    public function serviceCheckAllowedCommentsView($iContentId, $sObjectComments) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        //negative id used in comments for reports
+        if($iContentId < 0)
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if($aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
+            return false;
+
+        return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);
+    }
+
+    public function serviceBrowseResources($iContextId = 0, $aParams = [])
+    {
+        if(!$iContextId)
+            $iContextId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+        if(!$iContextId)
+            return '';
+
+        if(!$this->isAllowView($iContextId))
+            return '';  
+
+        if(!($oProfileContext = BxDolProfile::getInstance($iContextId)) || $oProfileContext->checkAllowedProfileView($iContextId) !== CHECK_ACTION_RESULT_ALLOWED)
+            return '';
+
+        return $this->_oTemplate->getEntriesList($iContextId);
+    }
+
+    /**
+     * Common methods
+     */
+    public function checkAllowedSetThumb ($iContentId = 0)
+    {
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function isAllowView($iContextId)
+    {
+        if(!($oContext = BxDolProfile::getInstance($iContextId)) || $oContext->checkAllowedProfileView($iContextId) !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+        return true;
+    }
+
+    public function isAllowAdd($iContextId)
+    {
+        if(!($oContext = BxDolProfile::getInstance($iContextId)) || $oContext->checkAllowedPostInProfile($iContextId) !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+        return true;
+    }
+
+    public function isAllowManageByContext($iContextId)
+    {
+        if(isAdmin())
+            return true;
+      
+        $oProfileContext = BxDolProfile::getInstance($iContextId);
+        if(BxDolService::call($oProfileContext->getModule(), 'is_admin', array($iContextId)))
+            return true;
+        
+        return false;
+    }
+
+    public function isAllowManage($mixedContent)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aContentInfo = !is_array($mixedContent) ? $this->_oDb->getContentInfoById((int)$mixedContent) : $mixedContent;
+        if($this->checkAllowedEdit($aContentInfo) === CHECK_ACTION_RESULT_ALLOWED)
+            return true;
+
+        if($this->isAllowManageByContext(abs($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']])))
+            return true;
+
+        return false;
+    }
+
+    /**
+     * @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden. So make sure to make strict(===) checking.
+     */
+    public function checkAllowedManage ($aDataEntry, $isPerformAction = false)
+    {
+        return $this->isAllowManage($aDataEntry) ? CHECK_ACTION_RESULT_ALLOWED : _t('_sys_txt_access_denied');
+    }
+}
+
+/** @} */

+ 31 - 0
modules/boonex/resources/classes/BxResourcesPageAuthor.php

@@ -0,0 +1,31 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Profile's entries page.
+ */
+class BxResourcesPageAuthor extends BxBaseModTextPageAuthor
+{
+    protected $_sModule;
+    protected $_oModule;
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+
+        $this->_sModule = 'bx_resources';
+    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
+
+        if(($oMenuHolder = BxDolMenu::getObjectInstance('sys_site_submenu')) && ($oMenu = BxDolMenu::getObjectInstance($oMenuHolder->getObjectSubmenu())))
+            $oMenu->setSelected($this->_sModule, 'resources-context');
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/resources/classes/BxResourcesPageBrowse.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Browse entries pages.
+ */
+class BxResourcesPageBrowse extends BxBaseModTextPageBrowse
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_resources';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 31 - 0
modules/boonex/resources/classes/BxResourcesPageEntry.php

@@ -0,0 +1,31 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry create/edit pages
+ */
+class BxResourcesPageEntry extends BxBaseModTextPageEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_resources';
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _setSubmenu($aParams)
+    {
+    	parent::_setSubmenu(array_merge($aParams, [
+            'title' => '',
+            'icon' => ''
+    	]));
+    }
+}
+
+/** @} */

+ 87 - 0
modules/boonex/resources/classes/BxResourcesSearchResult.php

@@ -0,0 +1,87 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesSearchResult extends BxBaseModTextSearchResult
+{
+    function __construct($sMode = '', $aParams = [])
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_resources',
+            'module_name' => 'bx_resources',
+            'object_metatags' => 'bx_resources',
+            'title' => _t('_bx_resources_page_title_browse'),
+            'table' => 'bx_resources_entries',
+            'ownFields' => array('id', 'link', 'title', 'text', 'thumb', 'author', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+                'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+                'statusAdmin' => array('value' => 'active', 'field' => 'status_admin', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_resources_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'title',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'text',
+                    'Image' => 'thumb'
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_resources_filter';
+        $this->oModule = $this->getMain();
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        $sSearchFields = getParam($CNF['PARAM_SEARCHABLE_FIELDS']);
+        $this->aCurrent['searchFields'] = !empty($sSearchFields) ? explode(',', $sSearchFields) : '';
+
+        $oProfileAuthor = null;
+
+        switch ($sMode) {
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor))
+                    $this->isError = true;
+                break;
+
+            case 'context':
+                if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileAuthor))
+                    $this->isError = true;
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_resources');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+}
+
+/** @} */

+ 193 - 0
modules/boonex/resources/classes/BxResourcesTemplate.php

@@ -0,0 +1,193 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxResourcesTemplate extends BxBaseModTextTemplate
+{
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_resources';
+
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function getTitle($aData, $mixedProcessOutput = BX_DATA_TEXT)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aData[$CNF['FIELD_TITLE']] = $aData[$CNF['FIELD_TITLE']] ?: _t('_bx_resources_txt_title_empty');
+
+        return parent::getTitle($aData, $mixedProcessOutput);
+    }
+
+    public function getUnitLink ($aData, $aParams = [])
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $aData[$CNF['FIELD_LINK']] ?? parent::getUnitLink($aData, $aParams);
+    }
+
+    public function getUnitTitle ($aData, $aParams = [])
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aData[$CNF['FIELD_TITLE']] = $aData[$CNF['FIELD_TITLE']] ?: $aData[$CNF['FIELD_LINK']];
+
+        return parent::getUnitTitle($aData, $aParams);
+    }
+
+    protected function getUnit ($aData, $aParams = [])
+    {
+        $aTmplVars = parent::getUnit ($aData, $aParams);
+        if(empty($aTmplVars) || !is_array($aTmplVars))
+            return $aTmplVars;
+
+        if($aTmplVars['bx_if:no_thumb']['condition'])
+            $aTmplVars['bx_if:no_thumb']['condition'] = false;
+
+        return $aTmplVars;
+    }
+
+    /**
+     * Use Gallery image for both because currently there is no Unit types with small thumbnails.
+     */
+    protected function getUnitThumbAndGallery ($aData)
+    {
+        list($sPhotoThumb, $sPhotoGallery) = parent::getUnitThumbAndGallery($aData);
+
+        return array($sPhotoGallery, $sPhotoGallery);
+    }
+
+    public function entryText ($aData, $sTemplateName = 'entry-text.html')
+    {
+        $aVars = $this->getTmplVarsText($aData);
+
+        return $this->_bIsApi ? $aVars : $this->parseHtmlByName($sTemplateName, $aVars);
+    }
+
+    public function getEntriesList($iContextId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $sJsObject = $this->_oConfig->getJsObject('main');
+        $oPermalinks = BxDolPermalinks::getInstance();
+
+        $oModule = $this->getModule();
+        $bAllowAdd = $oModule->isAllowAdd($iContextId);
+        $bAllowManage = $oModule->isAllowManageByContext($iContextId);
+
+        $aLists = $this->_oDb->getLists($iContextId);
+
+        $aTmplVarsLists = [];
+        foreach($aLists as $aList) {
+            $sListTitle = $aList[$CNF['FIELD_LIST_TITLE']] ?: _t('_bx_resources_txt_list_default');
+
+            $aResources = $this->_oDb->getResources($iContextId, $aList[$CNF['FIELD_LIST_ID']], true);
+
+            $aTmplVarsEntries = [];
+            foreach($aResources as $aResource) {
+                $aTmplVarsEntries[] = [
+                    'js_object' => $sJsObject,
+                    'id' => $aResource[$CNF['FIELD_ID']],
+                    'title' => $this->getUnitLink($aResource),
+                    'created' => bx_time_js($aResource[$CNF['FIELD_ADDED']]),
+                    'badges' => $oModule->serviceGetBadges($aResource[$CNF['FIELD_ID']], true),
+                    'url' => bx_absolute_url($oPermalinks->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aResource[$CNF['FIELD_ID']])),
+                ];
+            }
+
+            $aTmplVarsLists[] = [
+                'js_object' => $sJsObject,
+                'html_id_list' => $this->_oConfig->getHtmlIds('list') . $aList['id'],
+                'bx_if:allow_edit_list' => [
+                    'condition' => $bAllowAdd,
+                    'content' => [
+                        'js_object' => $sJsObject,
+                        'context_id' => $iContextId,
+                        'list_id' => $aList[$CNF['FIELD_LIST_ID']],
+                        'title' => $sListTitle
+                    ]
+                ],
+                'bx_if:deny_edit_list' => [
+                    'condition' => !$bAllowAdd,
+                    'content' => [
+                        'title' => $sListTitle,
+                    ]
+                ],
+                'bx_if:allow_delete_list' => [
+                    'condition' => $bAllowManage,
+                    'content' => [
+                        'context_id' => $iContextId,
+                        'list_id' => $aList[$CNF['FIELD_LIST_ID']],
+                        'js_object' => $sJsObject,
+                    ]
+                ],
+                'bx_if:allow_add' => [
+                    'condition' => $bAllowAdd,
+                    'content' => [
+                        'context_id' => $iContextId,
+                        'list_id' => $aList[$CNF['FIELD_LIST_ID']],
+                        'js_object' => $sJsObject,
+                    ]
+                ],
+                'bx_repeat:entries' =>  $aTmplVarsEntries,
+            ];
+        }
+
+        $this->addCssJs();
+        $this->addJs([
+            'jquery-ui/jquery-ui.min.js',
+            'main.js',
+            'modules/base/general/js/|forms.js'
+        ]);
+
+        return $this->getJsCode('main', ['t_confirm_block_deletion' => _t('_bx_resources_txt_msg_confirm_list_deletion')]) . $this->parseHtmlByName('browse_entries.html', [
+            'html_id_lists' => $this->_oConfig->getHtmlIds('lists'),
+            'bx_repeat:lists' => $aTmplVarsLists,
+            'bx_if:allow_add_list' => [
+                'condition' => $bAllowAdd,
+                'content' => [
+                    'js_object' => $sJsObject,
+                    'context_id' => $iContextId,
+                    
+                ]
+            ],
+            'bx_if:allow_add_entry' => [
+                'condition' => $bAllowAdd,
+                'content' => [
+                    'js_object' => $sJsObject,
+                    'context_id' => $iContextId,
+                ]
+            ],
+        ]);
+    }
+
+    public function getAttachLinks($iContentId)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+
+        $aResults = [];
+        if(($sLink = $aContentInfo[$CNF['FIELD_LINK']] ?: false))
+            $aResults[] = [
+                'url' => $sLink,
+                'title' => $aContentInfo[$CNF['FIELD_TITLE']],
+                'text' => $aContentInfo[$CNF['FIELD_TEXT']],
+                'thumbnail' => ''
+            ];
+
+        return $aResults;
+    }
+}
+
+/** @} */

+ 26 - 0
modules/boonex/resources/classes/BxResourcesUploaderHTML5.php

@@ -0,0 +1,26 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesUploaderHTML5 extends BxBaseModTextUploaderHTML5
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_sModule = 'bx_resources';
+
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 136 - 0
modules/boonex/resources/install/config.php

@@ -0,0 +1,136 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = [
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_resources',
+    'title' => 'Resources',
+    'note' => 'Resources module.',
+    'version' => '15.0.0.DEV',
+    'vendor' => 'UNA INC',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => [
+        '15.0.x'
+    ],
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/resources/',
+    'home_uri' => 'resources',
+
+    'db_prefix' => 'bx_resources_',
+    'class_prefix' => 'BxResources',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Resources',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => [
+        'trigger_page_profile_view_entry',
+        'trigger_page_group_view_entry',
+    ],
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => [
+        'trigger_profile_view_submenu',
+        'trigger_group_view_submenu',
+    ],
+
+    /**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => [
+        'bx_resources_covers',
+    ],
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => [
+        'bx_resources_preview',
+        'bx_resources_miniature',
+        'bx_resources_gallery',
+        'bx_resources_cover',
+    ],
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => [
+        'bx_resources',
+    	'bx_resources_cmts'
+    ],
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => [
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ],
+    'uninstall' => [
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ],
+    'enable' => [
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ],
+    'enable_success' => [
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ],
+    'disable' => [
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ],
+    'disable_failed' => [
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ],
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => [],
+
+    /**
+     * Relations Section
+     */
+    'relations' => [
+    	'bx_timeline',
+    	'bx_notifications'
+    ]
+];
+
+/** @} */

+ 19 - 0
modules/boonex/resources/install/installer.php

@@ -0,0 +1,19 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxResourcesInstaller extends BxBaseModTextInstaller
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}
+
+/** @} */

+ 228 - 0
modules/boonex/resources/install/langs/en.xml

@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+    <string name="_bx_resources"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_cmts"><![CDATA[Resources' Comments]]></string>
+    <string name="_bx_resources_reactions"><![CDATA[Resources' Reactions]]></string>
+
+    <string name="_bx_resources_option_enable_auto_approve"><![CDATA[Auto approve a resource after creation]]></string>
+    <string name="_bx_resources_option_summary_chars"><![CDATA[Number of characters in auto-cropped resource summary]]></string>
+    <string name="_bx_resources_option_plain_summary_chars"><![CDATA[Number of characters in plain resource description when resource hasn't thumb]]></string>
+    <string name="_bx_resources_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_resources_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
+    <string name="_bx_resources_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+    <string name="_bx_resources_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+    <string name="_bx_resources_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
+
+    <!-- Forms -->
+    <string name="_bx_resources_form_entry"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_form_entry_display_add"><![CDATA[Add Resource]]></string>
+    <string name="_bx_resources_form_entry_display_edit"><![CDATA[Edit Resource]]></string>
+    <string name="_bx_resources_form_entry_display_delete"><![CDATA[Delete Resource]]></string>
+    <string name="_bx_resources_form_entry_display_view"><![CDATA[View Resource]]></string>
+    <string name="_bx_resources_form_entry_input_author"><![CDATA[Author]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_resources_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_publish"><![CDATA[Add]]></string>
+    <string name="_bx_resources_form_entry_input_do_publish"><![CDATA[Add]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_cancel"><![CDATA[Cancel]]></string>
+    <string name="_bx_resources_form_entry_input_do_cancel"><![CDATA[Cancel]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_cancel_edit"><![CDATA[Cancel (Edit form)]]></string>
+    <string name="_bx_resources_form_entry_input_do_cancel_edit"><![CDATA[Cancel]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls"><![CDATA[Controls]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls_edit"><![CDATA[Controls (Edit form)]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls_edit_popup"><![CDATA[Controls (Edit form in popup)]]></string>
+    <string name="_bx_resources_form_entry_input_sys_link"><![CDATA[Link]]></string>
+    <string name="_bx_resources_form_entry_input_link"><![CDATA[Link]]></string>
+    <string name="_bx_resources_form_entry_input_link_err"><![CDATA[Link is essential. Please, fill in this field.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_title"><![CDATA[Title]]></string>
+    <string name="_bx_resources_form_entry_input_title"><![CDATA[Title]]></string>
+    <string name="_bx_resources_form_entry_input_title_inf"><![CDATA[Leave empty to use Link as Title.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+    <string name="_bx_resources_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_resources_form_entry_input_sys_text"><![CDATA[Text]]></string>
+    <string name="_bx_resources_form_entry_input_text"><![CDATA[Text]]></string>
+    <string name="_bx_resources_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+    <string name="_bx_resources_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this resource]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the resource]]></string>
+    <string name="_bx_resources_form_entry_input_sys_covers"><![CDATA[Image]]></string>
+    <string name="_bx_resources_form_entry_input_covers"><![CDATA[Image]]></string>
+    <string name="_bx_resources_form_entry_input_covers_uploader_html5_title"><![CDATA[Upload]]></string>
+    <string name="_bx_resources_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_resources_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_resources_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_resources_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_resources_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_resources_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_allow_comments"><![CDATA[Allow comments]]></string>
+    <string name="_bx_resources_form_entry_input_allow_comments"><![CDATA[Allow comments]]></string>
+
+    <string name="_bx_resources_form_list_entry"><![CDATA[Lists]]></string>
+    <string name="_bx_resources_form_list_entry_display_add"><![CDATA[Add Lists]]></string>
+    <string name="_bx_resources_form_list_entry_display_edit"><![CDATA[Edit Lists]]></string>
+    <string name="_bx_resources_form_list_entry_input_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_resources_form_list_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_resources_form_list_entry_input_sys_title"><![CDATA[Title]]></string>
+    <string name="_bx_resources_form_list_entry_input_title"><![CDATA[Title]]></string>
+    <string name="_bx_resources_form_list_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+
+    <!-- ACL -->
+    <string name="_bx_resources_acl_action_create_entry"><![CDATA[Create Resource]]></string>
+    <string name="_bx_resources_acl_action_delete_entry"><![CDATA[Delete Resource]]></string>
+    <string name="_bx_resources_acl_action_view_entry"><![CDATA[View Resource]]></string>
+    <string name="_bx_resources_acl_action_edit_any_entry"><![CDATA[Edit Any Resource]]></string>
+    <string name="_bx_resources_acl_action_delete_any_entry"><![CDATA[Delete Any Resource]]></string>
+
+    <!-- Pages -->
+    <string name="_bx_resources_page_title_sys_create_entry"><![CDATA[New Resource]]></string>
+    <string name="_bx_resources_page_title_create_entry"><![CDATA[New Resource]]></string>
+    <string name="_bx_resources_page_block_title_create_entry"><![CDATA[New Resource]]></string>
+    <string name="_bx_resources_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_page_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_page_title_sys_view_entry"><![CDATA[View Resource]]></string>
+    <string name="_bx_resources_page_title_view_entry"><![CDATA[{title}]]></string>
+    <string name="_bx_resources_page_block_title_entry_text"><![CDATA[Resource Text]]></string>
+    <string name="_bx_resources_page_title_browse"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_page_title_search_results"><![CDATA[Resources matching "{0}"]]></string>
+    <string name="_bx_resources_page_title_browse_by_author"><![CDATA[Resources of {display_name}]]></string>
+    <string name="_bx_resources_page_title_browse_by_context"><![CDATA[Resources in {display_name}]]></string>
+    <string name="_bx_resources_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_resources_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_resources_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_resources_page_block_title_sys_entry_comments"><![CDATA[Activity]]></string>
+    <string name="_bx_resources_page_block_title_entry_comments"><![CDATA[Activity ({0})]]></string>
+    <string name="_bx_resources_page_block_title_entry_reports"><![CDATA[Reports]]></string>
+    <string name="_bx_resources_page_block_title_entry_comments_link"><![CDATA[Activity in <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_resources_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_resources_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_resources_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_resources_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_resources_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_resources_page_block_title_search_form_cmts"><![CDATA[Activity Search Form]]></string>
+    <string name="_bx_resources_page_block_title_search_results_cmts"><![CDATA[Activity Search Results]]></string>
+    <string name="_bx_resources_page_title_sys_view_entry_comments"><![CDATA[Resource Comments]]></string>
+    <string name="_bx_resources_page_title_view_entry_comments"><![CDATA[Activity in {title}]]></string>
+    <string name="_bx_resources_page_title_sys_entries_of_author"><![CDATA[Resources of author]]></string>
+    <string name="_bx_resources_page_title_entries_of_author"><![CDATA[Resources by {display_name}]]></string>
+    <string name="_bx_resources_page_title_sys_entries_in_context"><![CDATA[Resources in context]]></string>
+    <string name="_bx_resources_page_title_entries_in_context"><![CDATA[Resources in {display_name}]]></string>
+    <string name="_bx_resources_page_block_title_entries_of_author"><![CDATA[Resources by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_resources_page_block_title_sys_entries_of_author"><![CDATA[Resources of author]]></string>
+    <string name="_bx_resources_page_block_title_entries_in_context"><![CDATA[Resources in <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_resources_page_block_title_sys_entries_in_context"><![CDATA[Resources in context]]></string>
+    <string name="_bx_resources_page_block_title_entries_actions"><![CDATA[Resources actions]]></string>
+    <string name="_bx_resources_page_block_title_browse_cmts"><![CDATA[Resources' Activity]]></string>
+    <string name="_bx_resources_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_resources_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_resources_page_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_resources_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_resources_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_resources_page_block_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_resources_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+    <string name="_bx_resources_page_block_title_cats"><![CDATA[Resources Categories]]></string>
+    <string name="_bx_resources_page_block_title_entry_info"><![CDATA[Info]]></string>
+    <string name="_bx_resources_page_block_title_my_entries"><![CDATA[My Resources]]></string>
+    <string name="_bx_resources_page_block_title_sys_entry_context"><![CDATA[Posted in]]></string>
+    <string name="_bx_resources_page_block_title_entry_context"><![CDATA[Posted in]]></string>
+
+    <!-- Menus -->
+    <string name="_bx_resources_menu_set_title_view_entry"><![CDATA[Resource Actions]]></string>
+    <string name="_bx_resources_menu_title_view_entry"><![CDATA[Resource Actions]]></string>
+    <string name="_bx_resources_menu_title_submenu"><![CDATA[Resources Submenu]]></string>
+    <string name="_bx_resources_menu_set_title_submenu"><![CDATA[Resources Submenu]]></string>
+    <string name="_bx_resources_menu_item_title_system_create_entry"><![CDATA[Resource]]></string>
+    <string name="_bx_resources_menu_item_title_create_entry"><![CDATA[Resource]]></string>
+    <string name="_bx_resources_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entry"><![CDATA[View Resource]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_home"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_item_title_entries_home"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_resources_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_resources_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_resources_menu_title_view_entry_submenu"><![CDATA[View Resource Submenu]]></string>
+    <string name="_bx_resources_menu_set_title_view_entry_submenu"><![CDATA[View Resource Submenu]]></string>
+    <string name="_bx_resources_menu_item_title_view_entry_submenu_entry"><![CDATA[Resource]]></string>
+    <string name="_bx_resources_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entry_comments"><![CDATA[Resource Comments]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entries_author"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_item_title_view_entries_author"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entries_in_context"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_item_title_view_entries_in_context"><![CDATA[Resources]]></string>
+    <string name="_bx_resources_menu_title_entries_my"><![CDATA[My Resources Action Menu]]></string>
+    <string name="_bx_resources_menu_set_title_entries_my"><![CDATA[My Resources Menu]]></string>
+    <string name="_bx_resources_menu_set_title_manage_tools"><![CDATA[Manage Tools - Item Submenu]]></string>
+    <string name="_bx_resources_menu_title_manage_tools"><![CDATA[Manage Tools - Item Submenu]]></string>
+    <string name="_bx_resources_menu_item_title_manage_my"><![CDATA[My Resources]]></string>
+    <string name="_bx_resources_menu_item_title_manage_all"><![CDATA[All Resources]]></string>
+    <string name="_bx_resources_menu_title_manage_tools_submenu"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_resources_menu_set_title_manage_tools_submenu"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_entries_common"><![CDATA[My Resources]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_entries_administration"><![CDATA[All Resources]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_time_common"><![CDATA[My Time]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_time_administration"><![CDATA[All Time]]></string>
+
+    <!-- Grids -->
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter3"><![CDATA[All Modules]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
+    <string name="_bx_resources_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_resources_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_resources_grid_column_title_adm_context_module"><![CDATA[Module]]></string>
+    <string name="_bx_resources_grid_action_title_adm_audit_content"><![CDATA[Audit actions]]></string>
+    <string name="_bx_resources_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_resources_grid_column_title_adm_author"><![CDATA[Author]]></string>>
+    <string name="_bx_resources_grid_action_title_adm_add"><![CDATA[Add]]></string>
+    <string name="_bx_resources_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_resources_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_resources_grid_action_title_adm_clear_reports"><![CDATA[Сlear reports]]></string>
+    <string name="_bx_resources_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_resources_grid_column_title_adm_status_admin"><![CDATA[Moderation]]></string>
+    <string name="_bx_resources_grid_action_err_delete"><![CDATA[Cannot delete the selected resource(s).]]></string>
+    <string name="_bx_resources_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_resources_chart_growth"><![CDATA[Resources: Growth]]></string>
+    <string name="_bx_resources_chart_growth_speed"><![CDATA[Resources: Growth Speed]]></string>
+
+    <string name="_bx_resources_search_extended"><![CDATA[Resources Search]]></string>
+    <string name="_bx_resources_search_extended_cmts"><![CDATA[Resources Comments Search]]></string>
+
+    <string name="_bx_resources_pre_lists_cats"><![CDATA[Resource categories]]></string>
+    <string name="_bx_resources_cat_links"><![CDATA[Links]]></string>
+    <string name="_bx_resources_cat_media"><![CDATA[Media]]></string>
+    <string name="_bx_resources_cat_other"><![CDATA[Other]]></string>
+
+    <string name="_bx_resources_txt_all_entries_in"><![CDATA[<a href="{0}">All Resources in {1} ({2})</a>]]></string>
+    <string name="_bx_resources_txt_all_entries_by"><![CDATA[{0} resources]]></string>
+    <string name="_bx_resources_txt_sample_single"><![CDATA[resource]]></string>
+    <string name="_bx_resources_txt_sample_single_with_article"><![CDATA[a resource]]></string>
+    <string name="_bx_resources_txt_sample_comment_single"><![CDATA[comment to resource]]></string>
+    <string name="_bx_resources_txt_sample_vote_single"><![CDATA[vote to resource]]></string>
+    <string name="_bx_resources_txt_sample_reaction_single"><![CDATA['{0}' reaction to resource]]></string>
+    <string name="_bx_resources_txt_sample_score_up_single"><![CDATA[score up vote to resource]]></string>
+    <string name="_bx_resources_txt_sample_score_down_single"><![CDATA[score down vote to resource]]></string>
+    <string name="_bx_resources_txt_scheduled_awaiting"><![CDATA[Resource publishing date is {date_publish_uf}]]></string>
+    <string name="_bx_resources_txt_list_default"><![CDATA[Default List]]></string>
+    <string name="_bx_resources_txt_list_add"><![CDATA[Add List]]></string>
+    <string name="_bx_resources_txt_entry_add"><![CDATA[Add Resource]]></string>
+    <string name="_bx_resources_txt_title_empty"><![CDATA[No Caption]]></string>
+
+    <string name="_bx_resources_txt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
+    <string name="_bx_resources_txt_msg_status_hidden"><![CDATA[This resource was hidden.]]></string>
+    <string name="_bx_resources_txt_msg_status_pending"><![CDATA[This resource is pending approval.]]></string>
+    <string name="_bx_resources_txt_msg_confirm_list_deletion"><![CDATA[You will delete all resources that are contained in this list. Are you sure?]]></string>
+</resources>

+ 48 - 0
modules/boonex/resources/install/sql/disable.sql

@@ -0,0 +1,48 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_resources' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_resources' OR `object` IN('bx_resources_create_entry', 'bx_resources_edit_entry', 'bx_resources_delete_entry', 'bx_resources_view_entry', 'bx_resources_view_entry_comments', 'bx_resources_context', 'bx_resources_manage', 'bx_resources_administration');
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_resources' OR `set_name` IN('bx_resources_view', 'bx_resources_view_actions', 'bx_resources_view_submenu', 'bx_resources_menu_manage_tools');
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` = 'bx_resources_allow_view_to';
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_resources';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_resources';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_resources', 'bx_resources_cmts');
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_resources_cats';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_resources%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_resources%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` LIKE 'bx_resources_%';
+DELETE FROM `sys_grid_fields` WHERE `object` LIKE 'bx_resources_%';
+DELETE FROM `sys_grid_actions` WHERE `object` LIKE 'bx_resources_%';
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` LIKE 'bx_resources_%';
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_resources' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 305 - 0
modules/boonex/resources/install/sql/enable.sql

@@ -0,0 +1,305 @@
+
+-- SETTINGS
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_resources', '_bx_resources', 'bx_resources@modules/boonex/resources/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_resources', '_bx_resources', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_resources_enable_auto_approve', 'on', @iCategId, '_bx_resources_option_enable_auto_approve', 'checkbox', '', '', '', 0),
+('bx_resources_summary_chars', '700', @iCategId, '_bx_resources_option_summary_chars', 'digit', '', '', '', 1),
+('bx_resources_plain_summary_chars', '240', @iCategId, '_bx_resources_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_resources_per_page_browse', '12', @iCategId, '_bx_resources_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_resources_per_page_profile', '6', @iCategId, '_bx_resources_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_resources_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
+('bx_resources_rss_num', '10', @iCategId, '_bx_resources_option_rss_num', 'digit', '', '', '', 20),
+('bx_resources_searchable_fields', 'title,text', @iCategId, '_bx_resources_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+-- PAGE: create entry
+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_resources_create_entry', '_bx_resources_page_title_sys_create_entry', '_bx_resources_page_title_create_entry', 'bx_resources', 5, 2147483647, 1, 'create-resource', 'page.php?i=create-resource', '', '', '', 0, 1, 0, 'BxResourcesPageBrowse', 'modules/boonex/resources/classes/BxResourcesPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_resources_create_entry', 1, 'bx_resources', '_bx_resources_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+
+-- PAGE: edit entry
+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_resources_edit_entry', '_bx_resources_page_title_sys_edit_entry', '_bx_resources_page_title_edit_entry', 'bx_resources', 5, 2147483647, 1, 'edit-resource', '', '', '', '', 0, 1, 0, 'BxResourcesPageEntry', 'modules/boonex/resources/classes/BxResourcesPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_resources_edit_entry', 1, 'bx_resources', '_bx_resources_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+
+-- PAGE: delete entry
+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_resources_delete_entry', '_bx_resources_page_title_sys_delete_entry', '_bx_resources_page_title_delete_entry', 'bx_resources', 5, 2147483647, 1, 'delete-resource', '', '', '', '', 0, 1, 0, 'BxResourcesPageEntry', 'modules/boonex/resources/classes/BxResourcesPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_resources_delete_entry', 1, 'bx_resources', '_bx_resources_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+
+-- PAGE: view entry
+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_resources_view_entry', '_bx_resources_page_title_sys_view_entry', '_bx_resources_page_title_view_entry', 'bx_resources', 12, 2147483647, 1, 'view-resource', '', '', '', '', 0, 1, 0, 'BxResourcesPageEntry', 'modules/boonex/resources/classes/BxResourcesPageEntry.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_resources_view_entry', 2, 'bx_resources', '', '_bx_resources_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 2),
+('bx_resources_view_entry', 2, 'bx_resources', '', '_bx_resources_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 1),
+('bx_resources_view_entry', 3, 'bx_resources', '_bx_resources_page_block_title_sys_entry_context', '_bx_resources_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:14:"entity_context";}', 0, 0, 1, 1),
+('bx_resources_view_entry', 3, 'bx_resources', '', '_bx_resources_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 2),
+('bx_resources_view_entry', 2, 'bx_resources', '', '_bx_resources_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 3),
+('bx_resources_view_entry', 4, 'bx_resources', '', '_bx_resources_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 0),
+('bx_resources_view_entry', 4, 'bx_resources', '', '_bx_resources_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 0, 0),
+('bx_resources_view_entry', 2, 'bx_resources', '_bx_resources_page_block_title_sys_entry_comments', '_bx_resources_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:15:"entity_comments";}', 0, 0, 1, 6),
+('bx_resources_view_entry', 2, 'bx_resources', '', '_bx_resources_page_block_title_entry_reports', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:14:"entity_reports";}', 0, 0, 1, 6);
+
+
+-- PAGE: view entry comments
+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_resources_view_entry_comments', '_bx_resources_page_title_sys_view_entry_comments', '_bx_resources_page_title_view_entry_comments', 'bx_resources', 5, 2147483647, 1, 'view-resource-comments', '', '', '', '', 0, 1, 0, 'BxResourcesPageEntry', 'modules/boonex/resources/classes/BxResourcesPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_resources_view_entry_comments', 1, 'bx_resources', '_bx_resources_page_block_title_sys_entry_comments', '_bx_resources_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:15:"entity_comments";}', 0, 0, 1);
+
+-- PAGE: entries in context
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_context', 'resources-context', '_bx_resources_page_title_sys_entries_in_context', '_bx_resources_page_title_entries_in_context', 'bx_resources', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxResourcesPageAuthor', 'modules/boonex/resources/classes/BxResourcesPageAuthor.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_resources_context', 1, 'bx_resources', '_bx_resources_page_block_title_sys_entries_in_context', '_bx_resources_page_block_title_entries_in_context', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:16:"browse_resources";}', 0, 0, 1, 1);
+
+-- PAGE: manage own 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_resources_manage', '_bx_resources_page_title_sys_manage', '_bx_resources_page_title_manage', 'bx_resources', 5, 2147483647, 1, 'resources-manage', 'page.php?i=resources-manage', '', '', '', 0, 1, 0, 'BxResourcesPageBrowse', 'modules/boonex/resources/classes/BxResourcesPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_resources_manage', 1, 'bx_resources', '_bx_resources_page_block_title_system_manage', '_bx_resources_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:12:"bx_resources";s:6:"method";s:12:"manage_tools";}', 0, 1, 0);
+
+-- PAGE: manage all 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_resources_administration', '_bx_resources_page_title_sys_manage_administration', '_bx_resources_page_title_manage', 'bx_resources', 5, 192, 1, 'resources-administration', 'page.php?i=resources-administration', '', '', '', 0, 1, 0, 'BxResourcesPageBrowse', 'modules/boonex/resources/classes/BxResourcesPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_resources_administration', 1, 'bx_resources', '_bx_resources_page_block_title_system_manage_administration', '_bx_resources_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:"module";s:12:"bx_resources";s:6:"method";s:12:"manage_tools";s:6:"params";a:1:{i:0;s:14:"administration";}}', 0, 1, 0);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 0;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`, `active`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_resources', '_bx_resources_page_block_title_sys_entries_of_author', '_bx_resources_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:12:"bx_resources";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:25:"bx_posts_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0, 1);
+
+SET @iPBCellContext = 0;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`, `active`) VALUES
+('trigger_page_group_view_entry', @iPBCellContext, 'bx_resources', '_bx_resources_page_block_title_sys_entries_in_context', '_bx_resources_page_block_title_entries_in_context', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:12:"bx_resources";s:6:"method";s:14:"browse_context";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:25:"bx_posts_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0, 1);
+
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_view', '_bx_resources_menu_title_view_entry', 'bx_resources_view', 'bx_resources', 9, 0, 1, 'BxResourcesMenuView', 'modules/boonex/resources/classes/BxResourcesMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_resources_view', 'bx_resources', '_bx_resources_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
+('bx_resources_view', 'bx_resources', 'edit-resource', '_bx_resources_menu_item_title_system_edit_entry', '_bx_resources_menu_item_title_edit_entry', 'page.php?i=edit-resource&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 1),
+('bx_resources_view', 'bx_resources', 'delete-resource', '_bx_resources_menu_item_title_system_delete_entry', '_bx_resources_menu_item_title_delete_entry', 'page.php?i=delete-resource&id={content_id}', '', '', 'remove', '', 2147483647, '', 1, 0, 3),
+('bx_resources_view', 'bx_resources', 'approve', '_sys_menu_item_title_system_va_approve', '_sys_menu_item_title_va_approve', 'javascript:void(0)', 'javascript:bx_approve(this, ''{module_uri}'', {content_id});', '', 'check', '', 2147483647, '', 1, 0, 4);
+
+-- MENU: all actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_view_actions', '_sys_menu_title_view_actions', 'bx_resources_view_actions', 'bx_resources', 15, 0, 1, 'BxResourcesMenuViewActions', 'modules/boonex/resources/classes/BxResourcesMenuViewActions.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_resources_view_actions', 'bx_resources', '_sys_menu_set_title_view_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
+('bx_resources_view_actions', 'bx_resources', 'edit-resource', '_bx_resources_menu_item_title_system_edit_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 10),
+('bx_resources_view_actions', 'bx_resources', 'delete-resource', '_bx_resources_menu_item_title_system_delete_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 20),
+('bx_resources_view_actions', 'bx_resources', 'approve', '_sys_menu_item_title_system_va_approve', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 40),
+('bx_resources_view_actions', 'bx_resources', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 200),
+('bx_resources_view_actions', 'bx_resources', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 210),
+('bx_resources_view_actions', 'bx_resources', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 220),
+('bx_resources_view_actions', 'bx_resources', 'reaction', '_sys_menu_item_title_system_va_reaction', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 225),
+('bx_resources_view_actions', 'bx_resources', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 230),
+('bx_resources_view_actions', 'bx_resources', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 270),
+('bx_resources_view_actions', 'bx_resources', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_resources&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
+('bx_resources_view_actions', 'bx_resources', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
+('bx_resources_view_actions', 'bx_resources', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, '', 1, 0, 9999);
+
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_view_submenu', '_bx_resources_menu_title_view_entry_submenu', 'bx_resources_view_submenu', 'bx_resources', 8, 0, 1, 'BxResourcesMenuView', 'modules/boonex/resources/classes/BxResourcesMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_resources_view_submenu', 'bx_resources', '_bx_resources_menu_set_title_view_entry_submenu', 0);
+
+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_resources_view_submenu', 'bx_resources', 'view-resource', '_bx_resources_menu_item_title_system_view_entry', '_bx_resources_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-resource&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_resources_view_submenu', 'bx_resources', 'view-resource-comments', '_bx_resources_menu_item_title_system_view_entry_comments', '_bx_resources_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-resource-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+
+-- MENU: manage tools: item submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_menu_manage_tools', '_bx_resources_menu_title_manage_tools', 'bx_resources_menu_manage_tools', 'bx_resources', 6, 0, 1, 'BxResourcesMenuManageTools', 'modules/boonex/resources/classes/BxResourcesMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_resources_menu_manage_tools', 'bx_resources', '_bx_resources_menu_set_title_manage_tools', 0);
+
+--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_resources_menu_manage_tools', 'bx_resources', 'delete-with-content', '_bx_resources_menu_item_title_system_delete_with_content', '_bx_resources_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'far trash-alt', '', 128, 1, 0, 0);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+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 
+('trigger_profile_view_submenu', 'bx_resources', 'resources-author', '_bx_resources_menu_item_title_system_view_entries_author', '_bx_resources_menu_item_title_view_entries_author', 'page.php?i=resources-author&profile_id={profile_id}', '', '', 'warehouse col-green2', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_resources', 'resources-context', '_bx_resources_menu_item_title_system_view_entries_in_context', '_bx_resources_menu_item_title_view_entries_in_context', 'page.php?i=resources-context&profile_id={profile_id}', '', '', 'warehouse col-green2', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_resources_allow_view_to', 'bx_resources', 'view', '_bx_resources_form_entry_input_allow_view_to', '3', 'bx_resources_entries', 'id', 'author', '', '');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_resources', 'create entry', NULL, '_bx_resources_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_resources', 'delete entry', NULL, '_bx_resources_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_resources', 'view entry', NULL, '_bx_resources_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_resources', 'edit any entry', NULL, '_bx_resources_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_resources', 'delete any entry', NULL, '_bx_resources_acl_action_delete_any_entry', '', 1, 3);
+SET @iIdActionEntryDeleteAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny),
+
+-- delete any entry
+(@iAdministrator, @iIdActionEntryDeleteAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_resources', '_bx_resources', @iSearchOrder + 1, 'BxResourcesSearchResult', 'modules/boonex/resources/classes/BxResourcesSearchResult.php'),
+('bx_resources_cmts', '_bx_resources_cmts', @iSearchOrder + 2, 'BxResourcesCmtsSearchResult', 'modules/boonex/resources/classes/BxResourcesCmtsSearchResult.php');
+
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `module`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_resources_cats', 'bx_resources', 'bx_resources', 'bx_resources', 'bx_resources_cats', 'bx_resources_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = ABS(`bx_resources_entries`.`author`))', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_resources', 'bx_resources', '_bx_resources', 'page.php?i=resources-home', 'warehouse col-green2', 'SELECT COUNT(*) FROM `bx_resources_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_resources_growth', '_bx_resources_chart_growth', 'bx_resources_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_resources_growth_speed', '_bx_resources_chart_growth_speed', 'bx_resources_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_resources_administration', 'Sql', 'SELECT `tt`.*, `tp`.`id` AS `context_id`, `tp`.`type` AS `context_module` FROM `bx_resources_entries` AS `tt` INNER JOIN `sys_profiles` AS `tp` ON ABS(`tt`.`allow_view_to`)=`tp`.`id` WHERE 1 ', 'bx_resources_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'tt`.`title,tt`.`text', '', 'like', 'reports', '', 192, 'BxResourcesGridAdministration', 'modules/boonex/resources/classes/BxResourcesGridAdministration.php'),
+('bx_resources_common', 'Sql', 'SELECT `tt`.*, `tp`.`id` AS `context_id`, `tp`.`type` AS `context_module` FROM `bx_resources_entries` AS `tt` INNER JOIN `sys_profiles` AS `tp` ON ABS(`tt`.`allow_view_to`)=`tp`.`id` WHERE 1 ', 'bx_resources_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'tt`.`title,tt`.`text', '', 'like', '', '', 2147483647, 'BxResourcesGridCommon', 'modules/boonex/resources/classes/BxResourcesGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_resources_administration', 'checkbox', '_sys_select', '2%', 0, 0, '', 1),
+('bx_resources_administration', 'switcher', '_bx_resources_grid_column_title_adm_active', '8%', 0, 0, '', 2),
+('bx_resources_administration', 'reports', '_sys_txt_reports_title', '5%', 0, 0, '', 3),
+('bx_resources_administration', 'context_module', '_bx_resources_grid_column_title_adm_context_module', '10%', 0, 0, '', 4),
+('bx_resources_administration', 'title', '_bx_resources_grid_column_title_adm_title', '25%', 0, 25, '', 5),
+('bx_resources_administration', 'added', '_bx_resources_grid_column_title_adm_added', '10%', 1, 25, '', 6),
+('bx_resources_administration', 'author', '_bx_resources_grid_column_title_adm_author', '20%', 0, 25, '', 7),
+('bx_resources_administration', 'actions', '', '20%', 0, 0, '', 8),
+
+('bx_resources_common', 'checkbox', '_sys_select', '2%', 0, 0, '', 1),
+('bx_resources_common', 'switcher', '_bx_resources_grid_column_title_adm_active', '8%', 0, 0, '', 2),
+('bx_resources_common', 'title', '_bx_resources_grid_column_title_adm_title', '35%', 0, 35, '', 3),
+('bx_resources_common', 'context_module', '_bx_resources_grid_column_title_adm_context_module', '10%', 0, 0, '', 4),
+('bx_resources_common', 'added', '_bx_resources_grid_column_title_adm_added', '10%', 1, 25, '', 5),
+('bx_resources_common', 'status_admin', '_bx_resources_grid_column_title_adm_status_admin', '15%', 0, 16, '', 6),
+('bx_resources_common', 'actions', '', '20%', 0, 0, '', 7);
+
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_resources_administration', 'bulk', 'delete', '_bx_resources_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_resources_administration', 'bulk', 'clear_reports', '_bx_resources_grid_action_title_adm_clear_reports', '', 0, 1, 1),
+('bx_resources_administration', 'single', 'edit', '_bx_resources_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
+('bx_resources_administration', 'single', 'delete', '_bx_resources_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_resources_administration', 'single', 'settings', '_bx_resources_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_resources_administration', 'single', 'audit_content', '_bx_resources_grid_action_title_adm_audit_content', 'search', 1, 0, 4),
+('bx_resources_administration', 'single', 'clear_reports', '_bx_resources_grid_action_title_adm_clear_reports', 'eraser', 1, 0, 5),
+
+('bx_resources_common', 'bulk', 'delete', '_bx_resources_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_resources_common', 'single', 'edit', '_bx_resources_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
+('bx_resources_common', 'single', 'delete', '_bx_resources_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_resources_common', 'single', 'settings', '_bx_resources_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_resources_html5', 1, 'BxResourcesUploaderHTML5', 'modules/boonex/resources/classes/BxResourcesUploaderHTML5.php');
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_resources', 'BxResourcesAlertsResponse', 'modules/boonex/resources/classes/BxResourcesAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler),
+('profile', 'search_by_term', @iHandler);

+ 346 - 0
modules/boonex/resources/install/sql/install.sql

@@ -0,0 +1,346 @@
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_resources_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(11) NOT NULL,
+  `list` int(11) NOT NULL,	
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `published` int(11) NOT NULL,
+  `thumb` int(11) NOT NULL,
+  `thumb_data` varchar(50) NOT NULL,
+  `link` varchar(255) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `text` mediumtext NOT NULL,
+  `labels` text NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `rrate` float NOT NULL default '0',
+  `rvotes` int(11) NOT NULL default '0',
+  `score` int(11) NOT NULL default '0',
+  `sc_up` int(11) NOT NULL default '0',
+  `sc_down` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
+  `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
+  `allow_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: lists
+CREATE TABLE IF NOT EXISTS `bx_resources_lists` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `context_id` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `default` tinyint(4) NOT NULL default '0',
+  PRIMARY KEY (`id`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_resources_covers` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` bigint(20) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_photos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` bigint(20) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_resources_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  `cmt_pinned` int(11) NOT NULL default '0',
+  `cmt_cf` int(11) NOT NULL default '1',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_resources_votes` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_reactions` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `reaction` varchar(32) NOT NULL default '',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `reaction` (`object_id`, `reaction`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_reactions_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `reaction` varchar(32) NOT NULL default '',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+-- TABLE: views
+CREATE TABLE `bx_resources_views_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_resources_reports` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  `checked_by` int(11) NOT NULL default '0',
+  `status` tinyint(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+);
+
+-- TABLE: scores
+CREATE TABLE IF NOT EXISTS `bx_resources_scores` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `count_up` int(11) NOT NULL default '0',
+  `count_down` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_resources_scores_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(8) NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+
+-- STORAGES & TRANSCODERS
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_resources_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_resources_covers', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
+('bx_resources_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_resources_photos_resized', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_preview', 'bx_resources_photos_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_resources_covers";}', 'no', '1', '2592000', '0', '', ''),
+('bx_resources_miniature', 'bx_resources_photos_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_resources_covers";}', 'no', '1', '2592000', '0', '', ''),
+('bx_resources_gallery', 'bx_resources_photos_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_resources_covers";}', 'no', '1', '2592000', '0', '', ''),
+('bx_resources_cover', 'bx_resources_photos_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_resources_covers";}', 'no', '1', '2592000', '0', '', '');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_resources_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_resources_miniature', 'Resize', 'a:1:{s:1:"w";s:3:"300";}', '0'),
+('bx_resources_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_resources_cover', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0');
+
+
+-- FORMS: entry (resource)
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources', 'bx_resources', '_bx_resources_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_resources_entries', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxResourcesFormEntry', 'modules/boonex/resources/classes/BxResourcesFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_resources', 'bx_resources_entry_add', 'bx_resources', 0, '_bx_resources_form_entry_display_add'),
+('bx_resources', 'bx_resources_entry_delete', 'bx_resources', 0, '_bx_resources_form_entry_display_delete'),
+('bx_resources', 'bx_resources_entry_edit', 'bx_resources', 0, '_bx_resources_form_entry_display_edit'),
+('bx_resources', 'bx_resources_entry_view', 'bx_resources', 1, '_bx_resources_form_entry_display_view');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_resources', 'bx_resources', 'allow_view_to', '', '', 0, 'custom', '_bx_resources_form_entry_input_sys_allow_view_to', '_bx_resources_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_resources_form_entry_input_sys_delete_confirm', '_bx_resources_form_entry_input_delete_confirm', '_bx_resources_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_resources_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'do_publish', '_bx_resources_form_entry_input_do_publish', '', 0, 'submit', '_bx_resources_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'do_submit', '_bx_resources_form_entry_input_do_submit', '', 0, 'submit', '_bx_resources_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'do_cancel', '_bx_resources_form_entry_input_do_cancel', '', 0, 'button', '_bx_resources_form_entry_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'do_cancel_edit', '_bx_resources_form_entry_input_do_cancel_edit', '', 0, 'button', '_bx_resources_form_entry_input_sys_do_cancel_edit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:41:"window.open(''{edit_cancel_url}'', ''_self'')";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
+('bx_resources', 'bx_resources', 'controls', '', 'do_publish,do_cancel', 0, 'input_set', '_bx_resources_form_entry_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'controls_edit', '', 'do_submit,do_cancel_edit', 0, 'input_set', '_bx_resources_form_entry_input_sys_controls_edit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'controls_edit_popup', '', 'do_submit,do_cancel', 0, 'input_set', '_bx_resources_form_entry_input_sys_controls_edit_popup', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'covers', 'a:1:{i:0;s:18:"bx_resources_html5";}', 'a:1:{s:18:"bx_resources_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_resources_form_entry_input_sys_covers', '_bx_resources_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'link', '', '', 0, 'text', '_bx_resources_form_entry_input_sys_link', '_bx_resources_form_entry_input_link', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_resources_form_entry_input_link_err', 'Xss', '', 1, 0),
+('bx_resources', 'bx_resources', 'title', '', '', 0, 'text', '_bx_resources_form_entry_input_sys_title', '_bx_resources_form_entry_input_title', '_bx_resources_form_entry_input_title_inf', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_resources', 'bx_resources', 'text', '', '', 0, 'textarea', '_bx_resources_form_entry_input_sys_text', '_bx_resources_form_entry_input_text', '', 0, 0, 2, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
+('bx_resources', 'bx_resources', 'cat', '', '#!bx_resources_cats', 0, 'select', '_bx_resources_form_entry_input_sys_cat', '_bx_resources_form_entry_input_cat', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_resources', 'bx_resources', 'added', '', '', 0, 'datetime', '_bx_resources_form_entry_input_sys_date_added', '_bx_resources_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'changed', '', '', 0, 'datetime', '_bx_resources_form_entry_input_sys_date_changed', '_bx_resources_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources', 'bx_resources', 'published', '', '', 0, 'datetime', '_bx_resources_form_entry_input_sys_date_published', '_bx_resources_form_entry_input_date_published', '_bx_resources_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
+('bx_resources', 'bx_resources', 'allow_comments', '1', '', 0, 'switcher', '_bx_resources_form_entry_input_sys_allow_comments', '_bx_resources_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_resources_entry_add', 'link', 2147483647, 1, 1),
+('bx_resources_entry_add', 'title', 2147483647, 1, 2),
+('bx_resources_entry_add', 'covers', 2147483647, 1, 3),
+('bx_resources_entry_add', 'controls', 2147483647, 1, 4),
+('bx_resources_entry_add', 'do_publish', 2147483647, 1, 5),
+('bx_resources_entry_add', 'do_cancel', 2147483647, 1, 6),
+
+('bx_resources_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_resources_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_resources_entry_edit', 'link', 2147483647, 1, 1),
+('bx_resources_entry_edit', 'title', 2147483647, 1, 2),
+('bx_resources_entry_edit', 'covers', 2147483647, 1, 3),
+('bx_resources_entry_edit', 'controls_edit', 2147483647, 1, 4),
+('bx_resources_entry_edit', 'do_submit', 2147483647, 1, 5),
+('bx_resources_entry_edit', 'do_cancel_edit', 2147483647, 1, 6),
+
+('bx_resources_entry_view', 'link', 2147483647, 1, 1),
+('bx_resources_entry_view', 'added', 2147483647, 1, 2),
+('bx_resources_entry_view', 'changed', 2147483647, 1, 3);
+
+
+-- FORMS: list (resources list)
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_resources_list', 'bx_resources', '_bx_resources_form_list_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_resources_lists', 'id', '', '', 'do_submit', '', 0, 1, 'BxResourcesFormListEntry', 'modules/boonex/resources/classes/BxResourcesFormListEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_resources_list', 'bx_resources_list_entry_add', 'bx_resources', 0, '_bx_resources_form_list_entry_display_add'),
+('bx_resources_list', 'bx_resources_list_entry_edit', 'bx_resources', 0, '_bx_resources_form_list_entry_display_edit');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_resources_list', 'bx_resources', 'do_submit', '_bx_resources_form_list_entry_input_do_submit', '', 0, 'submit', '_bx_resources_form_list_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_resources_list', 'bx_resources', 'title', '', '', 0, 'text', '_bx_resources_form_list_entry_input_sys_title', '_bx_resources_form_list_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_resources_form_list_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_resources_list', 'bx_resources', 'do_cancel', '_bx_resources_form_entry_input_do_cancel', '', 0, 'button', '_bx_resources_form_entry_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
+('bx_resources_list', 'bx_resources', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_resources_list_entry_add', 'title', 2147483647, 1, 1),
+('bx_resources_list_entry_add', 'controls', 2147483647, 1, 2),
+('bx_resources_list_entry_add', 'do_submit', 2147483647, 1, 3),
+('bx_resources_list_entry_add', 'do_cancel', 2147483647, 1, 4),
+
+('bx_resources_list_entry_edit', 'title', 2147483647, 1, 1),
+('bx_resources_list_entry_edit', 'controls', 2147483647, 1, 2),
+('bx_resources_list_entry_edit', 'do_submit', 2147483647, 1, 3),
+('bx_resources_list_entry_edit', 'do_cancel', 2147483647, 1, 4);
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_resources_cats', '_bx_resources_pre_lists_cats', 'bx_resources', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_resources_cats', '', 0, '_sys_please_select', ''),
+('bx_resources_cats', '1', 1, '_bx_resources_cat_links', ''),
+('bx_resources_cats', '2', 2, '_bx_resources_cat_media', ''),
+('bx_resources_cats', '3', 3, '_bx_resources_cat_other', '');
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Html`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_resources', 'bx_resources', 'bx_resources_cmts', 1, 5000, 1000, 3, 50, 10, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-resource&id={object_id}', '', 'bx_resources_entries', 'id', 'author', 'title', 'comments', 'BxResourcesCmts', 'modules/boonex/resources/classes/BxResourcesCmts.php');
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_resources', 'bx_resources', 'bx_resources_votes', 'bx_resources_votes_track', '604800', '1', '1', '0', '1', 'bx_resources_entries', 'id', 'author', 'rate', 'votes', '', ''),
+('bx_resources_reactions', 'bx_resources', 'bx_resources_reactions', 'bx_resources_reactions_track', '604800', '1', '1', '1', '1', 'bx_resources_entries', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
+
+-- SCORES
+INSERT INTO `sys_objects_score` (`name`, `module`, `table_main`, `table_track`, `post_timeout`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_score`, `trigger_field_cup`, `trigger_field_cdown`, `class_name`, `class_file`) VALUES 
+('bx_resources', 'bx_resources', 'bx_resources_scores', 'bx_resources_scores_track', '604800', '0', 'bx_resources_entries', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `pruning`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_resources', 'bx_resources', 'bx_resources_reports', 'bx_resources_reports_track', '31536000', '1', 'page.php?i=view-resource&id={object_id}', '', 'bx_resources_entries', 'id', 'author', 'reports', '', '');
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_resources', 'bx_resources', 'bx_resources_views_track', '86400', '1', 'bx_resources_entries', 'id', 'author', 'views', '', '');
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_resources', '_bx_resources', 'bx_resources', 'added', 'edited', 'deleted', '', ''),
+('bx_resources_cmts', '_bx_resources_cmts', 'bx_resources', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_resources', 'bx_resources', 'bx_resources', '_bx_resources_search_extended', 1, '', ''),
+('bx_resources_cmts', 'bx_resources_cmts', 'bx_resources', '_bx_resources_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_resources', '_bx_resources', '_bx_resources', 'bx_resources@modules/boonex/resources/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_resources', 'content', '{url_studio}module.php?name=bx_resources', '', 'bx_resources@modules/boonex/resources/|std-icon.svg', '_bx_resources', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 49 - 0
modules/boonex/resources/install/sql/uninstall.sql

@@ -0,0 +1,49 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_resources_entries`, `bx_resources_lists`;
+DROP TABLE IF EXISTS `bx_resources_covers`, `bx_resources_photos_resized`;
+DROP TABLE IF EXISTS `bx_resources_cmts`, `bx_resources_votes`, `bx_resources_votes_track`, `bx_resources_reactions`, `bx_resources_reactions_track`, `bx_resources_views_track`, `bx_resources_reports`, `bx_resources_reports_track`, `bx_resources_scores`, `bx_resources_scores_track`;
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` LIKE 'bx_resources_%';
+DELETE FROM `sys_storage_tokens` WHERE `object` LIKE 'bx_resources_%';
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` LIKE 'bx_resources_%';
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` LIKE 'bx_resources_%';
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` LIKE 'bx_resources_%';
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` LIKE 'bx_resources_%';
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_resources';
+DELETE FROM `sys_form_pre_values` WHERE `Key` LIKE 'bx_resources_%';
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_resources%';
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_resources', 'bx_resources_reactions');
+
+-- SCORES
+DELETE FROM `sys_objects_score` WHERE `name` = 'bx_resources';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_resources';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_resources';
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_resources', 'bx_resources_cmts');
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_resources';
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `twb`, `tpw` 
+USING `sys_std_pages` AS `tp` LEFT JOIN `sys_std_widgets` AS `tw` ON `tp`.`id` = `tw`.`page_id` LEFT JOIN `sys_std_widgets_bookmarks` AS `twb` ON `tw`.`id` = `twb`.`widget_id` LEFT JOIN `sys_std_pages_widgets` AS `tpw` ON `tw`.`id` = `tpw`.`widget_id`
+WHERE  `tp`.`name` = 'bx_resources';

+ 55 - 0
modules/boonex/resources/js/main.js

@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxResourcesMain(oOptions) {
+    this._oOptions = oOptions
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+}
+
+BxResourcesMain.prototype.processList = function (iContextId, iId, oSource) {
+    var $this = this;
+
+    $(window).dolPopupAjax({
+        url: $this._oOptions.sActionUrl + 'process_list_form/' + iContextId + '/' + iId + '/',
+        closeOnOuterClick: false,
+        removeOnClose: true
+    });   
+};
+
+BxResourcesMain.prototype.deleteList = function (iContextId, iListId, oSource) {
+    var $this = this;
+
+    bx_confirm($this._oOptions.t_confirm_block_deletion, function () {
+        $.getJSON($this._oOptions.sActionUrl + 'delete_list/' + iContextId + '/' + iListId + '/', {}, function (oData) {
+            $this.reloadData(oData, iContextId);
+        });
+    });
+};
+
+BxResourcesMain.prototype.processEntry = function (iContextId, iListId, oSource) {
+    var $this = this;
+
+    $(window).dolPopupAjax({
+        url: $this._oOptions.sActionUrl + 'process_entry_form/' + iContextId + '/' + iListId + '/',
+        closeOnOuterClick: false,
+        removeOnClose: true
+    });
+};
+
+BxResourcesMain.prototype.reloadData = function (oData, iContextId) {
+    $(".bx-popup-applied:visible").dolPopupHide();
+
+    loadDynamicBlockAuto($('#' + this._aHtmlIds['lists']), window.location.href);
+};
+
+BxResourcesMain.prototype.reload = function (oData) {
+    $(".bx-popup-applied:visible").dolPopupHide();
+
+    document.location = document.location;
+};

+ 42 - 0
modules/boonex/resources/js/manage_tools.js

@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxResourcesManageTools(oOptions)
+{
+    BxBaseModTextManageTools.call(this, oOptions);
+
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxResourcesManageTools' : oOptions.sObjName;
+}
+
+BxResourcesManageTools.prototype = Object.create(BxBaseModTextManageTools.prototype);
+BxResourcesManageTools.prototype.constructor = BxResourcesManageTools;
+
+BxResourcesManageTools.prototype.onChangeFilter = function(oFilter) {
+    var $this = this;
+    var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
+    var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
+
+    var oFilter2 = $('#bx-grid-filter2-' + this._sObjNameGrid);
+    var sValueFilter2 = oFilter2.length > 0 ? oFilter2.val() : '';
+    
+    var oFilter3 = $('#bx-grid-filter3-' + this._sObjNameGrid);
+    var sValueFilter3 = oFilter3.length > 0 ? oFilter3.val() : '';
+
+    var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
+    var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
+    if(sValueSearch == _t('_sys_grid_search'))
+        sValueSearch = '';
+
+    clearTimeout($this._iSearchTimeoutId);
+    $this._iSearchTimeoutId = setTimeout(function () {
+        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueFilter2 + $this._sParamsDivider + sValueFilter3 + $this._sParamsDivider + sValueSearch, true);
+    }, 500);
+};
+
+/** @} */

+ 17 - 0
modules/boonex/resources/request.php

@@ -0,0 +1,17 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Resources Resources
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+check_logged();
+
+BxBaseModTextRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */

+ 37 - 0
modules/boonex/resources/template/browse_entries.html

@@ -0,0 +1,37 @@
+<div id="__html_id_lists__">
+    <bx_if:allow_add_entry>
+        <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" onclick="__js_object__.processEntry(__context_id__, 0, this)"><bx_text:_bx_resources_txt_entry_add /></a>
+    </bx_if:allow_add_entry>
+    <bx_if:allow_add_list>
+        <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" onclick="__js_object__.processList(__context_id__, 0, this)"><bx_text:_bx_resources_txt_list_add /></a>
+    </bx_if:allow_add_list>
+    <div class="pt-4">
+        <bx_repeat:lists>
+            <div class="bx-def-margin-top bx-def-padding-bottom bx-resources-list" id="__html_id_list__">
+                <div class="bx-def-padding-sec bx-def-color-bg-hl">
+                    <span class="bx-resources-list-title">
+                        <bx_if:allow_edit_list>
+                            <a href="javascript:void(0);" onclick="__js_object__.processList(__context_id__, __list_id__, this)" title="__title__">__title__</a>
+                        </bx_if:allow_edit_list>
+                        <bx_if:deny_edit_list>__title__</bx_if:deny_edit_list>
+                    </span>
+                    <div class="bx-resources-list-actions flex items-center">
+                        <bx_if:allow_add>
+                            <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" onclick="__js_object__.processEntry(__context_id__, __list_id__, this)"><bx_text:_bx_resources_txt_entry_add /></a>
+                        </bx_if:allow_add>
+                        <bx_if:allow_delete_list>
+                            <a class="bx-btn bx-btn-small" href="javascript:void(0);" onclick="__js_object__.deleteList(__context_id__, __list_id__, this)"><i class="sys-icon remove"></i></a>
+                        </bx_if:allow_delete_list>
+                    </div>
+                </div>
+                <bx_repeat:entries>
+                    <div class="bx-def-padding-sec  bx-def-border-bottom  bx-resources-entry">
+                        <a href="__url__" class="bx-resources-entry-name pr-2" title="__title__">__title__ </a>
+                        <span class="bx-entry-badge flex pr-2">__badges__</span>
+                        <span class="bx-def-font-small bx-def-font-grayed pr-2">__created__</span>
+                    </div>
+                </bx_repeat:entries>
+            </div>
+        </bx_repeat:lists>
+    </div>
+</div>

+ 38 - 0
modules/boonex/resources/template/css/main.css

@@ -0,0 +1,38 @@
+/*--- List ---*/
+.bx-resources-list .bx-def-color-bg-hl{
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    align-items: center
+}
+.bx-resources-list-title {
+    font-weight: bold;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: inline-block;
+    max-width: calc(100% - 220px);
+}
+.bx-resources-list .bx-def-border-bottom:last-child{
+    border: none;
+}
+
+/*--- Resource ---*/
+.bx-resources-entry {
+    display: flex;
+    justify-content: space-between;
+    align-items: center
+}
+.bx-resources-entry .bx-badges-list {
+    display: inline-block;
+}
+.bx-resources-entry .bx-resources-entry-name {
+    max-width: 50%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: inline-block;
+}
+.bx-media-desktop .bx-resources-form-cnt {
+    width: 800px;
+}

+ 25 - 0
modules/boonex/resources/template/images/icons/std-icon.svg

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="606px" height="606px" viewBox="0 0 606 606" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
+            <stop stop-color="#984f65" stop-opacity="1" offset="0%"></stop>
+            <stop stop-color="#691c35" stop-opacity="1" offset="100%"></stop>
+        </linearGradient>
+        <path d="M552.268958,552.268958 C600,504.537813 600,431.458333 600,300 C600,168.541667 600,95.4621875 552.268958,47.7310417 C504.537813,0 431.458333,0 300,0 C168.541667,0 95.4621875,0 47.7310417,47.7310417 C0,95.4621875 0,168.541667 0,300 C0,431.458333 0,504.537813 47.7310417,552.268958 C95.4621875,600 168.541667,600 300,600 C431.458333,600 504.537813,600 552.268958,552.268958 Z" id="path-2"></path>
+    </defs>
+    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="una-connect" transform="translate(3.000000, 3.000000)">
+            <g id="Squircle2-Copy-6">
+                <g id="Shape">
+                    <use fill="#FFFFFF" xlink:href="#path-2"></use>
+                    <use stroke="#000000" stroke-width="4.04" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
+                </g>
+            </g>
+            <g>
+                <text x="50%" y="55%" style="text-anchor: middle; fill: #ffffff; stroke: #000000; font-size: 120px;">
+                    Resources
+                </text>
+            </g>
+        </g>
+    </g>
+</svg>

+ 18 - 0
modules/boonex/resources/template/popup_form.html

@@ -0,0 +1,18 @@
+<div class="bx-resources-form">
+    <div class="bx-resources-form-cnt">
+        __form__
+        <script language="javascript">
+            $(document).ready(function () {
+                $("#__form_id__").ajaxForm({ 
+                    dataType: "json",
+                    beforeSubmit: function (formData, jqForm, options) {
+                        bx_loading($("#__form_id__"), true);
+                    },
+                    success: function (data) {
+                        processJsonData(data);
+                    }
+                });
+            });
+        </script>
+    </div>
+</div>

+ 228 - 0
modules/boonex/russian/data/langs/bx_resources/ru.xml

@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+    <string name="_bx_resources"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_cmts"><![CDATA[Ресурсы - Комментарии]]></string>
+    <string name="_bx_resources_reactions"><![CDATA[Ресурсы - Реакции]]></string>
+
+    <string name="_bx_resources_option_enable_auto_approve"><![CDATA[Автоматически активировать ресурс после создания]]></string>
+    <string name="_bx_resources_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к публикациям]]></string>
+    <string name="_bx_resources_option_plain_summary_chars"><![CDATA[Количество символов в описании публикации при отсутствующей картинке публикации]]></string>
+    <string name="_bx_resources_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_resources_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
+    <string name="_bx_resources_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
+    <string name="_bx_resources_option_searchable_fields"><![CDATA[Поля для поиска]]></string>
+    <string name="_bx_resources_option_auto_activation_for_categories"><![CDATA[Автоактивация для категорий]]></string>
+
+    <!-- Forms -->
+    <string name="_bx_resources_form_entry"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_form_entry_display_add"><![CDATA[Добавить ресурс]]></string>
+    <string name="_bx_resources_form_entry_display_edit"><![CDATA[Редактировать ресурс]]></string>
+    <string name="_bx_resources_form_entry_display_delete"><![CDATA[Удалить ресурс]]></string>
+    <string name="_bx_resources_form_entry_display_view"><![CDATA[Просмотреть ресурс]]></string>
+    <string name="_bx_resources_form_entry_input_author"><![CDATA[Автор]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_resources_form_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_publish"><![CDATA[Добавить]]></string>
+    <string name="_bx_resources_form_entry_input_do_publish"><![CDATA[Добавить]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_resources_form_entry_input_do_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_resources_form_entry_input_sys_do_cancel_edit"><![CDATA[Отменить (Форма редактирования)]]></string>
+    <string name="_bx_resources_form_entry_input_do_cancel_edit"><![CDATA[Отменить]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls"><![CDATA[Управление]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls_edit"><![CDATA[Управление (Форма редактирования)]]></string>
+    <string name="_bx_resources_form_entry_input_sys_controls_edit_popup"><![CDATA[Управление (Форма редактирования во всплывающем окне)]]></string>
+    <string name="_bx_resources_form_entry_input_sys_link"><![CDATA[Ссылка]]></string>
+    <string name="_bx_resources_form_entry_input_link"><![CDATA[Ссылка]]></string>
+    <string name="_bx_resources_form_entry_input_link_err"><![CDATA[Ссылка обязательна. Пожалуйста, заполните это поле.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_resources_form_entry_input_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_resources_form_entry_input_title_inf"><![CDATA[Оставьте поле пустым, чтобы использовать ссылку в качестве заголовка.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_resources_form_entry_input_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_resources_form_entry_input_sys_text"><![CDATA[Текст]]></string>
+    <string name="_bx_resources_form_entry_input_text"><![CDATA[Текст]]></string>
+    <string name="_bx_resources_form_entry_input_text_err"><![CDATA[Поле для Текста не может быть пустым]]></string>
+    <string name="_bx_resources_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm"><![CDATA[Я уверен(а), что хочу удалить этот ресурс]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+    <string name="_bx_resources_form_entry_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить ресурс]]></string>
+    <string name="_bx_resources_form_entry_input_sys_covers"><![CDATA[Изображение]]></string>
+    <string name="_bx_resources_form_entry_input_covers"><![CDATA[Изображение]]></string>
+    <string name="_bx_resources_form_entry_input_covers_uploader_html5_title"><![CDATA[Загрузить]]></string>
+    <string name="_bx_resources_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_resources_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_resources_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_resources_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_resources_form_entry_input_sys_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_resources_form_entry_input_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_resources_form_entry_input_date_published_info"><![CDATA[Оставьте пустым, чтобы опубликовать немедленно.]]></string>
+    <string name="_bx_resources_form_entry_input_sys_allow_comments"><![CDATA[Разрешить комментарии]]></string>
+    <string name="_bx_resources_form_entry_input_allow_comments"><![CDATA[Разрешить комментарии]]></string>
+
+    <string name="_bx_resources_form_list_entry"><![CDATA[Списки ресурсов]]></string>
+    <string name="_bx_resources_form_list_entry_display_add"><![CDATA[Добавить список ресурсов]]></string>
+    <string name="_bx_resources_form_list_entry_display_edit"><![CDATA[Редактировать список ресурсов]]></string>
+    <string name="_bx_resources_form_list_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_resources_form_list_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_resources_form_list_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_resources_form_list_entry_input_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_resources_form_list_entry_input_title_err"><![CDATA[Заголовок обязателен. Пожалуйста, заполните это поле]]></string>
+
+    <!-- ACL -->
+    <string name="_bx_resources_acl_action_create_entry"><![CDATA[Создать ресурс]]></string>
+    <string name="_bx_resources_acl_action_delete_entry"><![CDATA[Удалить ресурс]]></string>
+    <string name="_bx_resources_acl_action_view_entry"><![CDATA[Просмотреть ресурс]]></string>
+    <string name="_bx_resources_acl_action_edit_any_entry"><![CDATA[Редактировать любой ресурс]]></string>
+    <string name="_bx_resources_acl_action_delete_any_entry"><![CDATA[Удалять любое ресурс]]></string>
+
+    <!-- Pages -->
+    <string name="_bx_resources_page_title_sys_create_entry"><![CDATA[Новый ресурс]]></string>
+    <string name="_bx_resources_page_title_create_entry"><![CDATA[Новый ресурс]]></string>
+    <string name="_bx_resources_page_block_title_create_entry"><![CDATA[Новый ресурс]]></string>
+    <string name="_bx_resources_page_title_sys_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_page_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_page_block_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_page_title_sys_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_page_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_page_block_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_page_title_sys_view_entry"><![CDATA[Просмотреть ресурс]]></string>
+    <string name="_bx_resources_page_title_view_entry"><![CDATA[{title}]]></string>
+    <string name="_bx_resources_page_block_title_entry_text"><![CDATA[Текст ресурса]]></string>
+    <string name="_bx_resources_page_title_browse"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_page_title_search_results"><![CDATA[Ресурсы, соответствующие "{0}"]]></string>
+    <string name="_bx_resources_page_title_browse_by_author"><![CDATA[Ресурсы от {display_name}]]></string>
+    <string name="_bx_resources_page_title_browse_by_context"><![CDATA[Ресурсы в {display_name}]]></string>
+    <string name="_bx_resources_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_resources_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_resources_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_resources_page_block_title_sys_entry_comments"><![CDATA[Активность]]></string>
+    <string name="_bx_resources_page_block_title_entry_comments"><![CDATA[Активность ({0})]]></string>
+    <string name="_bx_resources_page_block_title_entry_reports"><![CDATA[Жалобы]]></string>
+    <string name="_bx_resources_page_block_title_entry_comments_link"><![CDATA[Активность в <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_resources_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_resources_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_resources_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_resources_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_resources_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_resources_page_block_title_search_form_cmts"><![CDATA[Форма поиска активности]]></string>
+    <string name="_bx_resources_page_block_title_search_results_cmts"><![CDATA[Результаты поиска активности]]></string>
+    <string name="_bx_resources_page_title_sys_view_entry_comments"><![CDATA[Комментарии к ресурсу]]></string>
+    <string name="_bx_resources_page_title_view_entry_comments"><![CDATA[Активность в {title}]]></string>
+    <string name="_bx_resources_page_title_sys_entries_of_author"><![CDATA[Ресурсы автора]]></string>
+    <string name="_bx_resources_page_title_entries_of_author"><![CDATA[Ресурсы от {display_name}]]></string>
+    <string name="_bx_resources_page_title_sys_entries_in_context"><![CDATA[Ресурсы в контексте]]></string>
+    <string name="_bx_resources_page_title_entries_in_context"><![CDATA[Ресурсы в {display_name}]]></string>
+    <string name="_bx_resources_page_block_title_entries_of_author"><![CDATA[Ресурсы от  <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_resources_page_block_title_sys_entries_of_author"><![CDATA[Ресурсы от автора]]></string>
+    <string name="_bx_resources_page_block_title_entries_in_context"><![CDATA[Ресурсы в <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_resources_page_block_title_sys_entries_in_context"><![CDATA[Ресурсы в контексте]]></string>
+    <string name="_bx_resources_page_block_title_entries_actions"><![CDATA[Ресурсы - Действия]]></string>
+    <string name="_bx_resources_page_block_title_browse_cmts"><![CDATA[Ресурсы - Комментарии]]></string>
+    <string name="_bx_resources_page_title_sys_manage"><![CDATA[Управление собственными ресурсами]]></string>
+    <string name="_bx_resources_page_title_sys_manage_administration"><![CDATA[Управление всеми ресурсами]]></string>
+    <string name="_bx_resources_page_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_resources_page_block_title_system_manage"><![CDATA[Управление собственными ресурсами]]></string>
+    <string name="_bx_resources_page_block_title_system_manage_administration"><![CDATA[Управление всеми ресурсами]]></string>
+    <string name="_bx_resources_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_resources_page_block_title_popular_keywords"><![CDATA[Популярные хэштеги]]></string>
+    <string name="_bx_resources_page_block_title_cats"><![CDATA[Ресурсы - Категории]]></string>
+    <string name="_bx_resources_page_block_title_entry_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_resources_page_block_title_my_entries"><![CDATA[Мои ресурсы]]></string>
+    <string name="_bx_resources_page_block_title_sys_entry_context"><![CDATA[Опубликовано в]]></string>
+    <string name="_bx_resources_page_block_title_entry_context"><![CDATA[Опубликовано в]]></string>
+
+    <!-- Menus -->
+    <string name="_bx_resources_menu_set_title_view_entry"><![CDATA[Ресурс - Действия]]></string>
+    <string name="_bx_resources_menu_title_view_entry"><![CDATA[Ресурс - Действия]]></string>
+    <string name="_bx_resources_menu_title_submenu"><![CDATA[Ресурсы - Подменю]]></string>
+    <string name="_bx_resources_menu_set_title_submenu"><![CDATA[Ресурсы - Подменю]]></string>
+    <string name="_bx_resources_menu_item_title_system_create_entry"><![CDATA[Ресурс]]></string>
+    <string name="_bx_resources_menu_item_title_create_entry"><![CDATA[Ресурс]]></string>
+    <string name="_bx_resources_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_menu_item_title_system_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_menu_item_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entry"><![CDATA[Просмотреть ресурс]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_home"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_entries_home"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_resources_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_resources_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_resources_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_resources_menu_title_view_entry_submenu"><![CDATA[Просмотреть ресурс - Подменю]]></string>
+    <string name="_bx_resources_menu_set_title_view_entry_submenu"><![CDATA[Просмотреть ресурс - Подменю]]></string>
+    <string name="_bx_resources_menu_item_title_view_entry_submenu_entry"><![CDATA[Ресурс]]></string>
+    <string name="_bx_resources_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entry_comments"><![CDATA[Комментарии к ресурсу]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entries_author"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_view_entries_author"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_system_view_entries_in_context"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_view_entries_in_context"><![CDATA[Ресурсы]]></string>
+    <string name="_bx_resources_menu_title_entries_my"><![CDATA[Мои ресурсы  - Меню действий]]></string>
+    <string name="_bx_resources_menu_set_title_entries_my"><![CDATA[Мои ресурсы Меню]]></string>
+    <string name="_bx_resources_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю элемента]]></string>
+    <string name="_bx_resources_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю элемента]]></string>
+    <string name="_bx_resources_menu_item_title_manage_my"><![CDATA[Мои ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_manage_all"><![CDATA[Все ресурсы]]></string>
+    <string name="_bx_resources_menu_title_manage_tools_submenu"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_resources_menu_set_title_manage_tools_submenu"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_entries_common"><![CDATA[Мои ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_entries_administration"><![CDATA[Все ресурсы]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_time_common"><![CDATA[Моё время]]></string>
+    <string name="_bx_resources_menu_item_title_mt_submenu_time_administration"><![CDATA[Всё время]]></string>
+
+    <!-- Grids -->
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_select_one_filter3"><![CDATA[Все модули]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+    <string name="_bx_resources_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
+    <string name="_bx_resources_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_resources_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_resources_grid_column_title_adm_context_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_resources_grid_action_title_adm_audit_content"><![CDATA[Аудит действий]]></string>
+    <string name="_bx_resources_grid_column_title_adm_added"><![CDATA[Добавленные]]></string>
+    <string name="_bx_resources_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_resources_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_resources_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_resources_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_resources_grid_action_title_adm_audit_content"><![CDATA[Аудит действий]]></string>
+    <string name="_bx_resources_grid_action_title_adm_clear_reports"><![CDATA[Очистить жалобы]]></string>
+    <string name="_bx_resources_grid_column_title_adm_status_admin"><![CDATA[Модерация]]></string>
+    <string name="_bx_resources_grid_action_err_delete"><![CDATA[Невозможно удалить выбранную(ные) публикацию(ции).]]></string>
+    <string name="_bx_resources_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+
+    <string name="_bx_resources_chart_growth"><![CDATA[Tasks: Growth]]></string>
+    <string name="_bx_resources_chart_growth_speed"><![CDATA[Tasks: Growth Speed]]></string>
+
+    <string name="_bx_resources_search_extended"><![CDATA[Ресурсы - Поиск]]></string>
+    <string name="_bx_resources_search_extended_cmts"><![CDATA[Комментарии к ресурсам - Поиск]]></string>
+
+    <string name="_bx_resources_pre_lists_cats"><![CDATA[Категории ресурсов]]></string>
+    <string name="_bx_resources_cat_links"><![CDATA[Линки]]></string>
+    <string name="_bx_resources_cat_media"><![CDATA[Медиа]]></string>
+    <string name="_bx_resources_cat_other"><![CDATA[Другое]]></string>
+
+    <string name="_bx_resources_txt_all_entries_in"><![CDATA[<a href="{0}">Все ресурсы в {1} ({2})</a>]]></string>
+    <string name="_bx_resources_txt_all_entries_by"><![CDATA[{0} ресурсов]]></string>
+    <string name="_bx_resources_txt_sample_single"><![CDATA[ресурс]]></string>
+    <string name="_bx_resources_txt_sample_single_with_article"><![CDATA[ресурс]]></string>
+    <string name="_bx_resources_txt_sample_comment_single"><![CDATA[комментарий к ресурсу]]></string>
+    <string name="_bx_resources_txt_sample_vote_single"><![CDATA[голос за ресурс]]></string>
+    <string name="_bx_resources_txt_sample_reaction_single"><![CDATA[реакция '{0}' к ресурсу]]></string>
+    <string name="_bx_resources_txt_sample_score_up_single"><![CDATA[голос за ресурс]]></string>
+    <string name="_bx_resources_txt_sample_score_down_single"><![CDATA[голос против ресурса]]></string>
+    <string name="_bx_resources_txt_scheduled_awaiting"><![CDATA[Дата публикации:  {date_publish_uf}]]></string>
+    <string name="_bx_resources_txt_list_default"><![CDATA[Список по умолчанию]]></string>
+    <string name="_bx_resources_txt_list_add"><![CDATA[Добавить список]]></string>
+    <string name="_bx_resources_txt_entry_add"><![CDATA[Добавить ресурс]]></string>
+    <string name="_bx_resources_txt_title_empty"><![CDATA[Без заголовка]]></string>
+
+    <string name="_bx_resources_txt_err_cannot_perform_action"><![CDATA[Невозможно выполнить действие. Пожалуйста, оповестите нас об этой проблеме.]]></string>
+    <string name="_bx_resources_txt_msg_status_hidden"><![CDATA[Данный ресурс был скрыт.]]></string>
+    <string name="_bx_resources_txt_msg_status_pending"><![CDATA[Данный ресурс ожидает утверждения.]]></string>
+    <string name="_bx_resources_txt_msg_confirm_list_deletion"><![CDATA[Вы удалите все ресурсы, которые содержатся в этом списке. Вы уверены?]]></string>
+</resources>