Browse Source

Merge branch 'master' of https://github.com/unaio/una

AntonLV 9 years ago
parent
commit
654ffa18d8
48 changed files with 684 additions and 136 deletions
  1. 17 8
      inc/classes/BxDolPrivacy.php
  2. 1 0
      install/classes/BxDolInstallSiteConfig.php
  3. 1 0
      install/patterns/header.inc.php
  4. 3 1
      modules/base/general/classes/BxBaseModGeneralFormEntry.php
  5. 20 1
      modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php
  6. 17 0
      modules/base/groups/classes/BxBaseModGroupsModule.php
  7. 4 1
      modules/base/text/classes/BxBaseModTextModule.php
  8. 4 4
      modules/base/text/classes/BxBaseModTextTemplate.php
  9. 8 0
      modules/base/text/template/unit_full_private.html
  10. 10 0
      modules/base/text/template/unit_gallery_private.html
  11. 2 1
      modules/boonex/albums/classes/BxAlbumsSearchResultMedia.php
  12. 1 0
      modules/boonex/albums/install/langs/en.xml
  13. 2 1
      modules/boonex/albums/install/sql/enable.sql
  14. 3 0
      modules/boonex/albums/template/unit_gallery_private.html
  15. 6 0
      modules/boonex/albums/template/unit_media_private.html
  16. 3 1
      modules/boonex/files/classes/BxFilesConfig.php
  17. 20 0
      modules/boonex/files/classes/BxFilesCronProcessData.php
  18. 18 0
      modules/boonex/files/classes/BxFilesDb.php
  19. 22 2
      modules/boonex/files/classes/BxFilesFormEntry.php
  20. 23 2
      modules/boonex/files/classes/BxFilesFormUpload.php
  21. 18 1
      modules/boonex/files/classes/BxFilesFormsEntryHelper.php
  22. 4 0
      modules/boonex/files/classes/BxFilesMenu.php
  23. 91 0
      modules/boonex/files/classes/BxFilesModule.php
  24. 65 0
      modules/boonex/files/classes/BxFilesPrivacy.php
  25. 4 2
      modules/boonex/files/classes/BxFilesSearchResult.php
  26. 1 1
      modules/boonex/files/classes/BxFilesTemplate.php
  27. 1 0
      modules/boonex/files/data/.htaccess
  28. BIN
      modules/boonex/files/data/tika-app.jar
  29. 5 3
      modules/boonex/files/install/config.php
  30. 24 39
      modules/boonex/files/install/langs/en.xml
  31. 5 1
      modules/boonex/files/install/sql/disable.sql
  32. 26 20
      modules/boonex/files/install/sql/enable.sql
  33. 28 42
      modules/boonex/files/install/sql/install.sql
  34. 3 0
      modules/boonex/files/template/unit_full_private.html
  35. 3 0
      modules/boonex/files/template/unit_gallery_private.html
  36. 6 1
      modules/boonex/files/template/unit_live_search.html
  37. 3 0
      modules/boonex/market/template/unit_full_private.html
  38. 3 0
      modules/boonex/market/template/unit_gallery_private.html
  39. 3 0
      modules/boonex/polls/template/unit_full_private.html
  40. 3 0
      modules/boonex/polls/template/unit_gallery_private.html
  41. 1 0
      modules/boonex/posts/install/langs/en.xml
  42. 2 1
      modules/boonex/posts/install/sql/enable.sql
  43. 3 0
      modules/boonex/posts/template/unit_full_private.html
  44. 3 0
      modules/boonex/posts/template/unit_gallery_private.html
  45. 1 0
      modules/boonex/russian/data/langs/bx_albums/ru.xml
  46. 2 2
      modules/boonex/russian/data/langs/bx_convos/ru.xml
  47. 189 0
      modules/boonex/russian/data/langs/bx_files/ru.xml
  48. 2 1
      modules/boonex/russian/data/langs/bx_posts/ru.xml

+ 17 - 8
inc/classes/BxDolPrivacy.php

@@ -128,14 +128,7 @@ class BxDolPrivacy extends BxDolFactory implements iBxDolFactoryObject
         if(empty($sValue))
             $sValue = $oPrivacy->_oDb->getDefaultGroup($sModule, $sAction);
 
-        $aValues = array();
-        $aGroups = $oPrivacy->_oDb->getGroupsBy(array('type' => 'active'));
-        foreach($aGroups as $aGroup) {
-            if((int)$aGroup['active'] == 0)
-               continue;
-
-            $aValues[] = array('key' => $aGroup['id'], 'value' => _t($aGroup['title']));
-        }
+        $aValues = $oPrivacy->getGroups();
 
         if(isset($aParams['dynamic_groups']) && is_array($aParams['dynamic_groups']))
             $aValues = array_merge($aValues, $aParams['dynamic_groups']);
@@ -334,6 +327,22 @@ class BxDolPrivacy extends BxDolFactory implements iBxDolFactoryObject
     {
         return false;
     }
+
+    /**
+     * get privacy groups for getGroupChooser
+     */ 
+    protected function getGroups() 
+    {
+        $aValues = array();
+        $aGroups = $this->_oDb->getGroupsBy(array('type' => 'active'));
+        foreach($aGroups as $aGroup) {
+            if((int)$aGroup['active'] == 0)
+               continue;
+
+            $aValues[] = array('key' => $aGroup['id'], 'value' => _t($aGroup['title']));
+        }
+        return $aValues;
+    }
 }
 
 /** @} */

+ 1 - 0
install/classes/BxDolInstallSiteConfig.php

@@ -454,6 +454,7 @@ EOF;
         $aMarkers['time'] = time();
         $aMarkers['secret'] = genRndPwd(11);
         $aMarkers['ffmpeg_path'] = $aMarkers['root_dir'] . 'plugins/ffmpeg/ffmpeg.exe';
+        $aMarkers['java_path'] = trim(`whereis java`);
 
         return $aMarkers;
     }

+ 1 - 0
install/patterns/header.inc.php

@@ -13,6 +13,7 @@ define('BX_DATABASE_USER', '%DB_USER%'); ///< db user
 define('BX_DATABASE_PASS', '%DB_PASSWORD%'); ///< db password
 define('BX_DATABASE_NAME', '%DB_NAME%'); ///< db name
 
+define('BX_SYSTEM_JAVA', '%JAVA_PATH%'); ///< path to java binary
 define('BX_SYSTEM_FFMPEG', '%FFMPEG_PATH%'); ///< path to ffmpeg binary
 define('BX_DOL_SECRET', '%SECRET%'); ///< secret word
 

+ 3 - 1
modules/base/general/classes/BxBaseModGeneralFormEntry.php

@@ -143,8 +143,10 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
         foreach ($aGhostFiles as $aFile) {
             if (is_array($mixedFileIds) && !in_array($aFile['id'], $mixedFileIds))
                 continue;
+
             if ($aFile['private'])
-                $oStorage->setFilePrivate ($aFile['id'], 0);
+                $oStorage->setFilePrivate ($aFile['id'], 1);
+            
             if ($iContentId)
                 $this->_associalFileWithContent($oStorage, $aFile['id'], $iProfileId, $iContentId, $sFieldFile);
         }

+ 20 - 1
modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php

@@ -107,7 +107,14 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
         $this->_oModule->checkAllowedAdd(true);
 
         // redirect
-        $this->_redirectAndExit('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId);
+        list ($oProfile, $aContentInfo) = $this->_getProfileAndContentData($iContentId);
+        $this->redirectAfterAdd($aContentInfo);
+    }
+    
+    protected function redirectAfterAdd($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        $this->_redirectAndExit('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
     }
 
     public function editDataForm ($iContentId, $sDisplay = false)
@@ -159,6 +166,12 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
         $this->_oModule->checkAllowedEdit($aContentInfo, true);
 
         // redirect
+        $this->redirectAfterEdit($aContentInfo);
+    }
+
+    protected function redirectAfterEdit($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
         $this->_redirectAndExit('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
     }
 
@@ -195,6 +208,12 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
         $this->_oModule->checkAllowedDelete($aContentInfo, true);
 
         // redirect
+        $this->redirectAfterDelete($aContentInfo);
+    }
+
+    protected function redirectAfterDelete($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
         $this->_redirectAndExit($CNF['URL_HOME'], true, array(
             'account_id' => getLoggedId(),
             'profile_id' => bx_get_logged_profile_id(),

+ 17 - 0
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -40,6 +40,23 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
         return false;
     }
 
+    /**
+     * Check if this module is group profile
+     */
+    public function serviceIsGroupProfile ()
+    {
+        return true;
+    }
+
+    /**
+     * check if provided profile is member if the group 
+     */ 
+    public function serviceIsFan ($iGroupProfileId, $iProfileId = false) 
+    {
+        $oGroupProfile = BxDolProfile::getInstance($iGroupProfileId);
+        return $this->isFan($oGroupProfile->getContentId(), $iProfileId);
+    }
+
     /**
      * Delete profile from fans and admins tables
      * @param $iProfileId profile id 

+ 4 - 1
modules/base/text/classes/BxBaseModTextModule.php

@@ -130,7 +130,10 @@ class BxBaseModTextModule extends BxBaseModGeneralModule
     {
         if (!$iProfileId)
             $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
-        if (!$iProfileId || $iProfileId != $this->_iProfileId)
+        if (!$iProfileId || !($oProfile = BxDolProfile::getInstance($iProfileId)))
+            return false;
+
+        if ($iProfileId != $this->_iProfileId)
             return false;
 
         $oMenu = BxTemplMenu::getObjectInstance($this->_oConfig->CNF['OBJECT_MENU_ACTIONS_MY_ENTRIES']);

+ 4 - 4
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -21,7 +21,7 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
 
     function unit ($aData, $isCheckPrivateContent = true, $sTemplateName = 'unit.html', $aParams = array())
     {
-    	$sResult = $this->checkPrivacy ($aData, $isCheckPrivateContent, $this->getModule());
+    	$sResult = $this->checkPrivacy ($aData, $isCheckPrivateContent, $this->getModule(), $sTemplateName);
     	if($sResult)
             return $sResult;
 
@@ -101,13 +101,13 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
         ));
     }
 
-    protected function checkPrivacy ($aData, $isCheckPrivateContent, $oModule)
+    protected function checkPrivacy ($aData, $isCheckPrivateContent, $oModule, $sTemplateName = '')
     {
         if ($isCheckPrivateContent && CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = $oModule->checkAllowedView($aData))) {
             $aVars = array (
                 'summary' => $sMsg,
             );
-            return $this->parseHtmlByName('unit_private.html', $aVars);
+            return $this->parseHtmlByName($sTemplateName ? str_replace('.html', '_private.html', $sTemplateName) : 'unit_private.html', $aVars);
         }
 
         return '';
@@ -152,7 +152,7 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
         // get summary
         $sLinkMore = ' <a title="' . bx_html_attribute(_t('_sys_read_more', $aData[$CNF['FIELD_TITLE']])) . '" href="' . $sUrl . '"><i class="sys-icon ellipsis-h"></i></a>';
         $sSummary = strmaxtextlen($aData[$CNF['FIELD_TEXT']], (int)getParam($CNF['PARAM_CHARS_SUMMARY']), $sLinkMore);
-        $sSummaryPlain = BxTemplFunctions::getInstance()->getStringWithLimitedLength(strip_tags($sSummary), (int)getParam($CNF['PARAM_CHARS_SUMMARY_PLAIN']));
+        $sSummaryPlain = isset($CNF['PARAM_CHARS_SUMMARY_PLAIN']) && $CNF['PARAM_CHARS_SUMMARY_PLAIN'] ? BxTemplFunctions::getInstance()->getStringWithLimitedLength(strip_tags($sSummary), (int)getParam($CNF['PARAM_CHARS_SUMMARY_PLAIN'])) : '';
 
         $sText = $aData[$CNF['FIELD_TEXT']];
         if (!empty($CNF['OBJECT_METATAGS'])) {

+ 8 - 0
modules/base/text/template/unit_full_private.html

@@ -0,0 +1,8 @@
+
+<div class="bx-base-text-unit bx-base-text-unit-ext bx-def-margin-bottom">
+    <h1 class="bx-def-padding-sec-top"><a href="__content_url__"><bx_text:_sys_private /></a></h1>
+    <div class="bx-base-text-unit-info bx-def-margin-sec-top">
+        <span class="bx-def-font-grayed">__summary__</span>
+    </div>
+</div>
+

+ 10 - 0
modules/base/text/template/unit_gallery_private.html

@@ -0,0 +1,10 @@
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec bx-def-margin-sec-bottom">
+	<div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
+		<div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
+			<h2><bx_text:_sys_private /></h2>
+		    <div class="bx-base-text-unit-info">
+		        <span class="bx-def-font-grayed">__summary__</span>
+		    </div>
+		</div>
+	</div>
+</div>

+ 2 - 1
modules/boonex/albums/classes/BxAlbumsSearchResultMedia.php

@@ -179,12 +179,13 @@ class BxAlbumsSearchResultMedia extends BxBaseModTextSearchResult
     {
         return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->oModule->_oConfig->CNF['URI_VIEW_MEDIA'] . '&id=' . $a['id']);
     }
-
+/*
     function displaySearchUnit ($aData)
     {
         $oMain = $this->getMain();
         return $oMain->_oTemplate->unit($aData, $this->bProcessPrivateContent, $this->_bLiveSearch ? $this->sUnitTemplateLiveSearch : $this->sUnitTemplate, $this->aUnitParams);
     }
+*/
 }
 
 /** @} */

+ 1 - 0
modules/boonex/albums/install/langs/en.xml

@@ -9,6 +9,7 @@
 	<string name="_bx_albums_option_summary_chars"><![CDATA[Number of characters in auto-cropped album summary]]></string>
 	<string name="_bx_albums_option_plain_summary_chars"><![CDATA[Number of characters in plain album description when album hasn't thumb]]></string>
 	<string name="_bx_albums_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_albums_option_per_page_profile"><![CDATA[Number of items per page on profile page]]></string>
 	<string name="_bx_albums_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
 	<string name="_bx_albums_option_searchable_fields"><![CDATA[Searchable fields]]></string>
 

+ 2 - 1
modules/boonex/albums/install/sql/enable.sql

@@ -14,6 +14,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_albums_summary_chars', '700', @iCategId, '_bx_albums_option_summary_chars', 'digit', '', '', '', 1),
 ('bx_albums_plain_summary_chars', '200', @iCategId, '_bx_albums_option_plain_summary_chars', 'digit', '', '', '', 2),
 ('bx_albums_per_page_browse', '12', @iCategId, '_bx_albums_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_albums_per_page_profile', '3', @iCategId, '_bx_albums_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_albums_rss_num', '10', @iCategId, '_bx_albums_option_rss_num', 'digit', '', '', '', 20),
 ('bx_albums_searchable_fields', 'title,text', @iCategId, '_bx_albums_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_albums";s:6:"method";s:21:"get_searchable_fields";}', 30);
 
@@ -141,7 +142,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 -- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
 SET @iPBCellProfile = 3;
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_albums', '_bx_albums_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_albums";s:6:"method";s:13:"browse_author";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 0, 0);
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_albums', '_bx_albums_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_albums";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:26:"bx_albums_per_page_profile";}}}', 0, 0, 0);
 
 -- PAGE: service blocks
 SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);

+ 3 - 0
modules/boonex/albums/template/unit_gallery_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />
+

+ 6 - 0
modules/boonex/albums/template/unit_media_private.html

@@ -0,0 +1,6 @@
+
+<div class="bx-albums-media-wrapper bx-def-box bx-def-color-bg-box bx-def-margin-thd-right bx-def-margin-thd-bottom" style="float:left;">
+    <div class="bx-albums-unit-size"></div>
+    <div class="bx-albums-media-caption bx-def-margin-sec-topbottom bx-def-margin-leftright"><bx_text:_sys_private /></div>
+    <div class="bx-albums-media-actions bx-def-margin-sec-bottom bx-def-margin-leftright"></div>
+</div>

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

@@ -36,6 +36,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             'FIELD_AUTHOR' => 'author',
             'FIELD_ADDED' => 'added',
             'FIELD_CHANGED' => 'changed',
+            'FIELD_FILE_ID' => 'file_id',
             'FIELD_TITLE' => 'title',
             'FIELD_CATEGORY' => 'cat',
             'FIELD_TEXT' => 'desc',
@@ -51,6 +52,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-file',
             'URI_AUTHOR_ENTRIES' => 'files-author',
+            'URI_GROUP_ENTRIES' => 'group-files',
             'URI_ADD_ENTRY' => 'create-file',
         	'URI_EDIT_ENTRY' => 'edit-file',
         	'URI_MANAGE_COMMON' => 'files-manage',
@@ -63,7 +65,7 @@ class BxFilesConfig extends BxBaseModTextConfig
 
             // some params
             'PARAM_CHARS_SUMMARY' => 'bx_files_summary_chars',
-            'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_files_plain_summary_chars',
+            'PARAM_CHARS_SUMMARY_PLAIN' => '',
             'PARAM_NUM_RSS' => 'bx_files_rss_num',
         	'PARAM_SEARCHABLE_FIELDS' => 'bx_files_searchable_fields',
 

+ 20 - 0
modules/boonex/files/classes/BxFilesCronProcessData.php

@@ -0,0 +1,20 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Files Files
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxFilesCronProcessData extends BxDolCron
+{
+    function processing()
+    {
+        BxDolService::call('bx_files', 'process_files_data', array(3));
+    }
+}
+
+/** @} */

+ 18 - 0
modules/boonex/files/classes/BxFilesDb.php

@@ -24,6 +24,24 @@ class BxFilesDb extends BxBaseModTextDb
         $sQuery = $this->prepare ("SELECT `c`.`title` FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` AS `c` INNER JOIN `sys_storage_ghosts` AS `g` ON(`g`.`object` = ? AND `g`.`content_id` = `c`.`id`) WHERE `g`.`id` = ?", $this->_oConfig->CNF['TABLE_FILES'], $iFileId);
         return $this->getOne($sQuery);
     }
+
+    public function updateFileId ($iContentId, $iFileId)
+    {
+        $sQuery = $this->prepare ("UPDATE `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` SET `file_id` = ?, `data` = '', `data_processed` = 0 WHERE `id` = ?", $iFileId, $iContentId);
+        return $this->query($sQuery);
+    }
+    
+    public function updateFileData ($iContentId, $sData, $iDataProcessed = 1)
+    {
+        $sQuery = $this->prepare ("UPDATE `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` SET `data` = ?, `data_processed` = ? WHERE `id` = ?", $sData, $iDataProcessed, $iContentId);
+        return $this->query($sQuery);
+    }
+
+    public function getNotProcessedFiles ($iLimit)
+    {
+        $sQuery = $this->prepare ("SELECT * FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` WHERE `data_processed` = 0 ORDER BY `added` ASC LIMIT ?", $iLimit);
+        return $this->getAll($sQuery);
+    }
 }
 
 /** @} */

+ 22 - 2
modules/boonex/files/classes/BxFilesFormEntry.php

@@ -21,9 +21,29 @@ class BxFilesFormEntry extends BxBaseModTextFormEntry
 
         $CNF = &$this->_oModule->_oConfig->CNF;
         
-        if (isset($this->aInputs[$CNF['FIELD_PHOTO']])) {
+        if (isset($this->aInputs[$CNF['FIELD_PHOTO']]))
             $this->aInputs[$CNF['FIELD_PHOTO']]['multiple'] = false;
-        }
+
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if (isset($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']]) && $oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) {
+
+            $aSave = array('db' => array('pass' => 'Xss'));
+            array_walk($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']], function ($a, $k, $aSave) {
+                if (in_array($k, array('info', 'caption', 'value')))
+                    $aSave[0][$k] = $a;
+            }, array(&$aSave));
+            
+            $aGroupChooser = $oPrivacy->getGroupChooser($CNF['OBJECT_PRIVACY_VIEW']);
+            
+            $this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']] = array_merge($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']], $aGroupChooser, $aSave);
+		}
+    }
+
+    protected function _associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField = '')
+    {
+        parent::_associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField);
+
+        $this->_oModule->_oDb->updateFileId($iContentId, $iFileId);
     }
 }
 

+ 23 - 2
modules/boonex/files/classes/BxFilesFormUpload.php

@@ -20,6 +20,23 @@ class BxFilesFormUpload extends BxBaseModTextFormEntry
         parent::__construct($aInfo, $oTemplate);
 
         $this->_sGhostTemplate = 'form_ghost_template_upload.html';
+
+        if (isset($this->aInputs['profile_id']))
+            $this->aInputs['profile_id']['value'] = bx_get('profile_id');
+
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if (isset($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']]) && $oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) {
+
+            $aSave = array('db' => array('pass' => 'Xss'));
+            array_walk($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']], function ($a, $k, $aSave) {
+                if (in_array($k, array('info', 'caption', 'value')))
+                    $aSave[0][$k] = $a;
+            }, array(&$aSave));
+            
+            $aGroupChooser = $oPrivacy->getGroupChooser($CNF['OBJECT_PRIVACY_VIEW']);
+            
+            $this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']] = array_merge($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']], $aGroupChooser, $aSave);
+		}
     }
 
     public function insert ($aValsToAdd = array(), $isIgnore = false)
@@ -55,7 +72,7 @@ class BxFilesFormUpload extends BxBaseModTextFormEntry
         // get values form main form to pass it to each file later
         $aFormValues = array();
         foreach ($this->aInputs as $aInput) {
-            if ($aInput['name'] && isset($aInput['value']) && $aInput['value'] && !is_array($aInput['value']) && $aInput['name'] != 'do_submit' && $aInput['name'] != $CNF['FIELD_PHOTO'])
+            if ($aInput['name'] && isset($aInput['value']) && $aInput['value'] && !is_array($aInput['value']) && $aInput['name'] != 'do_submit' && $aInput['name'] != $CNF['FIELD_PHOTO'] && $aInput['name'] != 'profile_id')
                 $aFormValues[$aInput['name']] = $aInput['value'];//$this->getCleanValue($aInput['name']);
         }
 
@@ -66,7 +83,11 @@ class BxFilesFormUpload extends BxBaseModTextFormEntry
 
             $iContentId = 0;
             if ($isAssociateWithContent)
-                $iContentId = BxBaseModGeneralFormEntry::insert (array_merge(array($CNF['FIELD_TITLE'] => $this->getCleanValue('title-' . $aFile['id'])), $aFormValues));
+                $iContentId = BxBaseModGeneralFormEntry::insert (array_merge(array(
+                    $CNF['FIELD_FILE_ID'] => $aFile['id'],
+                    $CNF['FIELD_TITLE'] => $this->getCleanValue('title-' . $aFile['id']),
+                    $CNF['FIELD_AUTHOR'] => bx_get('profile_id') && $this->_oModule->serviceIsAllowedAddContentToProfile(bx_get('profile_id')) ? bx_get('profile_id') : '',
+                ), $aFormValues));
             if (!$iContentId)
                 continue;
             $aContentIds[] = $iContentId;

+ 18 - 1
modules/boonex/files/classes/BxFilesFormsEntryHelper.php

@@ -62,7 +62,24 @@ class BxFilesFormsEntryHelper extends BxBaseModTextFormsEntryHelper
         }
 
         // redirect
-        $this->_redirectAndExit('page.php?i=' . $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id=' . bx_get_logged_profile_id());
+        $iContentId = array_pop($aContentIds);
+        $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
+        $oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
+        $sUri = BxDolService::call($oProfile->getModule(), 'is_group_profile') ? $CNF['URI_GROUP_ENTRIES'] . '&profile_id=' . $oProfile->id() : $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id=' . bx_get_logged_profile_id();
+        $this->_redirectAndExit('page.php?i=' . $sUri);
+    }
+
+    protected function redirectAfterDelete($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        $oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
+        if (BxDolService::call($oProfile->getModule(), 'is_group_profile'))
+            $this->_redirectAndExit('page.php?i=' . $CNF['URI_GROUP_ENTRIES'] . '&profile_id=' . $oProfile->id());
+        else
+            $this->_redirectAndExit($CNF['URL_HOME'], true, array(
+                'account_id' => getLoggedId(),
+                'profile_id' => bx_get_logged_profile_id(),
+            ));
     }
 }
 

+ 4 - 0
modules/boonex/files/classes/BxFilesMenu.php

@@ -18,6 +18,10 @@ class BxFilesMenu extends BxBaseModTextMenu
     {
         $this->MODULE = 'bx_files';
         parent::__construct($aObject, $oTemplate);
+
+        $iProfileId = (int)bx_get('profile_id');
+        if ($iProfileId)
+            $this->addMarkers(array('profile_id' => $iProfileId));
     }
 }
 

+ 91 - 0
modules/boonex/files/classes/BxFilesModule.php

@@ -19,6 +19,55 @@ class BxFilesModule extends BxBaseModTextModule
         parent::__construct($aModule);
     }
 
+    /**
+     * Display entries of the author
+     * @return HTML string
+     */
+    public function serviceBrowseGroupAuthor ($iProfileId = 0, $aParams = array())
+    {
+        if (!$iProfileId)
+            $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+        if (!$iProfileId)
+            return '';
+        if (!($oGroupProfile = BxDolProfile::getInstance($iProfileId)))
+            return '';
+        if (!BxDolService::call($oGroupProfile->getModule(), 'is_group_profile'))
+            return '';
+        
+        return $this->_serviceBrowse ('group_author', array_merge(array('author' => $iProfileId), $aParams), BX_DB_PADDING_DEF, true);
+    }
+
+
+    public function serviceIsAllowedAddContentToProfile($iGroupProfileId)
+    {
+        if (!$iGroupProfileId || !($oProfile = BxDolProfile::getInstance((int)$iGroupProfileId)))
+            return false;
+
+        if ($iGroupProfileId == bx_get_logged_profile_id())
+            return true;
+
+        $sProfileModule = $oProfile->getModule();
+        if (BxDolService::call($sProfileModule, 'is_group_profile') && BxDolService::call($sProfileModule, 'is_fan', array($iGroupProfileId)))
+            return true;
+
+        return false;
+    }
+
+    public function serviceMyEntriesActions ($iProfileId = 0)
+    {
+        if (!$iProfileId)
+            $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+        if (!$iProfileId || !($oProfile = BxDolProfile::getInstance($iProfileId)))
+            return false;
+
+        $sProfileModule = $oProfile->getModule();
+        if ($iProfileId != $this->_iProfileId && !(BxDolService::call($sProfileModule, 'is_group_profile') && BxDolService::call($sProfileModule, 'is_fan', array($iProfileId))))
+            return false;
+
+        $oMenu = BxTemplMenu::getObjectInstance($this->_oConfig->CNF['OBJECT_MENU_ACTIONS_MY_ENTRIES']);
+        return $oMenu ? $oMenu->getCode() : false;
+    }
+
     public function checkAllowedSetThumb ()
     {
         return _t('_sys_txt_access_denied');
@@ -70,6 +119,9 @@ class BxFilesModule extends BxBaseModTextModule
         if (!$oStorage)
             return false;
 
+        if (isset($aData[$CNF['FIELD_FILE_ID']]) && $aData[$CNF['FIELD_FILE_ID']]) 
+            return $oStorage->getFile($aData[$CNF['FIELD_FILE_ID']]);
+        
         $aGhostFiles = $oStorage->getGhosts ($aData[$CNF['FIELD_AUTHOR']], $aData[$CNF['FIELD_ID']]);
         if (!$aGhostFiles)
             return false;
@@ -81,6 +133,45 @@ class BxFilesModule extends BxBaseModTextModule
     {
         return $this->_serviceTemplateFunc ('entryFilePreview', $iContentId);
     }
+
+    public function serviceProcessFilesData($iNumberOfFilesToProcessAtOnce = 3)
+    {
+        $CNF = $this->_oConfig->CNF;
+        
+        if (!defined('BX_SYSTEM_JAVA') || !constant('BX_SYSTEM_JAVA'))
+            return;
+        
+        $a = $this->_oDb->getNotProcessedFiles($iNumberOfFilesToProcessAtOnce);
+        if (!$a)
+            return;
+
+        $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+        if (!$oStorage)
+            return false;
+        
+        foreach ($a as $aContentInfo) {
+            $aFile = $this->getContentFile($aContentInfo);
+            if (!$aFile) {
+                $this->_oDb->updateFileData ($aContentInfo[$CNF['FIELD_ID']], '');
+                continue;
+            }
+
+            $sFileUrl = $oStorage->getFileUrlById($aFile['id']);
+            $sFilePath = BX_DIRECTORY_PATH_TMP . $aFile['remote_id'] . '.' . $aFile['ext'];
+            @file_put_contents($sFilePath, file_get_contents($sFileUrl));
+            if (!file_exists($sFilePath)) {
+                $this->_oDb->updateFileData ($aContentInfo[$CNF['FIELD_ID']], '');
+                continue;
+            }
+            
+            $sCommand = '"' . constant('BX_SYSTEM_JAVA') . '" -jar "' . $this->_oConfig->getHomePath() . 'data/tika-app.jar" --encoding=UTF-8 --text "' . $sFilePath . '"';
+            $sData = `$sCommand`;
+
+            @unlink($sFilePath);
+
+            $this->_oDb->updateFileData ($aContentInfo[$CNF['FIELD_ID']], $sData);
+        }
+    }
 }
 
 /** @} */

+ 65 - 0
modules/boonex/files/classes/BxFilesPrivacy.php

@@ -0,0 +1,65 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Files Files
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxFilesPrivacy extends BxTemplPrivacy
+{
+    protected $_oModule;
+
+    public function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+
+        $this->_oModule = BxDolModule::getInstance('bx_files');
+    }
+
+	/**
+     * Check whethere viewer is a member of dynamic group.
+     *
+     * @param  mixed   $mixedGroupId   dynamic group ID.
+     * @param  integer $iObjectOwnerId object owner ID.
+     * @param  integer $iViewerId      viewer ID.
+     * @return boolean result of operation.
+     */
+    public function isDynamicGroupMember($mixedGroupId, $iObjectOwnerId, $iViewerId, $iObjectId)
+    {
+        $oGroupProfile = BxDolProfile::getInstance($iObjectOwnerId);
+        if (!BxDolService::call($oGroupProfile->getModule(), 'is_group_profile'))
+            return false;
+
+        if ('a' == $mixedGroupId)
+            return true;
+
+        if ('m' == $mixedGroupId)
+            return BxDolService::call($oGroupProfile->getModule(), 'is_fan', array($oGroupProfile->id(), $iViewerId));
+
+        return false;
+    }
+
+    static function getGroupChooser ($sObject, $iOwnerId = 0, $aParams = array())
+    {
+        if (!$iOwnerId)
+    		$iOwnerId = bx_get_logged_profile_id();
+
+        $aParams['dynamic_groups'] = array(
+			array ('key' => 'a', 'value' => _t('_bx_files_privacy_public')),
+			array ('key' => 'm', 'value' => _t('_bx_files_privacy_participants')),
+		);
+
+        return parent::getGroupChooser($sObject, $iOwnerId, $aParams);
+    }
+
+    protected function getGroups() 
+    {
+        return array();
+    }
+}
+
+/** @} */

+ 4 - 2
modules/boonex/files/classes/BxFilesSearchResult.php

@@ -21,7 +21,7 @@ class BxFilesSearchResult extends BxBaseModTextSearchResult
             'object_metatags' => 'bx_files',
             'title' => _t('_bx_files_page_title_browse'),
             'table' => 'bx_files_main',
-            'ownFields' => array('id', 'title', 'desc', 'author', 'added'),
+            'ownFields' => array('id', 'file_id', 'title', 'desc', 'author', 'added'),
             'searchFields' => array(),
             'restriction' => array(
                 'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
@@ -54,6 +54,7 @@ class BxFilesSearchResult extends BxBaseModTextSearchResult
         $CNF = &$this->oModule->_oConfig->CNF;
 
         switch ($sMode) {
+            case 'group_author':
             case 'author':
                 if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) {
                     $this->isError = true;
@@ -102,7 +103,8 @@ class BxFilesSearchResult extends BxBaseModTextSearchResult
 
         $this->processReplaceableMarkers($oProfileAuthor);
 
-        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        if ('group_author' != $sMode)
+            $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
     }
 
     function getAlterOrder()

+ 1 - 1
modules/boonex/files/classes/BxFilesTemplate.php

@@ -36,7 +36,7 @@ class BxFilesTemplate extends BxBaseModTextTemplate
     
     function unit ($aData, $isCheckPrivateContent = true, $sTemplateName = 'unit.html', $aParams = array())
     {
-    	$sResult = $this->checkPrivacy ($aData, $isCheckPrivateContent, $this->getModule());
+    	$sResult = $this->checkPrivacy ($aData, $isCheckPrivateContent, $this->getModule(), $sTemplateName);
     	if($sResult)
             return $sResult;
 

+ 1 - 0
modules/boonex/files/data/.htaccess

@@ -0,0 +1 @@
+Deny from all

BIN
modules/boonex/files/data/tika-app.jar


+ 5 - 3
modules/boonex/files/install/config.php

@@ -45,20 +45,22 @@ $aConfig = array(
      */
     'page_triggers' => array (
     	'trigger_page_profile_view_entry',
+    	'trigger_page_group_view_entry',
     ),
     
     /**
      * Menu triggers.
      */
     'menu_triggers' => array(
-    	'trigger_profile_view_submenu'
+    	'trigger_profile_view_submenu',
+    	'trigger_group_view_submenu',
     ),
 
     /**
      * Storages.
      */
     'storages' => array(
-    	'bx_files_files'
+    	'bx_files_files',
     ),
 
     /**
@@ -116,7 +118,7 @@ $aConfig = array(
      */
     'relations' => array(
     	'bx_timeline',
-    	'bx_notifications'
+    	'bx_notifications',
     ),
 
 );

+ 24 - 39
modules/boonex/files/install/langs/en.xml

@@ -5,13 +5,14 @@
 	<string name="_bx_files_cmts"><![CDATA[Files' Comments]]></string>
 
 	<string name="_bx_files_option_summary_chars"><![CDATA[Number of characters in auto-cropped file summary]]></string>
-	<string name="_bx_files_option_plain_summary_chars"><![CDATA[Number of characters in plain file description when file hasn't thumb]]></string>
 	<string name="_bx_files_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_files_option_per_page_profile"><![CDATA[Number of items per page on profile/group page]]></string>
 	<string name="_bx_files_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
 	<string name="_bx_files_option_searchable_fields"><![CDATA[Searchable fields]]></string>
 
+	<string name="_bx_files_form_upload"><![CDATA[Files Upload]]></string>
 	<string name="_bx_files_form_entry"><![CDATA[Files]]></string>
-	<string name="_bx_files_form_entry_display_add"><![CDATA[Add File]]></string>
+	<string name="_bx_files_form_entry_display_add"><![CDATA[Add Files]]></string>
 	<string name="_bx_files_form_entry_display_edit"><![CDATA[Edit File]]></string>
 	<string name="_bx_files_form_entry_display_delete"><![CDATA[Delete File]]></string>
 	<string name="_bx_files_form_entry_display_view"><![CDATA[View File]]></string>
@@ -26,13 +27,17 @@
 	<string name="_bx_files_form_entry_input_cat"><![CDATA[Category]]></string>
     <string name="_bx_files_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
 	<string name="_bx_files_form_entry_input_sys_desc"><![CDATA[Description]]></string>
-	<string name="_bx_files_form_entry_input_desc"><![CDATA[Description]]></string>
+    <string name="_bx_files_form_entry_input_desc"><![CDATA[Description]]></string>
+	<string name="_bx_files_form_entry_input_sys_data"><![CDATA[File data]]></string>
+	<string name="_bx_files_form_entry_input_data"><![CDATA[File data]]></string>
 	<string name="_bx_files_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
 	<string name="_bx_files_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this file]]></string>
 	<string name="_bx_files_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
 	<string name="_bx_files_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the file]]></string>
+	<string name="_bx_files_form_entry_input_sys_attachment"><![CDATA[File]]></string>
+    <string name="_bx_files_form_entry_input_attachment"><![CDATA[File]]></string>
 	<string name="_bx_files_form_entry_input_sys_attachments"><![CDATA[Files]]></string>
-	<string name="_bx_files_form_entry_input_attachments"><![CDATA[Files]]></string>
+	<string name="_bx_files_form_entry_input_attachments"><![CDATA[Files]]></string>    
     <string name="_bx_files_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
     <string name="_bx_files_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
     <string name="_bx_files_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
@@ -44,7 +49,6 @@
 	<string name="_bx_files_acl_action_create_entry"><![CDATA[Create File]]></string>
 	<string name="_bx_files_acl_action_delete_entry"><![CDATA[Delete File]]></string>
 	<string name="_bx_files_acl_action_view_entry"><![CDATA[View File]]></string>
-	<string name="_bx_files_acl_action_set_thumb"><![CDATA[Set File Thumbnail]]></string>
 	<string name="_bx_files_acl_action_edit_any_entry"><![CDATA[Edit Any File]]></string>
 
 	<string name="_bx_files_page_title_sys_create_entry"><![CDATA[Upload Files]]></string>
@@ -69,7 +73,6 @@
     <string name="_bx_files_page_title_home"><![CDATA[Files]]></string>
     <string name="_bx_files_page_block_title_recent_entries"><![CDATA[Latest (Gallery View)]]></string>
     <string name="_bx_files_page_block_title_recent_entries_view_extended"><![CDATA[Latest]]></string>
-    <string name="_bx_files_page_block_title_recent_entries_view_full"><![CDATA[Latest (Full View)]]></string>
     <string name="_bx_files_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
     <string name="_bx_files_page_block_title_entry_author"><![CDATA[Author]]></string>
     <string name="_bx_files_page_block_title_entry_actions"><![CDATA[Actions]]></string>
@@ -84,7 +87,6 @@
     <string name="_bx_files_page_title_entries_updated"><![CDATA[Updated Files]]></string>
     <string name="_bx_files_page_block_title_popular_entries"><![CDATA[Popular]]></string>
     <string name="_bx_files_page_block_title_popular_entries_view_extended"><![CDATA[Popular (Extended View)]]></string>
-    <string name="_bx_files_page_block_title_popular_entries_view_full"><![CDATA[Popular (Full View)]]></string>
     <string name="_bx_files_page_block_title_updated_entries"><![CDATA[Updated Files]]></string>
     <string name="_bx_files_page_title_sys_view_entry_comments"><![CDATA[File Comments]]></string>
     <string name="_bx_files_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
@@ -107,6 +109,7 @@
 	<string name="_bx_files_page_block_title_entry_info"><![CDATA[Info]]></string>
 	<string name="_bx_files_page_block_title_my_entries"><![CDATA[My Files]]></string>
 	<string name="_bx_files_page_block_title_entry_file_preview"><![CDATA[File Preview]]></string>
+	<string name="_bx_files_page_block_title_group_entries"><![CDATA[Files]]></string>
 
     <string name="_bx_files_menu_set_title_view_entry"><![CDATA[File Actions]]></string>
     <string name="_bx_files_menu_title_view_entry"><![CDATA[File Actions]]></string>
@@ -163,42 +166,24 @@
     <string name="_bx_files_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
 
     <string name="_bx_files_pre_lists_cats"><![CDATA[File categories]]></string>
-    <string name="_bx_files_cat_Animals_Pets"><![CDATA[Animals & Pets]]></string>
-    <string name="_bx_files_cat_Architecture"><![CDATA[Architecture]]></string>
-    <string name="_bx_files_cat_Art"><![CDATA[Art]]></string>
-    <string name="_bx_files_cat_Cars_Motorcycles"><![CDATA[Cars & Motorcycles]]></string>
-    <string name="_bx_files_cat_Celebrities"><![CDATA[Celebrities]]></string>
-    <string name="_bx_files_cat_Design"><![CDATA[Design]]></string>
-    <string name="_bx_files_cat_DIY_Crafts"><![CDATA[DIY & Crafts]]></string>
-    <string name="_bx_files_cat_Education"><![CDATA[Education]]></string>
-    <string name="_bx_files_cat_Film_Music_Books"><![CDATA[Film, Music & Books]]></string>
-    <string name="_bx_files_cat_Food_Drink"><![CDATA[Food & Drink]]></string>
-    <string name="_bx_files_cat_Gardening"><![CDATA[Gardening]]></string>
-    <string name="_bx_files_cat_Geek"><![CDATA[Geek]]></string>
-    <string name="_bx_files_cat_Hair_Beauty"><![CDATA[Hair & Beauty]]></string>
-    <string name="_bx_files_cat_Health_Fitness"><![CDATA[Health & Fitness]]></string>
-    <string name="_bx_files_cat_History"><![CDATA[History]]></string>
-    <string name="_bx_files_cat_Holidays_Events"><![CDATA[Holidays & Events]]></string>
-    <string name="_bx_files_cat_Home_Decor"><![CDATA[Home Decor]]></string>
-    <string name="_bx_files_cat_Humor"><![CDATA[Humor]]></string>
-    <string name="_bx_files_cat_Illustrations_Fileers"><![CDATA[Illustrations & Fileers]]></string>
-    <string name="_bx_files_cat_Kids_Parenting"><![CDATA[Kids & Parenting]]></string>
-    <string name="_bx_files_cat_Mens_Fashion"><![CDATA[Men's Fashion]]></string>
-    <string name="_bx_files_cat_Outdoors"><![CDATA[Outdoors]]></string>
-    <string name="_bx_files_cat_Photography"><![CDATA[Photography]]></string>
-    <string name="_bx_files_cat_Products"><![CDATA[Products]]></string>
-    <string name="_bx_files_cat_Quotes"><![CDATA[Quotes]]></string>
-    <string name="_bx_files_cat_Science_Nature"><![CDATA[Science & Nature]]></string>
-    <string name="_bx_files_cat_Sports"><![CDATA[Sports]]></string>
-    <string name="_bx_files_cat_Tattoos"><![CDATA[Tattoos]]></string>
-    <string name="_bx_files_cat_Technology"><![CDATA[Technology]]></string>
-    <string name="_bx_files_cat_Travel"><![CDATA[Travel]]></string>
-    <string name="_bx_files_cat_Weddings"><![CDATA[Weddings]]></string>
-    <string name="_bx_files_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
+    <string name="_bx_files_cat_documentation"><![CDATA[Documentation]]></string>
+    <string name="_bx_files_cat_presentation"><![CDATA[Presentation]]></string>
+    <string name="_bx_files_cat_report"><![CDATA[Report]]></string>
+    <string name="_bx_files_cat_proposal"><![CDATA[Proposal]]></string>
+    <string name="_bx_files_cat_list"><![CDATA[List]]></string>
+    <string name="_bx_files_cat_record"><![CDATA[Audio record]]></string>
+    <string name="_bx_files_cat_screencast"><![CDATA[Screencast]]></string>
+    <string name="_bx_files_cat_screenshot"><![CDATA[Screenshot]]></string>
+    <string name="_bx_files_cat_sketch"><![CDATA[Sketch]]></string>
+    <string name="_bx_files_cat_archive"><![CDATA[Archive]]></string>
+    <string name="_bx_files_cat_backup"><![CDATA[Backup]]></string>
 
     <string name="_bx_files_txt_all_entries_by"><![CDATA[<a href="{0}">All Files by {1} ({2})</a>]]></string>
     <string name="_bx_files_txt_sample_single"><![CDATA[file]]></string>
     <string name="_bx_files_txt_sample_single_with_article"><![CDATA[a file]]></string>
     <string name="_bx_files_txt_sample_comment_single"><![CDATA[file's comment]]></string>
     <string name="_bx_files_txt_sample_vote_single"><![CDATA[file's vote]]></string>
+
+    <string name="_bx_files_privacy_public"><![CDATA[Public]]></string>
+    <string name="_bx_files_privacy_participants"><![CDATA[Participants]]></string>
 </resources>

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

@@ -8,7 +8,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 
 -- PAGES
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_files';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_files' OR `object` IN('bx_files_create_entry', 'bx_files_edit_entry', 'bx_files_delete_entry', 'bx_files_view_entry', 'bx_files_view_entry_comments', 'bx_files_home', 'bx_files_popular', 'bx_files_updated', 'bx_files_author');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_files' OR `object` IN('bx_files_create_entry', 'bx_files_edit_entry', 'bx_files_delete_entry', 'bx_files_view_entry', 'bx_files_view_entry_comments', 'bx_files_home', 'bx_files_popular', 'bx_files_updated', 'bx_files_author', 'bx_files_group');
 
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_files';
@@ -43,3 +43,7 @@ DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_files_simple', 'bx_file
 SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_files' LIMIT 1);
 DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
+
+-- CRON
+DELETE FROM `sys_cron_jobs` WHERE `name` = 'bx_files_process_data';
+

+ 26 - 20
modules/boonex/files/install/sql/enable.sql

@@ -12,10 +12,10 @@ SET @iCategId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
 ('bx_files_summary_chars', '700', @iCategId, '_bx_files_option_summary_chars', 'digit', '', '', '', 1),
-('bx_files_plain_summary_chars', '240', @iCategId, '_bx_files_option_plain_summary_chars', 'digit', '', '', '', 2),
 ('bx_files_per_page_browse', '12', @iCategId, '_bx_files_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_files_per_page_profile', '3', @iCategId, '_bx_files_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_files_rss_num', '10', @iCategId, '_bx_files_option_rss_num', 'digit', '', '', '', 20),
-('bx_files_searchable_fields', 'title,desc', @iCategId, '_bx_files_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_files";s:6:"method";s:21:"get_searchable_fields";}', 30);
+('bx_files_searchable_fields', 'title,desc,data', @iCategId, '_bx_files_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_files";s:6:"method";s:21:"get_searchable_fields";}', 30);
 
 -- PAGE: create entry
 
@@ -99,6 +99,15 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_files_author', 1, 'bx_files', '_bx_files_page_block_title_sys_favorites_of_author', '_bx_files_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_files\";s:6:\"method\";s:15:\"browse_favorite\";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
 ('bx_files_author', 1, 'bx_files', '_bx_files_page_block_title_sys_entries_of_author', '_bx_files_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_files\";s:6:\"method\";s:13:\"browse_author\";}', 0, 0, 1, 3);
 
+-- PAGE: entries of group
+
+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_files_group', 'group-files', '_bx_files_page_title_sys_entries_of_author', '_bx_files_page_title_entries_of_author', 'bx_files', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxFilesPageAuthor', 'modules/boonex/files/classes/BxFilesPageAuthor.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_files_group', 1, 'bx_files', '', '_bx_files_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_files\";s:6:\"method\";s:18:\"my_entries_actions\";}', 0, 0, 1, 1),
+('bx_files_group', 1, 'bx_files', '_bx_files_page_block_title_sys_entries_of_author', '_bx_files_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_files\";s:6:\"method\";s:19:\"browse_group_author\";}', 0, 0, 1, 3);
+
 -- PAGE: module home
 
 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 
@@ -131,8 +140,10 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 
 -- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
 SET @iPBCellProfile = 3;
+SET @iPBCellGroup = 4;
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_files', '_bx_files_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:13:"browse_author";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 0, 0);
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_files', '_bx_files_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:25:"bx_files_per_page_profile";}}}', 0, 0, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_files', '_bx_files_page_block_title_group_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:19:"browse_group_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:25:"bx_files_per_page_profile";}}}', 0, 0, 0);
 
 -- PAGE: service blocks
 
@@ -140,9 +151,8 @@ SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' A
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('', 0, 'bx_files', '_bx_files_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_files\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:7:\"gallery\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
 
-('', 0, 'bx_files', '_bx_files_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
-('', 0, 'bx_files', '_bx_files_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
-('', 0, 'bx_files', '_bx_files_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4);
+('', 0, 'bx_files', '_bx_files_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_files";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2);
+
 
 -- MENU: add to site menu
 
@@ -186,7 +196,7 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_files_my', 'bx_files', '_bx_files_menu_set_title_entries_my', 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_files_my', 'bx_files', 'create-file', '_bx_files_menu_item_title_system_create_entry', '_bx_files_menu_item_title_create_entry', 'page.php?i=create-file', '', '', 'plus', '', 2147483647, 1, 0, 0);
+('bx_files_my', 'bx_files', 'create-file', '_bx_files_menu_item_title_system_create_entry', '_bx_files_menu_item_title_create_entry', 'page.php?i=create-file&profile_id={profile_id}', '', '', 'plus', '', 2147483647, 1, 0, 0);
 
 
 -- MENU: module sub-menu
@@ -234,16 +244,17 @@ SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WH
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
 ('sys_account_dashboard_manage_tools', 'bx_files', 'files-administration', '_bx_files_menu_item_title_system_admt_files', '_bx_files_menu_item_title_admt_files', 'page.php?i=files-administration', '', '_self', '', 'a:2:{s:6:"module";s:8:"bx_files";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
 
--- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+-- MENU: add menu item to profile & group based 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_files', 'files-author', '_bx_files_menu_item_title_system_view_entries_author', '_bx_files_menu_item_title_view_entries_author', 'page.php?i=files-author&profile_id={profile_id}', '', '', 'file-o col-red3', '', 2147483647, 1, 0, 0);
+('trigger_profile_view_submenu', 'bx_files', 'files-author', '_bx_files_menu_item_title_system_view_entries_author', '_bx_files_menu_item_title_view_entries_author', 'page.php?i=files-author&profile_id={profile_id}', '', '', 'file-o col-red3', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_files', 'group-files', '_bx_files_menu_item_title_system_view_entries_author', '_bx_files_menu_item_title_view_entries_author', 'page.php?i=group-files&profile_id={profile_id}', '', '', 'file-o col-red3', '', 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_files_allow_view_to', 'bx_files', 'view', '_bx_files_form_entry_input_allow_view_to', '3', 'bx_files_main', 'id', 'author', '', '');
+('bx_files_allow_view_to', 'bx_files', 'view', '_bx_files_form_entry_input_allow_view_to', '3', 'bx_files_main', 'id', 'author', 'BxFilesPrivacy', 'modules/boonex/files/classes/BxFilesPrivacy.php');
 
 
 -- ACL
@@ -260,10 +271,6 @@ INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`,
 ('bx_files', 'view entry', NULL, '_bx_files_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_files', 'set thumb', NULL, '_bx_files_acl_action_set_thumb', '', 1, 3);
-SET @iIdActionSetThumb = LAST_INSERT_ID();
-
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 ('bx_files', 'edit any entry', NULL, '_bx_files_acl_action_edit_any_entry', '', 1, 3);
 SET @iIdActionEntryEditAny = LAST_INSERT_ID();
@@ -302,12 +309,6 @@ INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
 (@iAdministrator, @iIdActionEntryView),
 (@iPremium, @iIdActionEntryView),
 
--- set entry thumb
-(@iStandard, @iIdActionSetThumb),
-(@iModerator, @iIdActionSetThumb),
-(@iAdministrator, @iIdActionSetThumb),
-(@iPremium, @iIdActionSetThumb),
-
 -- edit any entry
 (@iModerator, @iIdActionEntryEditAny),
 (@iAdministrator, @iIdActionEntryEditAny);
@@ -371,3 +372,8 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('system', 'save_setting', @iHandler),
 ('profile', 'delete', @iHandler);
 
+-- CRON
+
+INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
+('bx_files_process_data', '* * * * *', 'BxFilesCronProcessData', 'modules/boonex/files/classes/BxFilesCronProcessData.php', '');
+

+ 28 - 42
modules/boonex/files/install/sql/install.sql

@@ -8,9 +8,12 @@ CREATE TABLE IF NOT EXISTS `bx_files_main` (
   `author` int(10) unsigned NOT NULL,
   `added` int(11) NOT NULL,
   `changed` int(11) NOT NULL,
+  `file_id` int(11) NOT NULL,
   `title` varchar(255) NOT NULL,
   `cat` int(11) NOT NULL,
   `desc` text NOT NULL,
+  `data` text NOT NULL,
+  `data_processed` tinyint(4) NOT NULL DEFAULT '0',
   `views` int(11) NOT NULL default '0',
   `rate` float NOT NULL default '0',
   `votes` int(11) NOT NULL default '0',
@@ -21,7 +24,7 @@ CREATE TABLE IF NOT EXISTS `bx_files_main` (
   `status` enum('active','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
-  FULLTEXT KEY `search_fields` (`title`,`desc`)
+  FULLTEXT KEY `search_fields` (`title`,`desc`,`data`)
 );
 
 -- TABLE: storages & transcoders
@@ -180,15 +183,17 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_files', 'bx_files', 'do_submit', '_bx_files_form_entry_input_do_submit', '', 0, 'submit', '_bx_files_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_files', 'bx_files', 'attachments', 'a:1:{i:0;s:14:"bx_files_html5";}', 'a:2:{s:15:"bx_files_simple";s:26:"_sys_uploader_simple_title";s:14:"bx_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_files_form_entry_input_sys_attachments', '_bx_files_form_entry_input_attachments', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_files', 'bx_files', 'desc', '', '', 0, 'textarea', '_bx_files_form_entry_input_sys_desc', '_bx_files_form_entry_input_desc', '', 0, 0, 2, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
+('bx_files', 'bx_files', 'data', '', '', 0, 'textarea', '_bx_files_form_entry_input_sys_data', '_bx_files_form_entry_input_data', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
 ('bx_files', 'bx_files', 'title', '', '', 0, 'text', '_bx_files_form_entry_input_sys_title', '_bx_files_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_files_form_entry_input_title_err', 'Xss', '', 1, 0),
 ('bx_files', 'bx_files', 'cat', '', '#!bx_files_cats', 0, 'select', '_bx_files_form_entry_input_sys_cat', '_bx_files_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_files_form_entry_input_cat_err', 'Xss', '', 1, 0),
 ('bx_files', 'bx_files', 'added', '', '', 0, 'datetime', '_bx_files_form_entry_input_sys_date_added', '_bx_files_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_files', 'bx_files', 'changed', '', '', 0, 'datetime', '_bx_files_form_entry_input_sys_date_changed', '_bx_files_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 
-('bx_files_upload', 'bx_files', 'attachments', 'a:1:{i:0;s:14:"bx_files_html5";}', 'a:2:{s:15:"bx_files_simple";s:26:"_sys_uploader_simple_title";s:14:"bx_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_files_form_entry_input_sys_attachments', '_bx_files_form_entry_input_attachments', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_files_upload', 'bx_files', 'attachments', 'a:1:{i:0;s:14:"bx_files_html5";}', 'a:2:{s:15:"bx_files_simple";s:26:"_sys_uploader_simple_title";s:14:"bx_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_files_form_entry_input_sys_attachment', '_bx_files_form_entry_input_attachment', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_files_upload', 'bx_files', 'cat', '', '#!bx_files_cats', 0, 'select', '_bx_files_form_entry_input_sys_cat', '_bx_files_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_files_form_entry_input_cat_err', 'Xss', '', 1, 0),
 ('bx_files_upload', 'bx_files', 'allow_view_to', '', '', 0, 'custom', '_bx_files_form_entry_input_sys_allow_view_to', '_bx_files_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_files_upload', 'bx_files', 'do_submit', '_bx_files_form_entry_input_do_submit', '', 0, 'submit', '_bx_files_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+('bx_files_upload', 'bx_files', 'do_submit', '_bx_files_form_entry_input_do_submit', '', 0, 'submit', '_bx_files_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_files_upload', 'bx_files', 'profile_id', '0', '', 0, 'hidden', '_bx_files_form_entry_input_sys_profile_id', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0);
 
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
@@ -205,9 +210,10 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_files_entry_edit', 'title', 2147483647, 1, 3),
 ('bx_files_entry_edit', 'cat', 2147483647, 1, 4),
 ('bx_files_entry_edit', 'desc', 2147483647, 1, 5),
-('bx_files_entry_edit', 'attachments', 2147483647, 1, 6),
-('bx_files_entry_edit', 'allow_view_to', 2147483647, 1, 7),
-('bx_files_entry_edit', 'do_submit', 2147483647, 1, 8),
+('bx_files_entry_edit', 'data', 0, 1, 6),
+('bx_files_entry_edit', 'attachments', 2147483647, 1, 7),
+('bx_files_entry_edit', 'allow_view_to', 2147483647, 1, 8),
+('bx_files_entry_edit', 'do_submit', 2147483647, 1, 9),
 ('bx_files_entry_view', 'attachments', 2147483647, 0, 0),
 ('bx_files_entry_view', 'delete_confirm', 2147483647, 0, 0),
 ('bx_files_entry_view', 'desc', 2147483647, 0, 0),
@@ -219,10 +225,11 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_files_entry_view', 'added', 2147483647, 1, 2),
 ('bx_files_entry_view', 'changed', 2147483647, 1, 3),
 
-('bx_files_entry_upload', 'attachments', 2147483647, 1, 1),
-('bx_files_entry_upload', 'cat', 2147483647, 1, 2),
-('bx_files_entry_upload', 'allow_view_to', 2147483647, 1, 3),
-('bx_files_entry_upload', 'do_submit', 2147483647, 1, 4);
+('bx_files_entry_upload', 'profile_id', 2147483647, 1, 1),
+('bx_files_entry_upload', 'attachments', 2147483647, 1, 2),
+('bx_files_entry_upload', 'cat', 2147483647, 1, 3),
+('bx_files_entry_upload', 'allow_view_to', 2147483647, 1, 4),
+('bx_files_entry_upload', 'do_submit', 2147483647, 1, 5);
 
 -- PRE-VALUES
 
@@ -231,38 +238,17 @@ INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUE
 
 INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
 ('bx_files_cats', '', 0, '_sys_please_select', ''),
-('bx_files_cats', '1', 1, '_bx_files_cat_Animals_Pets', ''),
-('bx_files_cats', '2', 2, '_bx_files_cat_Architecture', ''),
-('bx_files_cats', '3', 3, '_bx_files_cat_Art', ''),
-('bx_files_cats', '4', 4, '_bx_files_cat_Cars_Motorcycles', ''),
-('bx_files_cats', '5', 5, '_bx_files_cat_Celebrities', ''),
-('bx_files_cats', '6', 6, '_bx_files_cat_Design', ''),
-('bx_files_cats', '7', 7, '_bx_files_cat_DIY_Crafts', ''),
-('bx_files_cats', '8', 8, '_bx_files_cat_Education', ''),
-('bx_files_cats', '9', 9, '_bx_files_cat_Film_Music_Books', ''),
-('bx_files_cats', '10', 10, '_bx_files_cat_Food_Drink', ''),
-('bx_files_cats', '11', 11, '_bx_files_cat_Gardening', ''),
-('bx_files_cats', '12', 12, '_bx_files_cat_Geek', ''),
-('bx_files_cats', '13', 13, '_bx_files_cat_Hair_Beauty', ''),
-('bx_files_cats', '14', 14, '_bx_files_cat_Health_Fitness', ''),
-('bx_files_cats', '15', 15, '_bx_files_cat_History', ''),
-('bx_files_cats', '16', 16, '_bx_files_cat_Holidays_Events', ''),
-('bx_files_cats', '17', 17, '_bx_files_cat_Home_Decor', ''),
-('bx_files_cats', '18', 18, '_bx_files_cat_Humor', ''),
-('bx_files_cats', '19', 19, '_bx_files_cat_Illustrations_Posters', ''),
-('bx_files_cats', '20', 20, '_bx_files_cat_Kids_Parenting', ''),
-('bx_files_cats', '21', 21, '_bx_files_cat_Mens_Fashion', ''),
-('bx_files_cats', '22', 22, '_bx_files_cat_Outdoors', ''),
-('bx_files_cats', '23', 23, '_bx_files_cat_Photography', ''),
-('bx_files_cats', '24', 24, '_bx_files_cat_Products', ''),
-('bx_files_cats', '25', 25, '_bx_files_cat_Quotes', ''),
-('bx_files_cats', '26', 26, '_bx_files_cat_Science_Nature', ''),
-('bx_files_cats', '27', 27, '_bx_files_cat_Sports', ''),
-('bx_files_cats', '28', 28, '_bx_files_cat_Tattoos', ''),
-('bx_files_cats', '29', 29, '_bx_files_cat_Technology', ''),
-('bx_files_cats', '30', 30, '_bx_files_cat_Travel', ''),
-('bx_files_cats', '31', 31, '_bx_files_cat_Weddings', ''),
-('bx_files_cats', '32', 32, '_bx_files_cat_Womens_Fashion', '');
+('bx_files_cats', '1', 1, '_bx_files_cat_documentation', ''),
+('bx_files_cats', '2', 2, '_bx_files_cat_presentation', ''),
+('bx_files_cats', '3', 3, '_bx_files_cat_report', ''),
+('bx_files_cats', '4', 4, '_bx_files_cat_proposal', ''),
+('bx_files_cats', '5', 5, '_bx_files_cat_list', ''),
+('bx_files_cats', '6', 6, '_bx_files_cat_record', ''),
+('bx_files_cats', '7', 7, '_bx_files_cat_screencast', ''),
+('bx_files_cats', '8', 8, '_bx_files_cat_screenshot', ''),
+('bx_files_cats', '9', 9, '_bx_files_cat_sketch', ''),
+('bx_files_cats', '10', 10, '_bx_files_cat_archive', ''),
+('bx_files_cats', '11', 11, '_bx_files_cat_backup', '');
 
 -- COMMENTS
 

+ 3 - 0
modules/boonex/files/template/unit_full_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_full_private.html />
+

+ 3 - 0
modules/boonex/files/template/unit_gallery_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />
+

+ 6 - 1
modules/boonex/files/template/unit_live_search.html

@@ -1,3 +1,8 @@
 
-<bx_include_base:../modules/base/text/template/unit_live_search.html />
+<div class="bx-base-text-unit bx-def-unit bx-def-unit-live-search bx-def-margin-sec-bottom" data-ts="__ts__">
+    <bx_if:thumb><a href="__content_url__"><div class="bx-def-unit-img bx-def-thumb-size bx-def-round-corners bx-def-box bx-def-color-bg-box" style="background-image:url(__thumb_url__);"></div></bx_if:thumb>
+    <bx_if:no_thumb><div class="bx-def-thumb-size bx-def-unit-img bx-def-round-corners bx-def-box bx-def-color-bg-box bx-def-font-align-center"><i class="sys-icon __icon__ bx-def-thumb-size"></i></div></bx_if:no_thumb>
+    <div class="bx-def-unit-info bx-def-thumb-size-max-height bx-def-padding-sec-left"><a href="__content_url__">__title__</a><br /><span class="bx-def-fonr-grayed bx-def-font-small">__module_name__</span></div>
+</div>
+
 

+ 3 - 0
modules/boonex/market/template/unit_full_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_full_private.html />
+

+ 3 - 0
modules/boonex/market/template/unit_gallery_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />
+

+ 3 - 0
modules/boonex/polls/template/unit_full_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_full_private.html />
+

+ 3 - 0
modules/boonex/polls/template/unit_gallery_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />
+

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

@@ -7,6 +7,7 @@
 	<string name="_bx_posts_option_summary_chars"><![CDATA[Number of characters in auto-cropped post summary]]></string>
 	<string name="_bx_posts_option_plain_summary_chars"><![CDATA[Number of characters in plain post description when post hasn't thumb]]></string>
 	<string name="_bx_posts_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_posts_option_per_page_profile"><![CDATA[Number of items per page on profile/group page]]></string>
 	<string name="_bx_posts_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
 	<string name="_bx_posts_option_searchable_fields"><![CDATA[Searchable fields]]></string>
 

+ 2 - 1
modules/boonex/posts/install/sql/enable.sql

@@ -14,6 +14,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_posts_summary_chars', '700', @iCategId, '_bx_posts_option_summary_chars', 'digit', '', '', '', 1),
 ('bx_posts_plain_summary_chars', '240', @iCategId, '_bx_posts_option_plain_summary_chars', 'digit', '', '', '', 2),
 ('bx_posts_per_page_browse', '12', @iCategId, '_bx_posts_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_posts_per_page_profile', '3', @iCategId, '_bx_posts_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_posts_rss_num', '10', @iCategId, '_bx_posts_option_rss_num', 'digit', '', '', '', 20),
 ('bx_posts_searchable_fields', 'title,text', @iCategId, '_bx_posts_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:21:"get_searchable_fields";}', 30);
 
@@ -132,7 +133,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 -- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
 SET @iPBCellProfile = 3;
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_posts', '_bx_posts_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_author";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 0, 0);
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_posts', '_bx_posts_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:25:"bx_posts_per_page_profile";}}}', 0, 0, 0);
 
 -- PAGE: service blocks
 

+ 3 - 0
modules/boonex/posts/template/unit_full_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_full_private.html />
+

+ 3 - 0
modules/boonex/posts/template/unit_gallery_private.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />
+

+ 1 - 0
modules/boonex/russian/data/langs/bx_albums/ru.xml

@@ -9,6 +9,7 @@
 	<string name="_bx_albums_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к альбомам]]></string>
 	<string name="_bx_albums_option_plain_summary_chars"><![CDATA[Количество символов в описании альбома при отсутствующей картинке альбома]]></string>
 	<string name="_bx_albums_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+	<string name="_bx_albums_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
 	<string name="_bx_albums_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
 	<string name="_bx_albums_option_searchable_fields"><![CDATA[Поля для поиска]]></string>
 

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

@@ -83,7 +83,7 @@
     <string name="_bx_cnv_menu_item_title_system_folder_more"><![CDATA[Дополнительно]]></string>
     <string name="_bx_cnv_menu_item_title_folder_more"><![CDATA[Дополнительно]]></string>
     <string name="_bx_cnv_menu_item_title_system_convos"><![CDATA[Переписка]]></string>
-    <string name="_bx_cnv_menu_item_title_convos"><![CDATA[переписка]]></string>
+    <string name="_bx_cnv_menu_item_title_convos"><![CDATA[Переписка]]></string>
     <string name="_bx_cnv_menu_item_title_system_unread_messages"><![CDATA[Количество непрочитанных сообщений]]></string>
     <string name="_bx_cnv_menu_item_title_unread_messages"><![CDATA[{addon} непрочитанных сообщений]]></string>
     
@@ -131,4 +131,4 @@
 <hr />
 <p>{Message}</p>
 {email_footer}]]></string>
-</resources>
+</resources>

+ 189 - 0
modules/boonex/russian/data/langs/bx_files/ru.xml

@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_files"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_cmts"><![CDATA[Комментарии к файлам]]></string>
+
+	<string name="_bx_files_option_summary_chars"><![CDATA[Количество символов в автоматическом описании к файлу]]></string>
+	<string name="_bx_files_option_per_page_browse"><![CDATA[Количество файлов на странице]]></string>
+    <string name="_bx_files_option_per_page_profile"><![CDATA[Количество файлов на странице профайла]]></string>
+	<string name="_bx_files_option_rss_num"><![CDATA[Количество файлов в RSS]]></string>
+	<string name="_bx_files_option_searchable_fields"><![CDATA[Поисковые поля]]></string>
+
+	<string name="_bx_files_form_upload"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_form_entry"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_form_entry_display_add"><![CDATA[Добавление файлов]]></string>
+	<string name="_bx_files_form_entry_display_edit"><![CDATA[Редактирование файла]]></string>
+	<string name="_bx_files_form_entry_display_delete"><![CDATA[Удаление файла]]></string>
+	<string name="_bx_files_form_entry_display_view"><![CDATA[Просмотр файла]]></string>
+	<string name="_bx_files_form_entry_input_sys_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_files_form_entry_input_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_files_form_entry_input_sys_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_files_form_entry_input_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_files_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_files_form_entry_input_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_files_form_entry_input_title_err"><![CDATA[Нужно указать заголовок]]></string>
+	<string name="_bx_files_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_files_form_entry_input_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_files_form_entry_input_cat_err"><![CDATA[Нужно указать категорию]]></string>
+	<string name="_bx_files_form_entry_input_sys_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_files_form_entry_input_desc"><![CDATA[Описание]]></string>
+	<string name="_bx_files_form_entry_input_sys_data"><![CDATA[Данные в файле]]></string>
+	<string name="_bx_files_form_entry_input_data"><![CDATA[Данные в файле]]></string>
+	<string name="_bx_files_form_entry_input_sys_delete_confirm"><![CDATA[Подтверждение удаления]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить этот файл]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm_error"><![CDATA[Нужно подтвердить удаление файла]]></string>
+	<string name="_bx_files_form_entry_input_sys_attachment"><![CDATA[Файл]]></string>
+    <string name="_bx_files_form_entry_input_attachment"><![CDATA[Файл]]></string>
+	<string name="_bx_files_form_entry_input_sys_attachments"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_form_entry_input_attachments"><![CDATA[Файлы]]></string>    
+    <string name="_bx_files_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_files_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_files_form_entry_input_picture_use_as_thumb"><![CDATA[Обложка]]></string>
+    <string name="_bx_files_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_files_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_files_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_files_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+
+	<string name="_bx_files_acl_action_create_entry"><![CDATA[Добавление файлов]]></string>
+	<string name="_bx_files_acl_action_delete_entry"><![CDATA[Удаление файлов]]></string>
+	<string name="_bx_files_acl_action_view_entry"><![CDATA[Просмотр файлов]]></string>
+	<string name="_bx_files_acl_action_edit_any_entry"><![CDATA[Редактировать любой файл]]></string>
+
+	<string name="_bx_files_page_title_sys_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_title_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_block_title_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_title_sys_edit_entry"><![CDATA[Редактирование]]></string>
+	<string name="_bx_files_page_title_edit_entry"><![CDATA[Редактирование]]></string>
+	<string name="_bx_files_page_block_title_edit_entry"><![CDATA[Редактирование]]></string>
+    <string name="_bx_files_page_title_sys_delete_entry"><![CDATA[Удаление]]></string>
+    <string name="_bx_files_page_title_delete_entry"><![CDATA[Удаление]]></string>
+    <string name="_bx_files_page_block_title_delete_entry"><![CDATA[Удаление]]></string>
+	<string name="_bx_files_page_title_sys_view_entry"><![CDATA[Просмотр файла]]></string>
+	<string name="_bx_files_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_files_page_block_title_entry_text"><![CDATA[Описание файла]]></string>
+	<string name="_bx_files_page_title_browse"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_page_title_search_results"><![CDATA[Поиск по "{0}"]]></string>
+	<string name="_bx_files_page_title_browse_by_author"><![CDATA[{display_name} - файлы]]></string>
+    <string name="_bx_files_page_title_browse_recent"><![CDATA[Последние]]></string>
+    <string name="_bx_files_page_title_browse_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_page_title_browse_updated"><![CDATA[Обновлённые]]></string>
+    <string name="_bx_files_page_title_sys_home"><![CDATA[Главная страница]]></string>
+    <string name="_bx_files_page_title_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_page_block_title_recent_entries"><![CDATA[Последние (галерея)]]></string>
+    <string name="_bx_files_page_block_title_recent_entries_view_extended"><![CDATA[Последние]]></string>
+    <string name="_bx_files_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_files_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_files_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_files_page_block_title_entry_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_files_page_block_title_entry_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_files_page_block_title_entry_location"><![CDATA[Местоположение]]></string>
+    <string name="_bx_files_page_block_title_entry_attachments"><![CDATA[Присоединенные файлы]]></string>
+    <string name="_bx_files_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_files_page_title_sys_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_page_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_page_title_sys_entries_updated"><![CDATA[Обновлённые]]></string>
+    <string name="_bx_files_page_title_entries_updated"><![CDATA[Обновлённые]]></string>
+    <string name="_bx_files_page_block_title_popular_entries"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_page_block_title_popular_entries_view_extended"><![CDATA[Популярные (расширенный вид)]]></string>
+    <string name="_bx_files_page_block_title_updated_entries"><![CDATA[Обновлённые]]></string>
+    <string name="_bx_files_page_title_sys_view_entry_comments"><![CDATA[Комментарии к файлу]]></string>
+    <string name="_bx_files_page_title_view_entry_comments"><![CDATA[Комментарии к {title}]]></string>
+    <string name="_bx_files_page_title_sys_entries_of_author"><![CDATA[Файлы от одного автора]]></string>
+    <string name="_bx_files_page_title_entries_of_author"><![CDATA[{display_name} - файлы]]></string>
+    <string name="_bx_files_page_block_title_favorites_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - избранные файлы]]></string>
+    <string name="_bx_files_page_block_title_sys_favorites_of_author"><![CDATA[Избранные файлы от одного автора]]></string>
+    <string name="_bx_files_page_block_title_entries_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - файлы]]></string>
+    <string name="_bx_files_page_block_title_sys_entries_of_author"><![CDATA[Файлы от одного автора]]></string>   
+    <string name="_bx_files_page_block_title_entries_actions"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_page_block_title_browse_cmts"><![CDATA[Комментарии к файлам]]></string>
+	<string name="_bx_files_page_title_sys_manage"><![CDATA[Управление своими файлами]]></string>
+	<string name="_bx_files_page_title_sys_manage_administration"><![CDATA[Управление всеми файлами]]></string>
+	<string name="_bx_files_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_files_page_block_title_system_manage"><![CDATA[Управление своими файлами]]></string>
+	<string name="_bx_files_page_block_title_system_manage_administration"><![CDATA[Управление всеми файлами]]></string>
+	<string name="_bx_files_page_block_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_files_page_block_title_popular_keywords"><![CDATA[Популярные хэш-теги]]></string>
+	<string name="_bx_files_page_block_title_cats"><![CDATA[Категории файлов]]></string>
+	<string name="_bx_files_page_block_title_entry_info"><![CDATA[Информация]]></string>
+	<string name="_bx_files_page_block_title_my_entries"><![CDATA[Мои файлы]]></string>
+	<string name="_bx_files_page_block_title_entry_file_preview"><![CDATA[Предварительный просмотр файла]]></string>
+	<string name="_bx_files_page_block_title_group_entries"><![CDATA[Файлы]]></string>
+
+    <string name="_bx_files_menu_set_title_view_entry"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_menu_title_view_entry"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_menu_title_submenu"><![CDATA[Под-меню файлов]]></string>
+    <string name="_bx_files_menu_set_title_submenu"><![CDATA[Под-меню файлов]]></string>
+    <string name="_bx_files_menu_item_title_system_create_entry"><![CDATA[Загрузить файлы]]></string>
+    <string name="_bx_files_menu_item_title_create_entry"><![CDATA[Загрузить файлы]]></string>
+    <string name="_bx_files_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_menu_item_title_system_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_menu_item_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entry"><![CDATA[Просмотр файла]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_entries_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_files_menu_item_title_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_files_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_menu_item_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_menu_title_view_entry_submenu"><![CDATA[Подменю просмотра файла]]></string>
+    <string name="_bx_files_menu_set_title_view_entry_submenu"><![CDATA[Подменю просмотра файла]]></string>
+    <string name="_bx_files_menu_item_title_view_entry_submenu_entry"><![CDATA[Файл]]></string>
+    <string name="_bx_files_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entry_comments"><![CDATA[Комментарии к файлу]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entries_author"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_view_entries_author"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_title_entries_my"><![CDATA[Меню для своих файлов]]></string>
+    <string name="_bx_files_menu_set_title_entries_my"><![CDATA[Меню для своих файлов]]></string>
+	<string name="_bx_files_menu_item_title_system_manage_my_files"><![CDATA[Мои файлы]]></string>
+    <string name="_bx_files_menu_item_title_manage_my_files"><![CDATA[{addon} файлов]]></string>
+    <string name="_bx_files_menu_set_title_manage_tools"><![CDATA[Подменю управления файлами]]></string>
+    <string name="_bx_files_menu_title_manage_tools"><![CDATA[Подменю управления файлами]]></string>
+    <string name="_bx_files_menu_item_title_system_manage_account"><![CDATA[Управление учетной записью]]></string>
+    <string name="_bx_files_menu_item_title_manage_account"><![CDATA[Управление учетной записью]]></string>
+	<string name="_bx_files_menu_item_title_system_admt_files"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_menu_item_title_admt_files"><![CDATA[Файлы - {addon} спрятанных]]></string>
+	<string name="_bx_files_menu_item_title_manage_my"><![CDATA[Мой файлы]]></string>
+	<string name="_bx_files_menu_item_title_manage_all"><![CDATA[Все файлы]]></string>
+	<string name="_bx_files_menu_item_title_system_download_file"><![CDATA[Скачать]]></string>
+	<string name="_bx_files_menu_item_title_download_file"><![CDATA[Скачать]]></string>
+
+	<string name="_bx_files_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_files_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_files_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+	<string name="_bx_files_grid_column_title_adm_active"><![CDATA[Активный]]></string>
+    <string name="_bx_files_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_files_grid_column_title_adm_added"><![CDATA[Добавлено]]></string>
+    <string name="_bx_files_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_files_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_grid_action_title_adm_more_actions"><![CDATA[Больше действий]]></string>
+    <string name="_bx_files_grid_action_err_delete"><![CDATA[Ошибка удаления выбранных файлов]]></string>
+    <string name="_bx_files_grid_txt_account_manager"><![CDATA[Перейти к управлению учетной записи]]></string>
+
+    <string name="_bx_files_pre_lists_cats"><![CDATA[Категории файлов]]></string>
+    <string name="_bx_files_cat_documentation"><![CDATA[Документация]]></string>
+    <string name="_bx_files_cat_presentation"><![CDATA[Презентация]]></string>
+    <string name="_bx_files_cat_report"><![CDATA[Отчет]]></string>
+    <string name="_bx_files_cat_proposal"><![CDATA[План]]></string>
+    <string name="_bx_files_cat_list"><![CDATA[Список]]></string>
+    <string name="_bx_files_cat_record"><![CDATA[Аудио запись]]></string>
+    <string name="_bx_files_cat_screencast"><![CDATA[Видео запись]]></string>
+    <string name="_bx_files_cat_screenshot"><![CDATA[Снимок экрана]]></string>
+    <string name="_bx_files_cat_sketch"><![CDATA[Набросок]]></string>
+    <string name="_bx_files_cat_archive"><![CDATA[Архив]]></string>
+    <string name="_bx_files_cat_backup"><![CDATA[Резервная копия]]></string>
+
+    <string name="_bx_files_txt_all_entries_by"><![CDATA[<a href="{0}">Все файлы от пользователя {1} ({2})</a>]]></string>
+    <string name="_bx_files_txt_sample_single"><![CDATA[файл]]></string>
+    <string name="_bx_files_txt_sample_single_with_article"><![CDATA[файл]]></string>
+    <string name="_bx_files_txt_sample_comment_single"><![CDATA[комментарии к файлу]]></string>
+    <string name="_bx_files_txt_sample_vote_single"><![CDATA[голос за файл]]></string>
+
+    <string name="_bx_files_privacy_public"><![CDATA[Для всех]]></string>
+    <string name="_bx_files_privacy_participants"><![CDATA[Для участников]]></string>
+</resources>

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

@@ -6,7 +6,8 @@
 
 	<string name="_bx_posts_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к публикациям]]></string>
 	<string name="_bx_posts_option_plain_summary_chars"><![CDATA[Количество символов в описании публикации при отсутствующей картинке публикации]]></string>
-	<string name="_bx_posts_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_posts_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_posts_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
 	<string name="_bx_posts_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
 	<string name="_bx_posts_option_searchable_fields"><![CDATA[Поля для поиска]]></string>