1
0
Alex Trofimov 10 жил өмнө
parent
commit
e11ebcb3e3
52 өөрчлөгдсөн 2153 нэмэгдсэн , 28 устгасан
  1. 1 0
      inc/classes/BxDol.php
  2. 6 6
      inc/classes/BxDolConnection.php
  3. 26 8
      inc/classes/BxDolGridConnections.php
  4. 30 0
      modules/base/profile/classes/BxBaseModProfileModule.php
  5. 5 3
      modules/base/profile/classes/BxBaseModProfilePageEntry.php
  6. 152 0
      modules/boonex/groups/classes/BxGroupsConfig.php
  7. 23 0
      modules/boonex/groups/classes/BxGroupsDb.php
  8. 24 0
      modules/boonex/groups/classes/BxGroupsFormEntry.php
  9. 23 0
      modules/boonex/groups/classes/BxGroupsFormsEntryHelper.php
  10. 21 0
      modules/boonex/groups/classes/BxGroupsGridAdministration.php
  11. 21 0
      modules/boonex/groups/classes/BxGroupsGridCommon.php
  12. 68 0
      modules/boonex/groups/classes/BxGroupsGridConnections.php
  13. 25 0
      modules/boonex/groups/classes/BxGroupsMenuManageTools.php
  14. 47 0
      modules/boonex/groups/classes/BxGroupsMenuView.php
  15. 92 0
      modules/boonex/groups/classes/BxGroupsModule.php
  16. 24 0
      modules/boonex/groups/classes/BxGroupsPageBrowse.php
  17. 24 0
      modules/boonex/groups/classes/BxGroupsPageEntry.php
  18. 138 0
      modules/boonex/groups/classes/BxGroupsSearchResult.php
  19. 24 0
      modules/boonex/groups/classes/BxGroupsTemplate.php
  20. 126 0
      modules/boonex/groups/install/config.php
  21. 20 0
      modules/boonex/groups/install/installer.php
  22. 229 0
      modules/boonex/groups/install/langs/en.xml
  23. 228 0
      modules/boonex/groups/install/langs/ru.xml
  24. 43 0
      modules/boonex/groups/install/sql/disable.sql
  25. 360 0
      modules/boonex/groups/install/sql/enable.sql
  26. 225 0
      modules/boonex/groups/install/sql/install.sql
  27. 40 0
      modules/boonex/groups/install/sql/uninstall.sql
  28. 57 0
      modules/boonex/groups/js/manage_tools.js
  29. 18 0
      modules/boonex/groups/request.php
  30. 1 0
      modules/boonex/groups/template/account_link.html
  31. 1 0
      modules/boonex/groups/template/cover.html
  32. 1 0
      modules/boonex/groups/template/css/main.css
  33. 1 0
      modules/boonex/groups/template/css/manage_tools.css
  34. 1 0
      modules/boonex/groups/template/image_popup.html
  35. BIN
      modules/boonex/groups/template/images/icons/std-mi.png
  36. BIN
      modules/boonex/groups/template/images/icons/std-pi.png
  37. BIN
      modules/boonex/groups/template/images/icons/std-si.png
  38. BIN
      modules/boonex/groups/template/images/icons/std-wi.png
  39. BIN
      modules/boonex/groups/template/images/no-pciture-big.png
  40. BIN
      modules/boonex/groups/template/images/no-picture-icon.png
  41. BIN
      modules/boonex/groups/template/images/no-picture-preview.png
  42. BIN
      modules/boonex/groups/template/images/no-picture-thumb.png
  43. 1 0
      modules/boonex/groups/template/name_link.html
  44. 1 0
      modules/boonex/groups/template/picture_preview.html
  45. 1 0
      modules/boonex/groups/template/set_acl_popup.html
  46. 1 0
      modules/boonex/groups/template/unit.html
  47. 3 0
      modules/boonex/groups/template/unit_live_search.html
  48. 2 1
      modules/boonex/timeline/install/config.php
  49. 2 1
      modules/boonex/timeline/install/sql/enable.sql
  50. 11 8
      template/scripts/BxBasePageAccount.php
  51. 1 1
      template/scripts/BxBaseServiceProfiles.php
  52. 5 0
      template/scripts/BxBaseServices.php

+ 1 - 0
inc/classes/BxDol.php

@@ -82,6 +82,7 @@ interface iBxDolProfileService
     public function serviceProfileEditUrl ($iContentId);
     public function serviceProfilesSearch ($sTerm, $iLimit);
     public function serviceFormsHelper ();
+    public function serviceActAsProfile ();
     public function servicePrepareFields ($aFieldsProfile);
 }
 

+ 6 - 6
inc/classes/BxDolConnection.php

@@ -163,12 +163,12 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
      * @param $iContent content to make connection to, in most cases some content id, or other profile id in case of friends
      * @return array
      */
-    public function actionAdd ($iContent = 0)
+    public function actionAdd ($iContent = 0, $iInitiator = false)
     {
         if (!$iContent)
             $iContent = bx_process_input($_POST['id'], BX_DATA_INT);
 
-        return $this->_action (bx_get_logged_profile_id(), $iContent, 'addConnection', '_sys_conn_err_connection_already_exists', true);
+        return $this->_action ($iInitiator ? $iInitiator : bx_get_logged_profile_id(), $iContent, 'addConnection', '_sys_conn_err_connection_already_exists', true);
     }
 
     /**
@@ -176,7 +176,7 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
      * @param $iContent content to make connection to, in most cases some content id, or other profile id in case of friends
      * @return array
      */
-    public function actionRemove ($iContent = 0)
+    public function actionRemove ($iContent = 0, $iInitiator = false)
     {
         if (!$iContent)
             $iContent = bx_process_input($_POST['id'], BX_DATA_INT);
@@ -185,7 +185,7 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
         if (false == $a['err'])
             return $a;
 
-        return $this->_action (bx_get_logged_profile_id(), $iContent, 'removeConnection', '_sys_conn_err_connection_does_not_exists');
+        return $this->_action ($iInitiator ? $iInitiator : bx_get_logged_profile_id(), $iContent, 'removeConnection', '_sys_conn_err_connection_does_not_exists');
     }
 
     /**
@@ -193,12 +193,12 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
      * @param $iContent content to make connection to, in most cases some content id, or other profile id in case of friends
      * @return array
      */
-    public function actionReject ($iContent = 0)
+    public function actionReject ($iContent = 0, $iInitiator = false)
     {
         if (!$iContent)
             $iContent = bx_process_input($_POST['id'], BX_DATA_INT);
 
-        return $this->_action ($iContent, bx_get_logged_profile_id(), 'removeConnection', '_sys_conn_err_connection_does_not_exists');
+        return $this->_action ($iContent, $iInitiator ? $iInitiator : bx_get_logged_profile_id(), 'removeConnection', '_sys_conn_err_connection_does_not_exists');
     }
 
     protected function _action ($iInitiator, $iContent, $sMethod, $sErrorKey, $isMutual = false)

+ 26 - 8
inc/classes/BxDolGridConnections.php

@@ -49,10 +49,7 @@ class BxDolGridConnections extends BxTemplGrid
      */
     public function performActionAccept()
     {
-        $iId = 0;
-        $aIds = bx_get('ids');
-        if ($aIds && is_array($aIds))
-            $iId = (int)array_pop($aIds);
+        list ($iId, $iViewedId) = $this->_prepareIds();
 
         if (!$iId) {
             echoJson(array('msg' => _t('_sys_txt_error_occured')));
@@ -61,7 +58,7 @@ class BxDolGridConnections extends BxTemplGrid
 
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
 
-        $a = $oConn->actionAdd($iId);
+        $a = $oConn->actionAdd($iId, $iViewedId);
         if (isset($a['err']) && $a['err'])
             echoJson(array('msg' => $a['msg']));
         else
@@ -78,12 +75,14 @@ class BxDolGridConnections extends BxTemplGrid
 
     protected function _delete ($mixedId)
     {
+        list ($iId, $iViewedId) = $this->_prepareIds();
+
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
 
-        if ($oConn->isConnected(bx_get_logged_profile_id(), (int)$mixedId, true))
-            $a = $oConn->actionRemove($mixedId);
+        if ($oConn->isConnected($iViewedId, $iId, true))
+            $a = $oConn->actionRemove($iId, $iViewedId);
         else
-            $a = $oConn->actionReject($mixedId);
+            $a = $oConn->actionReject($iId, $iViewedId);
 
         return isset($a['err']) && $a['err'] ? false : true;
     }
@@ -151,6 +150,25 @@ class BxDolGridConnections extends BxTemplGrid
 
         return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
     }
+
+    protected function _prepareIds ()
+    {
+        $iViewedId = false;
+        $iId = 0;
+        $aIds = bx_get('ids');
+        if ($aIds && is_array($aIds))
+            $mixedId = array_pop($aIds);
+
+        if (false === strpos($mixedId, ':')) {
+            $iId = (int)$mixedId;
+        }
+        else {
+            list ($iId, $iViewedId) = explode (':', $mixedId);
+            $iId = (int)$iId;
+            $iViewedId = (int)$iViewedId;
+        }
+        return array($iId, $iViewedId);
+    }
 }
 
 /** @} */

+ 30 - 0
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -50,6 +50,12 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolPro
     }
 
     // ====== SERVICE METHODS
+
+	public function serviceGetContentInfoById($iContentId)
+    {
+        return $this->_oDb->getContentInfoById((int)$iContentId);
+    }
+
 	public function serviceGetMenuAddonManageTools()
 	{
 		bx_import('SearchResult', $this->_aModule);
@@ -164,6 +170,11 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolPro
         return parent::serviceFormsHelper ();
     }
 
+    public function serviceActAsProfile ()
+    {
+        return true;
+    }
+
     public function serviceBrowseRecentProfiles ($bDisplayEmptyMsg = false)
     {
         return $this->_serviceBrowse ('recent', false, BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
@@ -410,6 +421,25 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolPro
         return $isConnected ? _t('_sys_txt_access_denied') : CHECK_ACTION_RESULT_ALLOWED;
     }
 
+    protected function _checkAllowedConnectContent (&$aDataEntry, $isPerformAction, $sObjConnection, $isMutual, $isInvertResult, $isSwap = false)
+    {
+        if (!$this->_iProfileId)
+            return _t('_sys_txt_access_denied');
+
+        $CNF = &$this->_oConfig->CNF;
+
+        $oConn = BxDolConnection::getObjectInstance($sObjConnection);
+        if ($isSwap)
+            $isConnected = $oConn->isConnected($aDataEntry[$CNF['FIELD_ID']], $this->_iProfileId, $isMutual);
+        else
+            $isConnected = $oConn->isConnected($this->_iProfileId, $aDataEntry[$CNF['FIELD_ID']], $isMutual);
+
+        if ($isInvertResult)
+            $isConnected = !$isConnected;
+
+        return $isConnected ? _t('_sys_txt_access_denied') : CHECK_ACTION_RESULT_ALLOWED;
+    }
+
     protected function _buildRssParams($sMode, $aArgs)
     {
         $aParams = array ();

+ 5 - 3
modules/base/profile/classes/BxBaseModProfilePageEntry.php

@@ -65,9 +65,11 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
         }
 
         // display message if it is possible to switch to this profile
-        $oProfile = $this->_aContentInfo ? BxDolProfile::getInstanceByContentTypeAccount($this->_aContentInfo['id'], $this->MODULE) : false;
-        if ($oProfile)
-            $oProfile->checkSwitchToProfile($this->_oTemplate);
+        if ($this->_oModule->serviceActAsProfile()) {
+            $oProfile = $this->_aContentInfo ? BxDolProfile::getInstanceByContentTypeAccount($this->_aContentInfo['id'], $this->MODULE) : false;
+            if ($oProfile)
+                $oProfile->checkSwitchToProfile($this->_oTemplate);
+        }
 
         // add informers
         if ($aInformers && $oInformer) {

+ 152 - 0
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -0,0 +1,152 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+class BxGroupsConfig extends BxBaseModProfileConfig
+{
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2Methods = array (
+            'view-group-profile' => 'checkAllowedView',
+            'edit-group-profile' => 'checkAllowedEdit',
+            'delete-group-profile' => 'checkAllowedDelete',
+            'profile-fan-add' => 'checkAllowedFanAdd',
+            'profile-fan-remove' => 'checkAllowedFanRemove',
+            'profile-subscribe-add' => 'checkAllowedSubscribeAdd',
+            'profile-subscribe-remove' => 'checkAllowedSubscribeRemove',
+            'profile-actions-more' => 'checkAllowedViewMoreMenu',
+            'profile-set-acl-level' => 'checkAllowedSetMembership',
+        );
+
+        $this->CNF = array (
+
+            // module icon
+            'ICON' => 'group col-red2',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_NAME' => 'group_name',
+            'FIELD_PICTURE' => 'picture',
+            'FIELD_PICTURE_PREVIEW' => 'picture_preview',
+            'FIELD_COVER' => 'cover',
+            'FIELD_COVER_PREVIEW' => 'cover_preview',
+            'FIELDS_QUICK_SEARCH' => array('group_name'),
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-group-profile',
+            'URI_EDIT_ENTRY' => 'edit-group-profile',
+            'URI_EDIT_COVER' => 'edit-group-cover',
+        	'URI_MANAGE_COMMON' => 'groups-manage',
+
+            'URL_HOME' => 'page.php?i=groups-home',
+        	'URL_MANAGE_COMMON' => 'page.php?i=groups-manage',
+        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=groups-administration',
+
+            // some params
+            'PARAM_AUTOAPPROVAL' => 'bx_groups_autoapproval',
+            'PARAM_DEFAULT_ACL_LEVEL' => 'bx_groups_default_acl_level',
+            'PARAM_NUM_RSS' => 'bx_groups_num_rss',
+            'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_groups_num_connections_quick',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_groups_pics',
+            'OBJECT_STORAGE_COVER' => 'bx_groups_pics',
+            'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_groups_thumb',
+            'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_groups_icon',
+            'OBJECT_IMAGES_TRANSCODER_AVATAR' => 'bx_groups_avatar',
+            'OBJECT_IMAGES_TRANSCODER_PICTURE' => 'bx_groups_picture',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_groups_cover',
+            'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_groups_cover_thumb',
+            'OBJECT_VIEWS' => 'bx_groups',
+            'OBJECT_METATAGS' => 'bx_groups',
+            'OBJECT_FORM_ENTRY' => 'bx_group',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_group_view',
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_group_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_group_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_group_edit_cover',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_group_delete',
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_groups_view_actions', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_groups_view_actions_more', // actions menu on view entry page for "more" popup
+            'OBJECT_MENU_SUBMENU' => 'bx_groups_submenu', // main module submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_groups_view_submenu',  // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER' => 'bx_groups_view_submenu_cover',  // view entry submenu displayed in cover
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'groups-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_groups_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_PAGE_VIEW_ENTRY' => 'bx_groups_view_profile',
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_groups_administration',
+        	'OBJECT_GRID_COMMON' => 'bx_groups_common',
+
+        	'TRIGGER_PAGE_VIEW_ENTRY' => 'trigger_page_groups_view_entry',
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+                'bx_groups_view_actions' => $aMenuItems2Methods,
+                'bx_groups_view_actions_more' => $aMenuItems2Methods,
+            ),
+
+            // informer messages
+            'INFORMERS' => array (
+                'status' => array (
+                    'name' => 'bx-groups-status-not-active',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_groups_txt_account_pending',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_groups_txt_account_suspended',
+                    ),
+                ),
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_groups_txt_sample_single',
+                'menu_item_title_befriend_sent' => '_bx_groups_menu_item_title_befriend_sent',
+                'menu_item_title_unfriend_cancel_request' => '_bx_groups_menu_item_title_unfriend_cancel_request',
+                'menu_item_title_befriend_confirm' => '_bx_groups_menu_item_title_befriend_confirm',
+                'menu_item_title_unfriend_reject_request' => '_bx_groups_menu_item_title_unfriend_reject_request',
+                'menu_item_title_befriend' => '_bx_groups_menu_item_title_befriend',
+                'menu_item_title_unfriend' => '_bx_groups_menu_item_title_unfriend',
+            	'grid_action_err_delete' => '_bx_groups_grid_action_err_delete',
+            	'grid_txt_account_manager' => '_bx_groups_grid_txt_account_manager',
+				'filter_item_active' => '_bx_groups_grid_filter_item_title_adm_active',
+            	'filter_item_pending' => '_bx_groups_grid_filter_item_title_adm_pending',
+            	'filter_item_suspended' => '_bx_groups_grid_filter_item_title_adm_suspended',
+            	'filter_item_select_one_filter1' => '_bx_groups_grid_filter_item_title_adm_select_one_filter1',
+            	'menu_item_manage_my' => '_bx_groups_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_groups_menu_item_title_manage_all',
+            ),
+
+        );
+
+        $this->_aJsClasses = array(
+        	'manage_tools' => 'BxGroupsManageTools'
+        );
+
+        $this->_aJsObjects = array(
+        	'manage_tools' => 'oBxGroupsManageTools'
+        );
+
+        $this->_aGridObjects = array(
+        	'common' => $this->CNF['OBJECT_GRID_COMMON'],
+        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
+        	
+        );
+    }
+
+}
+
+/** @} */

+ 23 - 0
modules/boonex/groups/classes/BxGroupsDb.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/*
+ * Groups module database queries
+ */
+class BxGroupsDb extends BxBaseModProfileDb
+{
+    public function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/groups/classes/BxGroupsFormEntry.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit Group Form.
+ */
+class BxGroupsFormEntry extends BxBaseModProfileFormEntry
+{
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($aInfo, $oTemplate);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/groups/classes/BxGroupsFormsEntryHelper.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * Group profile forms functions
+ */
+class BxGroupsFormsEntryHelper extends BxBaseModProfileFormsEntryHelper
+{
+    public function __construct($oModule)
+    {
+        parent::__construct($oModule);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/groups/classes/BxGroupsGridAdministration.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ * 
+ * @{
+ */
+
+class BxGroupsGridAdministration extends BxBaseModProfileGridAdministration
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_groups';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/groups/classes/BxGroupsGridCommon.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Posts Posts
+ * @ingroup     TridentModules
+ * 
+ * @{
+ */
+
+class BxGroupsGridCommon extends BxBaseModProfileGridCommon
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_groups';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/groups/classes/BxGroupsGridConnections.php

@@ -0,0 +1,68 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ * 
+ * @{
+ */
+
+class BxGroupsGridConnections extends BxDolGridConnections
+{
+    protected $_iContentId;
+
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+        $this->_sContentModule = 'bx_groups';
+        $this->_sObjectConnections = 'bx_groups_fans';
+
+        parent::__construct ($aOptions, $oTemplate);
+
+        $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+        if (!$iProfileId)
+            return;
+
+        $oProfile = BxDolProfile::getInstance($iProfileId);
+        if (!$oProfile)
+            return;
+
+        $oConnection = BxDolConnection::getObjectInstance($this->_sObjectConnections);
+        if (!$oConnection)
+            return;
+
+        $aProfileInfo = $oProfile->getInfo();
+        $this->_iContentId = $aProfileInfo['content_id'];
+
+        $oModule = BxDolModule::getInstance($aProfileInfo['type']);
+        $aContentInfo = BxDolService::call($aProfileInfo['type'], 'get_content_info_by_id', array($this->_iContentId));
+        if (CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aContentInfo) || $oProfile->id() == bx_get_logged_profile_id())
+            $this->_bOwner = true;
+
+        $aSQLParts = $oConnection->getConnectedInitiatorsAsSQLParts('p', 'id', $this->_iContentId, $this->_bOwner ? false : true);
+        $this->addMarkers(array(
+            'profile_id' => $oProfile->id(),
+            'join_connections' => $aSQLParts['join'],
+            'content_module' => $this->_sContentModule,
+        ));
+    }
+
+    protected function _getActionAccept ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
+    {
+        if (isset($aRow[$this->_aOptions['field_id']]))
+            $a['attr']['bx_grid_action_data'] = $aRow[$this->_aOptions['field_id']] . ':' . $this->_iContentId;
+
+        return parent::_getActionAccept ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
+    }
+
+    protected function _getActionDelete ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
+    {
+        if (isset($aRow[$this->_aOptions['field_id']]))
+            $a['attr']['bx_grid_action_data'] = $aRow[$this->_aOptions['field_id']] . ':' . $this->_iContentId;
+
+        return parent::_getActionDelete ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
+    }
+}
+
+/** @} */

+ 25 - 0
modules/boonex/groups/classes/BxGroupsMenuManageTools.php

@@ -0,0 +1,25 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * 'Groups manage tools' menu.
+ */
+class BxGroupsMenuManageTools extends BxBaseModProfileMenuManageTools
+{
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 47 - 0
modules/boonex/groups/classes/BxGroupsMenuView.php

@@ -0,0 +1,47 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * 'View group' menu.
+ */
+class BxGroupsMenuView extends BxBaseModProfileMenuView
+{
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($aObject, $oTemplate);
+
+        if ($this->_oProfile && isLogged()) {
+
+            $oConn = BxDolConnection::getObjectInstance('bx_groups_fans');
+            if ($oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_aProfileInfo['content_id'])) {
+                $this->addMarkers(array(
+                    'title_add_fan' => _t('_bx_groups_menu_item_title_become_fan_sent'),
+                    'title_remove_fan' => _t('_bx_groups_menu_item_title_leave_group_cancel_request'),
+                ));
+            } /* elseif ($oConn->isConnectedNotMutual($this->_aProfileInfo['content_id'], bx_get_logged_profile_id())) {
+                $this->addMarkers(array(
+                    'title_add_fan' => _t('_bx_groups_menu_item_title_become_fan_confirm'),
+                    'title_remove_fan' => _t('_bx_groups_menu_item_title_leave_group_reject_request'),
+                ));
+            } */ else {
+                $this->addMarkers(array(
+                    'title_add_fan' => _t('_bx_groups_menu_item_title_become_fan'),
+                    'title_remove_fan' => _t('_bx_groups_menu_item_title_leave_group'),
+                ));
+            }
+
+        }
+    }
+}
+
+/** @} */

+ 92 - 0
modules/boonex/groups/classes/BxGroupsModule.php

@@ -0,0 +1,92 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * Groups profiles module.
+ */
+class BxGroupsModule extends BxBaseModProfileModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    public function serviceGetMenuSetNameForMenuTrigger ($sMenuTriggerName)
+    {
+        if ('trigger_profile_view_submenu' == $sMenuTriggerName)
+            return '';
+        elseif ('trigger_group_view_submenu' == $sMenuTriggerName)
+            return $this->_oConfig->CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY'];
+        else
+            return parent::serviceGetMenuSetNameForMenuTrigger ($sMenuTriggerName);
+    }
+
+    public function serviceActAsProfile ()
+    {
+        return false;
+    }
+
+    public function servicePrepareFields ($aFieldsProfile)
+    {
+        $aFieldsProfile['group_name'] = $aFieldsProfile['name'];
+        $aFieldsProfile['group_desc'] = isset($aFieldsProfile['description']) ? $aFieldsProfile['description'] : '';
+        unset($aFieldsProfile['name']);
+        unset($aFieldsProfile['description']);
+        return $aFieldsProfile;
+    }
+
+    public function serviceFansTable ()
+    {
+        $oGrid = BxDolGrid::getObjectInstance('bx_groups_fans');
+        if (!$oGrid)
+            return false;
+
+        return $oGrid->getCode();
+    }
+
+    public function serviceFans ($iContentId = 0)
+    {
+        if (!$iContentId)
+            $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if (!$iContentId)
+            return false;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if (!$aContentInfo)
+            return false;
+
+        bx_import('BxDolConnection');
+        $s = $this->serviceBrowseConnectionsQuick ($iContentId, 'bx_groups_fans', BX_CONNECTIONS_CONTENT_TYPE_CONTENT, true);
+        if (!$s)
+            return MsgBox(_t('_sys_txt_empty'));
+        return $s;
+    }
+
+    /**
+     * @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden.
+     */
+    public function checkAllowedFanAdd (&$aDataEntry, $isPerformAction = false)
+    {
+        return $this->_checkAllowedConnectContent ($aDataEntry, $isPerformAction, 'bx_groups_fans', true, false);
+    }
+
+    /**
+     * @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden.
+     */
+    public function checkAllowedFanRemove (&$aDataEntry, $isPerformAction = false)
+    {
+        if (CHECK_ACTION_RESULT_ALLOWED === $this->_checkAllowedConnectContent ($aDataEntry, $isPerformAction, 'sys_profiles_friends', false, true, true))
+            return CHECK_ACTION_RESULT_ALLOWED;
+        return $this->_checkAllowedConnectContent ($aDataEntry, $isPerformAction, 'bx_groups_fans', false, true, false);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/groups/classes/BxGroupsPageBrowse.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * Browse entries pages.
+ */
+class BxGroupsPageBrowse extends BxBaseModProfilePageBrowse
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/groups/classes/BxGroupsPageEntry.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/**
+ * Profile create/edit/delete pages.
+ */
+class BxGroupsPageEntry extends BxBaseModProfilePageEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 138 - 0
modules/boonex/groups/classes/BxGroupsSearchResult.php

@@ -0,0 +1,138 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+class BxGroupsSearchResult extends BxBaseModProfileSearchResult
+{
+    function __construct($sMode = '', $aParams = false)
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent =  array(
+            'name' => 'bx_groups',
+            'module_name' => 'bx_groups',
+            'object_metatags' => 'bx_groups',
+            'title' => _t('_bx_groups_page_title_browse'),
+            'table' => 'sys_profiles',
+            'tableSearch' => 'bx_groups_data',
+            'ownFields' => array(),
+            'searchFields' => array('group_name', 'group_desc'),
+            'restriction' => array(
+        		'account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='),
+                'perofileStatus' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+                'perofileType' => array('value' => 'bx_groups', 'field' => 'type', 'operator' => '='),
+                'owner' => array('value' => '', 'field' => 'author', 'operator' => '=', 'table' => 'bx_groups_data'),
+            ),
+            'join' => array (
+                'profile' => array(
+                    'type' => 'INNER',
+                    'table' => 'bx_groups_data',
+                    'mainField' => 'content_id',
+                    'onField' => 'id',
+                    'joinFields' => array('id', 'group_name', 'picture', 'added'),
+                ),
+                'account' => array(
+                    'type' => 'INNER',
+                    'table' => 'sys_accounts',
+                    'mainField' => 'account_id',
+                    'onField' => 'id',
+                    'joinFields' => array(),
+                ),
+            ),
+            'paginate' => array('perPage' => 20, 'start' => 0),
+            'sorting' => 'none',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'group_name',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'group_name',
+                    'Picture' => 'picture',
+                ),
+            ),
+            'ident' => 'id'
+        );
+
+        $this->sFilterName = 'bx_groups_data_filter';
+        $this->oModule = $this->getMain();
+
+        switch ($sMode) {
+
+            case 'connections':
+                if ($this->_setConnectionsConditions($aParams)) {
+                    $oProfile = BxDolProfile::getInstance($aParams['profile']);
+                    $oProfile2 = isset($aParams['profile2']) ? BxDolProfile::getInstance($aParams['profile2']) : null;
+
+                    if (isset($aParams['type']) && $aParams['type'] == 'common' && $oProfile && $oProfile2)
+                        $this->aCurrent['title'] = _t('_bx_groups_page_title_browse_connections_mutual', $oProfile->getDisplayName(), $oProfile2->getDisplayName());
+                    elseif ((!isset($aParams['type']) || $aParams['type'] != 'common') && $oProfile)
+                        $this->aCurrent['title'] = _t('_bx_groups_page_title_browse_connections', $oProfile->getDisplayName());
+
+                    $this->aCurrent['rss']['link'] = 'modules/?r=groups/rss/' . $sMode . '/' . $aParams['object'] . '/' . $aParams['type'] . '/' . (int)$aParams['profile'] . '/' . (int)$aParams['profile2'] . '/' . (int)$aParams['mutual'];
+                }
+                break;
+
+            case 'recent':
+                $this->aCurrent['rss']['link'] = 'modules/?r=groups/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_groups_page_title_browse_recent');
+                $this->aCurrent['sorting'] = 'last';
+                $this->sBrowseUrl = 'page.php?i=groups-home';
+                break;
+
+            case 'active':
+                $this->aCurrent['rss']['link'] = 'modules/?r=groups/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_groups_page_title_browse_active');
+                $this->aCurrent['sorting'] = 'active';
+                $this->sBrowseUrl = 'page.php?i=groups-active';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_groups');
+                $this->aCurrent['paginate']['perPage'] = 5;
+                unset($this->aCurrent['rss']);
+                break;
+
+            default:
+                $this->isError = true;
+        }
+
+        parent::__construct();
+    }
+
+    function getAlterOrder()
+    {
+        switch ($this->aCurrent['sorting']) {
+        case 'none':
+            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+        case 'last':
+        default:                        
+            return array('order' => ' ORDER BY `bx_groups_data`.`added` DESC ');
+        }
+    }
+
+    function _getPseud ()
+    {
+        return array(
+            'id' => 'id',
+            'group_name' => 'group_name',
+            'added' => 'added',
+            'author' => 'author',
+            'picture' => 'picture',
+        );
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/groups/classes/BxGroupsTemplate.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+/*
+ * Groups module representation.
+ */
+class BxGroupsTemplate extends BxBaseModProfileTemplate
+{
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_groups';
+        parent::__construct($oConfig, $oDb);
+    }
+}
+
+/** @} */

+ 126 - 0
modules/boonex/groups/install/config.php

@@ -0,0 +1,126 @@
+<?php
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_groups',
+    'title' => 'Groups',
+    'note' => 'Basic group profiles functionality.',
+    'version' => '8.0.0.DEV',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '8.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/groups/',
+    'home_uri' => 'groups',
+
+    'db_prefix' => 'bx_groups_',
+    'class_prefix' => 'BxGroups',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Groups',
+
+    /**
+     * Connections.
+     */
+    'connections' => array(
+    	'sys_profiles_friends' => array ('type' => 'profiles'),
+		'sys_profiles_subscriptions' => array ('type' => 'profiles'),
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_group_view_submenu',
+    ),
+
+    /**
+     * Page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_groups_view_entry', 
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_groups_pics'
+    ),
+
+	/**
+     * Transcoders.
+     */
+    'transcoders' => array(
+    	'bx_groups_icon', 
+    	'bx_groups_thumb', 
+    	'bx_groups_avatar', 
+    	'bx_groups_picture', 
+    	'bx_groups_cover', 
+    	'bx_groups_cover_thumb'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_storages' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'process_connections' => 1,
+    	'process_deleted_profiles' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+    	'process_menu_triggers' => 1,
+    	'process_page_triggers' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 20 - 0
modules/boonex/groups/install/installer.php

@@ -0,0 +1,20 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+class BxGroupsInstaller extends BxBaseModProfileInstaller
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}
+
+/** @} */

+ 229 - 0
modules/boonex/groups/install/langs/en.xml

@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_groups"><![CDATA[Groups]]></string>
+
+	<string name="_bx_groups_option_autoapproval"><![CDATA[Activate all groups after creation automatically]]></string>
+	<string name="_bx_groups_option_default_acl_level"><![CDATA[Default level to assign after group creation]]></string>
+	<string name="_bx_groups_option_num_connections_quick"><![CDATA[Number of items in friends block]]></string>
+	<string name="_bx_groups_option_num_rss"><![CDATA[Number of items in RSS feed]]></string>
+
+	<string name="_bx_groups_form_profile"><![CDATA[Groups]]></string>
+	<string name="_bx_groups_form_profile_display_add"><![CDATA[Add Group]]></string>
+	<string name="_bx_groups_form_profile_display_edit"><![CDATA[Edit Group]]></string>
+	<string name="_bx_groups_form_profile_display_edit_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_groups_form_profile_display_delete"><![CDATA[Delete Group]]></string>
+	<string name="_bx_groups_form_profile_display_view"><![CDATA[View Group]]></string>
+	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_name"><![CDATA[Group Name]]></string>
+    <string name="_bx_groups_form_profile_input_group_name"><![CDATA[Group Name]]></string>
+    <string name="_bx_groups_form_profile_input_group_name_err"><![CDATA[This information is essential. Please, fill in this field.]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_name"><![CDATA[Description]]></string>
+    <string name="_bx_groups_form_profile_input_group_name"><![CDATA[Description]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_cat"><![CDATA[Category]]></string>
+	<string name="_bx_groups_form_profile_input_group_cat"><![CDATA[Category]]></string>
+    <string name="_bx_groups_form_profile_input_group_cat_err"><![CDATA[Category field is mandatory]]></string>
+	<string name="_bx_groups_form_profile_input_sys_picture"><![CDATA[Group Picture]]></string>
+	<string name="_bx_groups_form_profile_input_picture"><![CDATA[Upload New Group Picture]]></string>
+	<string name="_bx_groups_form_profile_input_sys_picture_preview"><![CDATA[Group Picture Preview]]></string>
+	<string name="_bx_groups_form_profile_input_picture_preview"><![CDATA[Current Group Picture]]></string>
+	<string name="_bx_groups_form_profile_input_picture_err"><![CDATA[Group picture is mandatory.]]></string>
+	<string name="_bx_groups_form_profile_input_sys_cover"><![CDATA[Cover Picture]]></string>
+	<string name="_bx_groups_form_profile_input_cover"><![CDATA[Upload New Cover Picture]]></string>
+	<string name="_bx_groups_form_profile_input_sys_cover_preview"><![CDATA[Cover Picture Preview]]></string>
+	<string name="_bx_groups_form_profile_input_cover_preview"><![CDATA[Current Cover Picture]]></string>
+	<string name="_bx_groups_form_profile_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this group]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete group.]]></string>
+
+	<string name="_bx_groups_acl_action_create_profile"><![CDATA[Create Group]]></string>
+	<string name="_bx_groups_acl_action_delete_profile"><![CDATA[Delete Group]]></string>
+	<string name="_bx_groups_acl_action_view_profile"><![CDATA[View Group]]></string>
+	<string name="_bx_groups_acl_action_edit_any_profile"><![CDATA[Edit Any Group]]></string>
+
+	<string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Create Group]]></string>
+	<string name="_bx_groups_page_title_create_profile"><![CDATA[Create Group]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Edit Group]]></string>
+	<string name="_bx_groups_page_title_edit_profile"><![CDATA[Edit Group]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Edit Group Cover]]></string>
+	<string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Delete Group]]></string>
+	<string name="_bx_groups_page_title_delete_profile"><![CDATA[Delete Group]]></string>
+	<string name="_bx_groups_page_title_sys_view_profile"><![CDATA[View Group]]></string>
+	<string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_groups_page_title_browse"><![CDATA[Groups]]></string>
+	<string name="_bx_groups_page_title_browse_active"><![CDATA[Recently Active Groups]]></string>
+	<string name="_bx_groups_page_title_browse_recent"><![CDATA[Recently Added Groups]]></string>
+	<string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} connections]]></string>
+	<string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+	<string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_groups_page_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Fans]]></string>
+	<string name="_bx_groups_page_title_group_fans"><![CDATA[Fans]]></string>
+	<string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Group Info]]></string>
+	<string name="_bx_groups_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
+	<string name="_bx_groups_page_title_sys_recent"><![CDATA[Recently Added Groups]]></string>
+	<string name="_bx_groups_page_title_recent"><![CDATA[Recently Added Groups]]></string>
+	<string name="_bx_groups_page_title_sys_manage"><![CDATA[Manage Own Groups]]></string>
+	<string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Manage All Groups]]></string>
+	<string name="_bx_groups_page_title_manage"><![CDATA[Manage Groups]]></string>
+	<string name="_bx_groups_page_title_sys_active"><![CDATA[Recently Active People]]></string>
+	<string name="_bx_groups_page_title_active"><![CDATA[Recently Active People]]></string>
+
+	<string name="_bx_groups_page_block_title_create_profile"><![CDATA[Create Group]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Edit Group]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Delete Group]]></string>
+	<string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[About <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_groups_page_block_title_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_groups_page_block_title_fans_link"><![CDATA[Fans of <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_fans"><![CDATA[Fans]]></string>
+	<string name="_bx_groups_page_block_title_system_fans"><![CDATA[Fans]]></string>
+	<string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Actions]]></string>
+	<string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[Recently Added Groups]]></string>
+	<string name="_bx_groups_page_block_title_system_manage"><![CDATA[Manage Own Groups]]></string>
+	<string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Manage All Groups]]></string>
+	<string name="_bx_groups_page_block_title_manage"><![CDATA[Manage Groups]]></string>
+    <string name="_bx_groups_page_block_title_active_profiles"><![CDATA[Recently Active Groups]]></string>
+
+    <string name="_bx_groups_page_block_title_categories"><![CDATA[Group categories]]></string>
+
+    <string name="_bx_groups_menu_title_submenu"><![CDATA[Groups Submenu]]></string>
+    <string name="_bx_groups_menu_set_title_submenu"><![CDATA[Groups Submenu]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions"><![CDATA[Group Actions]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions"><![CDATA[Group Actions]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions_more"><![CDATA[Group More Actions]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions_more"><![CDATA[Group More Actions]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_submenu"><![CDATA[View Group Submenu]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu"><![CDATA[View Group Submenu]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu_cover"><![CDATA[Group Cover Submenu]]></string>
+	<string name="_bx_groups_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_groups_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_groups_menu_item_title_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_groups_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_groups_menu_item_title_system_edit_profile"><![CDATA[Edit Group]]></string>
+    <string name="_bx_groups_menu_item_title_edit_profile"><![CDATA[Edit Group]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_profile"><![CDATA[Delete Group]]></string>
+    <string name="_bx_groups_menu_item_title_delete_profile"><![CDATA[Delete Group]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_groups_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_groups_menu_item_title_system_profile_type"><![CDATA[Group]]></string>
+    <string name="_bx_groups_menu_item_title_profile_type"><![CDATA[Group]]></string>
+    <string name="_bx_groups_menu_item_title_system_create_profile"><![CDATA[Create Group]]></string>
+    <string name="_bx_groups_menu_item_title_create_profile"><![CDATA[Create Group]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_fans"><![CDATA[Fans]]></string>
+    <string name="_bx_groups_menu_item_title_view_fans"><![CDATA[Fans]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_view"><![CDATA[Group]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_view"><![CDATA[Group]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_groups_menu_item_title_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_sent"><![CDATA[Add friend (requested)]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_confirm"><![CDATA[Accept friend request]]></string>
+    <string name="_bx_groups_menu_item_title_system_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_cancel_request"><![CDATA[Cancel friend request]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_reject_request"><![CDATA[Reject friend request]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_become_fan"><![CDATA[Become fan]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan"><![CDATA[Become fan]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_sent"><![CDATA[Become fan (requested)]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_confirm"><![CDATA[Accept fan request]]></string>
+    <string name="_bx_groups_menu_item_title_system_leave_group"><![CDATA[Leave]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group"><![CDATA[Leave]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_cancel_request"><![CDATA[Cancel fan request]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_reject_request"><![CDATA[Reject fan request]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_subscribe"><![CDATA[Subscribe]]></string>
+    <string name="_bx_groups_menu_item_title_subscribe"><![CDATA[Subscribe]]></string>
+    <string name="_bx_groups_menu_item_title_system_unsubscribe"><![CDATA[Unsubscribe]]></string>
+    <string name="_bx_groups_menu_item_title_unsubscribe"><![CDATA[Unsubscribe]]></string>
+    <string name="_bx_groups_menu_item_title_system_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_groups_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_groups_menu_item_title_system_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_menu_item_title_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_menu_item_title_system_friend_requests"><![CDATA[Friend requests number]]></string>
+    <string name="_bx_groups_menu_item_title_friend_requests"><![CDATA[{addon} friend requests]]></string>
+    <string name="_bx_groups_menu_item_title_system_manage_my_groups"><![CDATA[My groups]]></string>
+    <string name="_bx_groups_menu_item_title_manage_my_groups"><![CDATA[{addon} groups]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_recent"><![CDATA[Recent Groups]]></string>
+    <string name="_bx_groups_menu_item_title_entries_recent"><![CDATA[Recent Groups]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_manage"><![CDATA[Manage Groups]]></string>
+    <string name="_bx_groups_menu_item_title_entries_manage"><![CDATA[Manage Groups]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_home"><![CDATA[Groups]]></string>
+    <string name="_bx_groups_menu_item_title_entries_home"><![CDATA[Groups]]></string>
+    <string name="_bx_groups_menu_item_title_system_admt_groups"><![CDATA[Groups]]></string>
+	<string name="_bx_groups_menu_item_title_admt_groups"><![CDATA[Groups - {addon} unapproved]]></string>
+	<string name="_bx_groups_menu_item_title_manage_my"><![CDATA[My Groups]]></string>
+	<string name="_bx_groups_menu_item_title_manage_all"><![CDATA[All Groups]]></string>
+	<string name="_bx_groups_menu_item_title_system_entries_active"><![CDATA[Active Groups]]></string>
+	<string name="_bx_groups_menu_item_title_entries_active"><![CDATA[Active Groups]]></string>
+
+	<string name="_bx_groups_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
+	<string name="_bx_groups_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_groups_grid_column_title_adm_group_name"><![CDATA[Name]]></string>
+    <string name="_bx_groups_grid_column_title_adm_last_online"><![CDATA[Last Online]]></string>
+    <string name="_bx_groups_grid_column_title_adm_account"><![CDATA[Account]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_groups_grid_action_title_adm_set_acl_level"><![CDATA[Set Membership]]></string>
+    <string name="_bx_groups_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+	<string name="_bx_groups_grid_action_err_delete"><![CDATA[Cannot delete the selected group(s).]]></string>
+	<string name="_bx_groups_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_groups_txt_account_pending"><![CDATA[This group is pending approval, please wait until it is activated.]]></string>
+    <string name="_bx_groups_txt_account_suspended"><![CDATA[This group is suspended.]]></string>
+
+    <string name="_bx_groups_pre_lists_cats"><![CDATA[Group categories]]></string>
+    <string name="_bx_groups_cat_Agriculture"><![CDATA[Agriculture]]></string>
+    <string name="_bx_groups_cat_Financial"><![CDATA[Financial]]></string>
+    <string name="_bx_groups_cat_Biotech"><![CDATA[Biotech]]></string>
+    <string name="_bx_groups_cat_Cause"><![CDATA[Cause]]></string>
+    <string name="_bx_groups_cat_Chemical"><![CDATA[Chemical]]></string>
+    <string name="_bx_groups_cat_Religious"><![CDATA[Religious]]></string>
+    <string name="_bx_groups_cat_Community"><![CDATA[Community]]></string>
+    <string name="_bx_groups_cat_Company"><![CDATA[Company]]></string>
+    <string name="_bx_groups_cat_Entertainment"><![CDATA[Entertainment]]></string>
+    <string name="_bx_groups_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_groups_cat_Consulting"><![CDATA[Consulting]]></string>
+    <string name="_bx_groups_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_groups_cat_Energy"><![CDATA[Energy]]></string>
+    <string name="_bx_groups_cat_Engineering"><![CDATA[Engineering]]></string>
+    <string name="_bx_groups_cat_Food"><![CDATA[Food]]></string>
+    <string name="_bx_groups_cat_Government"><![CDATA[Government]]></string>
+    <string name="_bx_groups_cat_Health"><![CDATA[Health]]></string>
+    <string name="_bx_groups_cat_Medical"><![CDATA[Medical]]></string>
+    <string name="_bx_groups_cat_Industrial"><![CDATA[Industrial]]></string>
+    <string name="_bx_groups_cat_Insurance"><![CDATA[Insurance]]></string>
+    <string name="_bx_groups_cat_Internet"><![CDATA[Internet]]></string>
+    <string name="_bx_groups_cat_Software"><![CDATA[Software]]></string>
+    <string name="_bx_groups_cat_Legal"><![CDATA[Legal]]></string>
+    <string name="_bx_groups_cat_Media"><![CDATA[Media]]></string>
+    <string name="_bx_groups_cat_School"><![CDATA[School]]></string>
+    <string name="_bx_groups_cat_NGO"><![CDATA[NGO]]></string>
+    <string name="_bx_groups_cat_NPO"><![CDATA[NPO]]></string>
+    <string name="_bx_groups_cat_Political"><![CDATA[Political]]></string>
+    <string name="_bx_groups_cat_Retail"><![CDATA[Retail]]></string>
+    <string name="_bx_groups_cat_Small_Business"><![CDATA[Small Business]]></string>
+    <string name="_bx_groups_cat_Telecommunication"><![CDATA[Telecommunication]]></string>
+    <string name="_bx_groups_cat_Transport"><![CDATA[Transport]]></string>
+    <string name="_bx_groups_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_groups_cat_University"><![CDATA[University]]></string>
+    <string name="_bx_groups_cat_Other"><![CDATA[Other]]></string>
+
+    <string name="_bx_groups_txt_sample_single"><![CDATA[group]]></string>
+</resources>

+ 228 - 0
modules/boonex/groups/install/langs/ru.xml

@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_groups"><![CDATA[Группы]]></string>
+
+	<string name="_bx_groups_option_autoapproval"><![CDATA[Автоматически активировать все группы после создания]]></string>
+	<string name="_bx_groups_option_default_acl_level"><![CDATA[Уровень, назначаемый созданной группе по умолчанию]]></string>
+	<string name="_bx_groups_option_num_connections_quick"><![CDATA[Число элементов в блоке друзей]]></string>
+	<string name="_bx_groups_option_num_rss"><![CDATA[Число элементов в ленте RSS]]></string>
+
+	<string name="_bx_groups_form_profile"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_form_profile_display_add"><![CDATA[Добавить группу]]></string>
+	<string name="_bx_groups_form_profile_display_edit"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_form_profile_display_edit_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_groups_form_profile_display_delete"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_form_profile_display_view"><![CDATA[Просмотреть группу]]></string>
+	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_name"><![CDATA[Название группы]]></string>
+    <string name="_bx_groups_form_profile_input_group_name"><![CDATA[Название группы]]></string>
+    <string name="_bx_groups_form_profile_input_group_name_err"><![CDATA[Эта информация необходима. Пожалуйста, заполните это поле.]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_name"><![CDATA[Описание]]></string>
+    <string name="_bx_groups_form_profile_input_group_name"><![CDATA[Описание]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_groups_form_profile_input_group_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_groups_form_profile_input_group_cat_err"><![CDATA[Поле категории необходимо]]></string>
+	<string name="_bx_groups_form_profile_input_sys_picture"><![CDATA[Картинка группы]]></string>
+	<string name="_bx_groups_form_profile_input_picture"><![CDATA[Загрузить новую картинку группы]]></string>
+	<string name="_bx_groups_form_profile_input_sys_picture_preview"><![CDATA[Предпросмотр картинки группы]]></string>
+	<string name="_bx_groups_form_profile_input_picture_preview"><![CDATA[Текущая картинка группы]]></string>
+	<string name="_bx_groups_form_profile_input_picture_err"><![CDATA[Необходима картинка группы.]]></string>
+	<string name="_bx_groups_form_profile_input_sys_cover"><![CDATA[Картинка обложки]]></string>
+	<string name="_bx_groups_form_profile_input_cover"><![CDATA[Загрузить новую картинку обложки]]></string>
+	<string name="_bx_groups_form_profile_input_sys_cover_preview"><![CDATA[Предпросмотр картинки обложки]]></string>
+	<string name="_bx_groups_form_profile_input_cover_preview"><![CDATA[Текущая картинка обложки]]></string>
+	<string name="_bx_groups_form_profile_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить эту группу]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено.]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить группу.]]></string>
+
+	<string name="_bx_groups_acl_action_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_acl_action_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_acl_action_view_profile"><![CDATA[Просмотреть группу]]></string>
+	<string name="_bx_groups_acl_action_edit_any_profile"><![CDATA[Редактировать любую группу]]></string>
+
+	<string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_title_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку группы]]></string>
+	<string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_title_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_title_sys_view_profile"><![CDATA[Просмотреть группу]]></string>
+	<string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_groups_page_title_browse"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_page_title_browse_active"><![CDATA[Последние Активные Группы]]></string>
+	<string name="_bx_groups_page_title_browse_recent"><![CDATA[Последние Добавленные Группы]]></string>
+	<string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} связей]]></string>
+	<string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+	<string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_title_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Инфо группы]]></string>
+	<string name="_bx_groups_page_title_profile_info"><![CDATA[Инфо о {display_name}]]></string>
+	<string name="_bx_groups_page_title_sys_recent"><![CDATA[Последние Добавленные Группы]]></string>
+	<string name="_bx_groups_page_title_recent"><![CDATA[Последние Добавленные Группы]]></string>
+	<string name="_bx_groups_page_title_sys_manage"><![CDATA[Управление собственными группами]]></string>
+	<string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Управление всеми группами]]></string>
+	<string name="_bx_groups_page_title_manage"><![CDATA[Управление группами]]></string>
+	<string name="_bx_groups_page_title_sys_active"><![CDATA[Последние Активные Группы]]></string>
+	<string name="_bx_groups_page_title_active"><![CDATA[Последние Активные Группы]]></string>
+    <string name="_bx_groups_page_block_title_categories"><![CDATA[Категории групп]]></string>
+
+	<string name="_bx_groups_page_block_title_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
+	<string name="_bx_groups_page_block_title_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_groups_page_block_title_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_block_title_system_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Действия]]></string>
+	<string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[Последние добавленные группы]]></string>
+	<string name="_bx_groups_page_block_title_system_manage"><![CDATA[Управление собственными группами]]></string>
+	<string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Управление всеми группами]]></string>
+	<string name="_bx_groups_page_block_title_manage"><![CDATA[Управление группами]]></string>
+    <string name="_bx_groups_page_block_title_active_profiles"><![CDATA[Последние Активные Группы]]></string>
+
+    <string name="_bx_groups_menu_title_submenu"><![CDATA[Группы - Подменю]]></string>
+    <string name="_bx_groups_menu_set_title_submenu"><![CDATA[Группы - Подменю]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions"><![CDATA[Группы - Действия]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions"><![CDATA[Группы - Действия]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions_more"><![CDATA[Группы - Дополнительные Действия]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions_more"><![CDATA[Группы - Дополнительные Действия]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра группы]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu"><![CDATA[Подменю просмотра группы]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu_cover"><![CDATA[Подменю группы на обложке]]></string>
+	<string name="_bx_groups_menu_set_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
+    <string name="_bx_groups_menu_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_menu_item_title_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_menu_item_title_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_menu_item_title_system_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_menu_item_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_menu_item_title_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_groups_menu_item_title_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_groups_menu_item_title_system_profile_type"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_profile_type"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_system_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_menu_item_title_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_menu_item_title_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_view"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_view"><![CDATA[Группа]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_groups_menu_item_title_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_sent"><![CDATA[Добавить друга (запрошено)]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_confirm"><![CDATA[Принять запрос о дружбе]]></string>
+    <string name="_bx_groups_menu_item_title_system_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_cancel_request"><![CDATA[Отменить запрос о дружбе]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_reject_request"><![CDATA[Отвергнуть запрос о дружбе]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_become_fan"><![CDATA[Присоедениться]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan"><![CDATA[Присоедениться]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_sent"><![CDATA[Присоединение запрошено]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_confirm"><![CDATA[Одобрить присоединение]]></string>
+    <string name="_bx_groups_menu_item_title_system_leave_group"><![CDATA[Покинуть группу]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group"><![CDATA[Покинуть группу]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_cancel_request"><![CDATA[Отменить присоединение к группе]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_reject_request"><![CDATA[Отвергнуть присоединение к группе]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_subscribe"><![CDATA[Подписаться]]></string>
+    <string name="_bx_groups_menu_item_title_subscribe"><![CDATA[Подписаться]]></string>
+    <string name="_bx_groups_menu_item_title_system_unsubscribe"><![CDATA[Отписаться]]></string>
+    <string name="_bx_groups_menu_item_title_unsubscribe"><![CDATA[Отписаться]]></string>
+    <string name="_bx_groups_menu_item_title_system_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_groups_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_groups_menu_item_title_system_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_system_friend_requests"><![CDATA[Число запросов дружбы]]></string>
+    <string name="_bx_groups_menu_item_title_friend_requests"><![CDATA[{addon} запросов дружбы]]></string>
+    <string name="_bx_groups_menu_item_title_system_manage_my_groups"><![CDATA[Мои группы]]></string>
+    <string name="_bx_groups_menu_item_title_manage_my_groups"><![CDATA[{addon} групп]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_recent"><![CDATA[Новые Группы]]></string>
+    <string name="_bx_groups_menu_item_title_entries_recent"><![CDATA[Новые Группы]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_manage"><![CDATA[Управление Группами]]></string>
+    <string name="_bx_groups_menu_item_title_entries_manage"><![CDATA[Управление Группами]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_home"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_entries_home"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_system_admt_groups"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_menu_item_title_admt_groups"><![CDATA[Группы - {addon} неодобрено]]></string>
+	<string name="_bx_groups_menu_item_title_manage_my"><![CDATA[Мои группы]]></string>
+	<string name="_bx_groups_menu_item_title_manage_all"><![CDATA[Все группы]]></string>
+	<string name="_bx_groups_menu_item_title_system_entries_active"><![CDATA[Активные Группы]]></string>
+	<string name="_bx_groups_menu_item_title_entries_active"><![CDATA[Активные Группы]]></string>
+
+	<string name="_bx_groups_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>
+	<string name="_bx_groups_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_groups_grid_column_title_adm_group_name"><![CDATA[Название]]></string>
+    <string name="_bx_groups_grid_column_title_adm_last_online"><![CDATA[Последнее посещение]]></string>
+    <string name="_bx_groups_grid_column_title_adm_account"><![CDATA[Аккаунт]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_grid_action_title_adm_set_acl_level"><![CDATA[Назначить членство]]></string>
+    <string name="_bx_groups_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+	<string name="_bx_groups_grid_action_err_delete"><![CDATA[Невозможно удалить выбранную(ные) группу(ы).]]></string>
+	<string name="_bx_groups_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+
+    <string name="_bx_groups_txt_account_pending"><![CDATA[Эта группа ожидает одобрения. Пожалуйста, дождитесь ее активации.]]></string>
+    <string name="_bx_groups_txt_account_suspended"><![CDATA[Эта группа заблокирована.]]></string>
+
+    <string name="_bx_groups_pre_lists_cats"><![CDATA[Категории групп]]></string>
+    <string name="_bx_groups_cat_Agriculture"><![CDATA[Сельское хозяйство]]></string>
+    <string name="_bx_groups_cat_Financial"><![CDATA[Финансы]]></string>
+    <string name="_bx_groups_cat_Biotech"><![CDATA[Биотехнологии]]></string>
+    <string name="_bx_groups_cat_Cause"><![CDATA[Дело]]></string>
+    <string name="_bx_groups_cat_Chemical"><![CDATA[Химия]]></string>
+    <string name="_bx_groups_cat_Religious"><![CDATA[Религия]]></string>
+    <string name="_bx_groups_cat_Community"><![CDATA[Общество]]></string>
+    <string name="_bx_groups_cat_Company"><![CDATA[Компания]]></string>
+    <string name="_bx_groups_cat_Entertainment"><![CDATA[Развлечения]]></string>
+    <string name="_bx_groups_cat_Technology"><![CDATA[Технологии]]></string>
+    <string name="_bx_groups_cat_Consulting"><![CDATA[Консультации]]></string>
+    <string name="_bx_groups_cat_Education"><![CDATA[Образование]]></string>
+    <string name="_bx_groups_cat_Energy"><![CDATA[Энергетика]]></string>
+    <string name="_bx_groups_cat_Engineering"><![CDATA[Инженерия]]></string>
+    <string name="_bx_groups_cat_Food"><![CDATA[Питание]]></string>
+    <string name="_bx_groups_cat_Government"><![CDATA[Правительство]]></string>
+    <string name="_bx_groups_cat_Health"><![CDATA[Здоровье]]></string>
+    <string name="_bx_groups_cat_Medical"><![CDATA[Медицина]]></string>
+    <string name="_bx_groups_cat_Industrial"><![CDATA[Промышленность]]></string>
+    <string name="_bx_groups_cat_Insurance"><![CDATA[Страхование]]></string>
+    <string name="_bx_groups_cat_Internet"><![CDATA[Интернет]]></string>
+    <string name="_bx_groups_cat_Software"><![CDATA[Программное обеспечение]]></string>
+    <string name="_bx_groups_cat_Legal"><![CDATA[Право]]></string>
+    <string name="_bx_groups_cat_Media"><![CDATA[СМИ]]></string>
+    <string name="_bx_groups_cat_School"><![CDATA[Школа]]></string>
+    <string name="_bx_groups_cat_NGO"><![CDATA[НПО]]></string>
+    <string name="_bx_groups_cat_NPO"><![CDATA[NPO]]></string>
+    <string name="_bx_groups_cat_Political"><![CDATA[Политика]]></string>
+    <string name="_bx_groups_cat_Retail"><![CDATA[Торговля]]></string>
+    <string name="_bx_groups_cat_Small_Business"><![CDATA[Малый бизнес]]></string>
+    <string name="_bx_groups_cat_Telecommunication"><![CDATA[Телекоммуникации]]></string>
+    <string name="_bx_groups_cat_Transport"><![CDATA[Транспорт]]></string>
+    <string name="_bx_groups_cat_Travel"><![CDATA[Путешествия]]></string>
+    <string name="_bx_groups_cat_University"><![CDATA[Преподавание]]></string>
+    <string name="_bx_groups_cat_Other"><![CDATA[Другое]]></string>
+
+    <string name="_bx_groups_txt_sample_single"><![CDATA[Группа]]></string>
+</resources>

+ 43 - 0
modules/boonex/groups/install/sql/disable.sql

@@ -0,0 +1,43 @@
+
+-- SETTINGS
+
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_groups' 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_groups';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_groups' OR `object` IN('bx_groups_create_profile', 'bx_groups_delete_profile', 'bx_groups_edit_profile', 'bx_groups_edit_profile_cover', 'bx_groups_view_profile', 'bx_groups_profile_info', 'bx_groups_profile_friends', 'bx_groups_home', 'bx_groups_fans');
+
+-- MENU
+
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_groups';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_groups';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_groups' OR `set_name` IN('bx_groups_view_submenu', 'bx_groups_submenu', 'bx_groups_view_actions', 'bx_groups_view_actions_more');
+
+-- 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_groups';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_groups';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `Name` = 'bx_groups';
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_groups';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_groups_cats';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` = 'bx_groups';
+
+-- CONNECTIONS
+DELETE FROM `sys_objects_connection` WHERE `object` = 'bx_groups_fans';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans');

+ 360 - 0
modules/boonex/groups/install/sql/enable.sql

@@ -0,0 +1,360 @@
+
+-- 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_groups', '_bx_groups', 'bx_groups@modules/boonex/groups/|std-mi.png', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_groups', '_bx_groups', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+('bx_groups_autoapproval', 'on', @iCategId, '_bx_groups_option_autoapproval', 'checkbox', '', '', '', 1),
+('bx_groups_default_acl_level', '3', @iCategId, '_bx_groups_option_default_acl_level', 'select', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_memberships";s:6:"params";a:2:{i:0;b:0;i:1;b:1;}s:5:"class";s:16:"TemplAclServices";}', '', '', 2),
+('bx_groups_num_connections_quick', '4', @iCategId, '_bx_groups_option_num_connections_quick', 'digit', '', '', '', 10),
+('bx_groups_num_rss', '10', @iCategId, '_bx_groups_option_num_rss', 'digit', '', '', '', 12);
+
+-- PAGES
+
+-- PAGE: create profile
+
+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_groups_create_profile', 'create-group-profile', '_bx_groups_page_title_sys_create_profile', '_bx_groups_page_title_create_profile', 'bx_groups', 5, 2147483647, 1, 'page.php?i=create-group-profile', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_create_profile', 1, 'bx_groups', '_bx_groups_page_block_title_create_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:13:\"entity_create\";}', 0, 1, 1);
+
+-- PAGE: view profile
+
+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_groups_view_profile', 'view-group-profile', '_bx_groups_page_title_sys_view_profile', '_bx_groups_page_title_view_profile', 'bx_groups', 10, 2147483647, 1, 'page.php?i=view-group-profile', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_view_profile', 2, 'bx_groups', '', '_bx_groups_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
+('bx_groups_view_profile', 3, 'bx_groups', '', '_bx_groups_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 0);
+-- ('bx_groups_view_profile', 3, 'bx_groups', '', '_bx_groups_page_block_title_profile_friends', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:15:\"profile_friends\";}', 0, 0, 1, 0);
+
+-- PAGE: edit profile
+
+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_groups_edit_profile', 'edit-group-profile', '_bx_groups_page_title_sys_edit_profile', '_bx_groups_page_title_edit_profile', 'bx_groups', 5, 2147483647, 1, 'page.php?i=edit-group-profile', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_edit_profile', 1, 'bx_groups', '_bx_groups_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
+
+-- PAGE: edit profile cover
+
+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_groups_edit_profile_cover', 'edit-group-cover', '_bx_groups_page_title_sys_edit_profile_cover', '_bx_groups_page_title_edit_profile_cover', 'bx_groups', 5, 2147483647, 1, 'page.php?i=edit-group-cover', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_edit_profile_cover', 1, 'bx_groups', '_bx_groups_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
+
+-- PAGE: delete profile
+
+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_groups_delete_profile', 'delete-group-profile', '_bx_groups_page_title_sys_delete_profile', '_bx_groups_page_title_delete_profile', 'bx_groups', 5, 2147483647, 1, 'page.php?i=delete-group-profile', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_delete_profile', 1, 'bx_groups', '_bx_groups_page_block_title_delete_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:13:\"entity_delete\";}', 0, 0, 0);
+
+-- PAGE: profile info
+
+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_groups_profile_info', 'group-profile-info', '_bx_groups_page_title_sys_profile_info', '_bx_groups_page_title_profile_info', 'bx_groups', 5, 2147483647, 1, 'page.php?i=group-profile-info', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_profile_info', 1, 'bx_groups', '_bx_groups_page_block_title_system_profile_info', '_bx_groups_page_block_title_profile_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 1);
+
+-- PAGE: profile friends
+
+-- 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_groups_profile_friends', 'group-profile-friends', '_bx_groups_page_title_sys_profile_friends', '_bx_groups_page_title_profile_friends', 'bx_groups', 5, 2147483647, 1, 'page.php?i=group-profile-friends', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_profile_friends', 1, 'bx_groups', '_bx_groups_page_block_title_system_profile_friends', '_bx_groups_page_block_title_profile_friends_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:17:\"connections_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
+-- PAGE: group fans
+
+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_groups_fans', 'group-fans', '_bx_groups_page_title_sys_group_fans', '_bx_groups_page_title_group_fans', 'bx_groups', 5, 2147483647, 1, 'page.php?i=group-fans', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_fans', 1, 'bx_groups', '_bx_groups_page_block_title_system_fans', '_bx_groups_page_block_title_fans_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:10:"fans_table";}', 0, 0, 1, 1);
+
+-- PAGE: module home
+
+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_groups_home', '_bx_groups_page_title_sys_recent', '_bx_groups_page_title_recent', 'bx_groups', 5, 2147483647, 1, 'groups-home', 'page.php?i=groups-home', '', '', '', 0, 1, 0, 'BxGroupsPageBrowse', 'modules/boonex/groups/classes/BxGroupsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_home', 1, 'bx_groups', '_bx_groups_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:22:\"browse_recent_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: active profiles
+
+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_groups_active', '_bx_groups_page_title_sys_active', '_bx_groups_page_title_active', 'bx_groups', 5, 2147483647, 1, 'groups-active', 'page.php?i=groups-active', '', '', '', 0, 1, 0, 'BxGroupsPageBrowse', 'modules/boonex/groups/classes/BxGroupsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_groups_active', 1, 'bx_groups', '_bx_groups_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_manage', '_bx_groups_page_title_sys_manage', '_bx_groups_page_title_manage', 'bx_groups', 5, 2147483647, 1, 'groups-manage', 'page.php?i=groups-manage', '', '', '', 0, 1, 0, 'BxGroupsPageBrowse', 'modules/boonex/groups/classes/BxGroupsPageBrowse.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_groups_manage', 1, 'bx_groups', '_bx_groups_page_block_title_system_manage', '_bx_groups_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+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_groups_administration', '_bx_groups_page_title_sys_manage_administration', '_bx_groups_page_title_manage', 'bx_groups', 5, 192, 1, 'groups-administration', 'page.php?i=groups-administration', '', '', '', 0, 1, 0, 'BxGroupsPageBrowse', 'modules/boonex/groups/classes/BxGroupsPageBrowse.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_groups_administration', 1, 'bx_groups', '_bx_groups_page_block_title_system_manage_administration', '_bx_groups_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_home', 1, 'bx_groups', '_bx_groups_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('', 0, 'bx_groups', '', '_bx_groups_page_block_title_categories', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:21:"bx_groups_cats";i:1;b:1;}s:5:"class";s:20:"TemplServiceCategory";}', 1, 1, 1, IFNULL(@iBlockOrder, 0) + 1);
+
+
+-- MENU
+
+-- MENU: add to site menu
+
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+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 
+('sys_site', 'bx_groups', 'groups-home', '_bx_groups_menu_item_title_system_entries_home', '_bx_groups_menu_item_title_entries_home', 'page.php?i=groups-home', '', '', 'group col-red2', 'bx_groups_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+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 
+('sys_homepage', 'bx_groups', 'groups-home', '_bx_groups_menu_item_title_system_entries_home', '_bx_groups_menu_item_title_entries_home', 'page.php?i=groups-home', '', '', 'group col-red2', 'bx_groups_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+--SET @iCreateProfileMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_profiles_create' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+--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
+--('sys_profiles_create', 'bx_groups', 'create-group-profile', '_bx_groups_menu_item_title_system_profile_type', '_bx_groups_menu_item_title_profile_type', 'page.php?i=create-group-profile', '', '', 'group', '', 2147483647, 1, 1, IFNULL(@iCreateProfileMenuOrder, 0) + 1);
+
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_profile_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+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 
+('sys_add_profile_links', 'bx_groups', 'create-group-profile', '_bx_groups_menu_item_title_system_create_profile', '_bx_groups_menu_item_title_create_profile', 'page.php?i=create-group-profile', '', '', 'group', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: view actions
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_view_actions', '_bx_groups_menu_title_view_profile_actions', 'bx_groups_view_actions', 'bx_groups', 9, 0, 1, 'BxGroupsMenuView', 'modules/boonex/groups/classes/BxGroupsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_groups_view_actions', 'bx_groups', '_bx_groups_menu_set_title_view_profile_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_groups_view_actions', 'bx_groups', 'profile-fan-add', '_bx_groups_menu_item_title_system_become_fan', '{title_add_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_groups_fans\', \'add\', \'{content_id}\')', '', 'user-plus', '', 0, 2147483647, 1, 0, 5),
+-- ('bx_groups_view_actions', 'bx_groups', 'profile-friend-add', '_bx_groups_menu_item_title_system_befriend', '{title_add_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'add\', \'{profile_id}\')', '', 'user-plus', '', 0, 2147483647, 1, 0, 10),
+('bx_groups_view_actions', 'bx_groups', 'profile-subscribe-add', '_bx_groups_menu_item_title_system_subscribe', '_bx_groups_menu_item_title_subscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'add\', \'{profile_id}\')', '', 'check', '', 0, 2147483647, 1, 0, 20),
+('bx_groups_view_actions', 'bx_groups', 'profile-set-acl-level', '_sys_menu_item_title_system_set_acl_level', '_sys_menu_item_title_set_acl_level', 'javascript:void(0)', 'bx_menu_popup(''sys_set_acl_level'', window, {}, {profile_id: {profile_id}});', '', 'certificate', '', 0, 192, 1, 0, 30),
+('bx_groups_view_actions', 'bx_groups', 'profile-actions-more', '_bx_groups_menu_item_title_system_more_actions', '_bx_groups_menu_item_title_more_actions', 'javascript:void(0)', 'bx_menu_popup(''bx_groups_view_actions_more'', this, {}, {profile_id:{profile_id}});', '', 'cog', 'bx_groups_view_actions_more', 1, 2147483647, 1, 0, 9999);
+
+-- MENU: view actions more
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_view_actions_more', '_bx_groups_menu_title_view_profile_actions_more', 'bx_groups_view_actions_more', 'bx_groups', 6, 0, 1, 'BxGroupsMenuView', 'modules/boonex/groups/classes/BxGroupsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_groups_view_actions_more', 'bx_groups', '_bx_groups_menu_set_title_view_profile_actions_more', 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_groups_view_actions_more', 'bx_groups', 'profile-fan-remove', '_bx_groups_menu_item_title_system_leave_group', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_groups_fans\', \'remove\', \'{content_id}\')', '', 'user-times', '', 2147483647, 1, 0, 5),
+-- ('bx_groups_view_actions_more', 'bx_groups', 'profile-friend-remove', '_bx_groups_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'user-times', '', 2147483647, 1, 0, 10),
+('bx_groups_view_actions_more', 'bx_groups', 'profile-subscribe-remove', '_bx_groups_menu_item_title_system_unsubscribe', '_bx_groups_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
+('bx_groups_view_actions_more', 'bx_groups', 'edit-group-profile', '_bx_groups_menu_item_title_system_edit_profile', '_bx_groups_menu_item_title_edit_profile', 'page.php?i=edit-group-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
+('bx_groups_view_actions_more', 'bx_groups', 'delete-group-profile', '_bx_groups_menu_item_title_system_delete_profile', '_bx_groups_menu_item_title_delete_profile', 'page.php?i=delete-group-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
+('bx_groups_view_actions_more', 'bx_groups', 'delete-group-account', '_bx_groups_menu_item_title_system_delete_account', '_bx_groups_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'remove', '', 128, 1, 0, 50);
+
+-- MENU: module sub-menu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_submenu', '_bx_groups_menu_title_submenu', 'bx_groups_submenu', 'bx_groups', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_groups_submenu', 'bx_groups', '_bx_groups_menu_set_title_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_groups_submenu', 'bx_groups', 'groups-home', '_bx_groups_menu_item_title_system_entries_recent', '_bx_groups_menu_item_title_entries_recent', 'page.php?i=groups-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_groups_submenu', 'bx_groups', 'groups-active', '_bx_groups_menu_item_title_system_entries_active', '_bx_groups_menu_item_title_entries_active', 'page.php?i=groups-active', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_groups_submenu', 'bx_groups', 'groups-manage', '_bx_groups_menu_item_title_system_entries_manage', '_bx_groups_menu_item_title_entries_manage', 'page.php?i=groups-manage', '', '', '', '', 2147483646, 1, 1, 3);
+
+-- MENU: view submenu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_view_submenu', '_bx_groups_menu_title_view_profile_submenu', 'bx_groups_view_submenu', 'bx_groups', 8, 0, 1, 'BxGroupsMenuView', 'modules/boonex/groups/classes/BxGroupsMenuView.php'),
+('bx_groups_view_submenu_cover', '_bx_groups_menu_title_view_profile_submenu_cover', 'bx_groups_view_submenu', 'bx_groups', 7, 0, 1, 'BxGroupsMenuView', 'modules/boonex/groups/classes/BxGroupsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_groups_view_submenu', 'bx_groups', '_bx_groups_menu_set_title_view_profile_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_groups_view_submenu', 'bx_groups', 'view-group-profile', '_bx_groups_menu_item_title_system_view_profile_view', '_bx_groups_menu_item_title_view_profile_view', 'page.php?i=view-group-profile&id={content_id}', '', '', 'group col-red2', '', 2147483647, 1, 0, 1),
+('bx_groups_view_submenu', 'bx_groups', 'group-profile-info', '_bx_groups_menu_item_title_system_view_profile_info', '_bx_groups_menu_item_title_view_profile_info', 'page.php?i=group-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
+('bx_groups_view_submenu', 'bx_groups', 'group-fans', '_bx_groups_menu_item_title_system_view_fans', '_bx_groups_menu_item_title_view_fans', 'page.php?i=group-fans&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 3);
+-- ('bx_groups_view_submenu', 'bx_groups', 'group-profile-friends', '_bx_groups_menu_item_title_system_view_profile_friends', '_bx_groups_menu_item_title_view_profile_friends', 'page.php?i=group-profile-friends&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 4);
+
+-- MENU: notifications menu in account popup
+
+-- SET @iNotifMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+-- INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+-- ('sys_account_notifications', 'bx_groups', 'notifications-friend-requests', '_bx_groups_menu_item_title_system_friends', '_bx_groups_menu_item_title_friends', 'page.php?i=group-profile-friends&profile_id={member_id}', '', '', 'group col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, IFNULL(@iNotifMenuOrder, 0) + 1);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+-- ('sys_profile_stats', 'bx_groups', 'profile-stats-friend-requests', '_bx_groups_menu_item_title_system_friend_requests', '_bx_groups_menu_item_title_friend_requests', 'page.php?i=group-profile-friends&profile_id={member_id}', '', '', 'group col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1),
+('sys_profile_stats', 'bx_groups', 'profile-stats-manage-groups', '_bx_groups_menu_item_title_system_manage_my_groups', '_bx_groups_menu_item_title_manage_my_groups', 'page.php?i=groups-manage', '', '_self', 'group col-red2', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_groups_menu_manage_tools', '_bx_groups_menu_title_manage_tools', 'bx_groups_menu_manage_tools', 'bx_groups', 6, 0, 1, 'BxGroupsMenuManageTools', 'modules/boonex/groups/classes/BxGroupsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_groups_menu_manage_tools', 'bx_groups', '_bx_groups_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_groups_menu_manage_tools', 'bx_groups', 'delete', '_bx_groups_menu_item_title_system_delete', '_bx_groups_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 1),
+('bx_groups_menu_manage_tools', 'bx_groups', 'delete-with-content', '_bx_groups_menu_item_title_system_delete_with_content', '_bx_groups_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 2);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_groups', 'groups-administration', '_bx_groups_menu_item_title_system_admt_groups', '_bx_groups_menu_item_title_admt_groups', 'page.php?i=groups-administration', '', '_self', '', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_groups', 'create entry', NULL, '_bx_groups_acl_action_create_profile', '', 1, 1);
+SET @iIdActionProfileCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_groups', 'delete entry', NULL, '_bx_groups_acl_action_delete_profile', '', 1, 1);
+SET @iIdActionProfileDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_groups', 'view entry', NULL, '_bx_groups_acl_action_view_profile', '', 1, 0);
+SET @iIdActionProfileView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_groups', 'edit any entry', NULL, '_bx_groups_acl_action_edit_any_profile', '', 1, 3);
+SET @iIdActionProfileEditAny = 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
+
+-- profile create
+(@iAccount, @iIdActionProfileCreate),
+(@iStandard, @iIdActionProfileCreate),
+(@iUnconfirmed, @iIdActionProfileCreate),
+(@iPending, @iIdActionProfileCreate),
+(@iModerator, @iIdActionProfileCreate),
+(@iAdministrator, @iIdActionProfileCreate),
+(@iPremium, @iIdActionProfileCreate),
+
+-- profile delete
+(@iAccount, @iIdActionProfileDelete),
+(@iStandard, @iIdActionProfileDelete),
+(@iUnconfirmed, @iIdActionProfileDelete),
+(@iPending, @iIdActionProfileDelete),
+(@iModerator, @iIdActionProfileDelete),
+(@iAdministrator, @iIdActionProfileDelete),
+(@iPremium, @iIdActionProfileDelete),
+
+-- profile view
+(@iUnauthenticated, @iIdActionProfileView),
+(@iAccount, @iIdActionProfileView),
+(@iStandard, @iIdActionProfileView),
+(@iUnconfirmed, @iIdActionProfileView),
+(@iPending, @iIdActionProfileView),
+(@iModerator, @iIdActionProfileView),
+(@iAdministrator, @iIdActionProfileView),
+(@iPremium, @iIdActionProfileView),
+
+-- any profile edit
+(@iModerator, @iIdActionProfileEditAny),
+(@iAdministrator, @iIdActionProfileEditAny);
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_groups', 'bx_groups_views_track', '86400', '1', 'bx_groups_data', 'id', 'views', '', '');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_groups', 'bx_groups_meta_keywords', '', '', '', '');
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_groups_cats', 'bx_groups', 'bx_group', 'bx_groups_cats', 'bx_groups_data', 'group_cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`content_id` = `bx_groups_data`.`id` AND `sys_profiles`.`type` = ''bx_groups'')', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_groups', '_bx_groups', @iSearchOrder + 1, 'BxGroupsSearchResult', 'modules/boonex/groups/classes/BxGroupsSearchResult.php');
+
+-- CONNECTIONS
+INSERT INTO `sys_objects_connection` (`object`, `table`, `type`, `override_class_name`, `override_class_file`) VALUES
+('bx_groups_fans', 'bx_groups_fans', 'mutual', '', '');
+
+-- GRID: connections
+
+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_groups_fans', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxGroupsGridConnections', 'modules/boonex/groups/classes/BxGroupsGridConnections.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
+('bx_groups_fans', 'name', '_sys_name', '70%', '', 10),
+('bx_groups_fans', 'actions', '', '30%', '', 20);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
+('bx_groups_fans', 'single', 'accept', '_sys_accept', '', 0, 10),
+('bx_groups_fans', 'single', 'delete', '', 'remove', 1, 20);
+
+-- GRIDS: administration
+
+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`, `override_class_name`, `override_class_file`) VALUES
+('bx_groups_administration', 'Sql', 'SELECT `td`.*, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_groups_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_groups'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_groups_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'group_name', '', 'like', '', '', 'BxGroupsGridAdministration', 'modules/boonex/groups/classes/BxGroupsGridAdministration.php'),
+('bx_groups_common', 'Sql', 'SELECT `td`.*, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_groups_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_groups'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_groups_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'group_name', '', 'like', '', '', 'BxGroupsGridCommon', 'modules/boonex/groups/classes/BxGroupsGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_groups_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_groups_administration', 'switcher', '_bx_groups_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_groups_administration', 'group_name', '_bx_groups_grid_column_title_adm_group_name', '25%', 0, '', '', 3),
+('bx_groups_administration', 'last_online', '_bx_groups_grid_column_title_adm_last_online', '20%', 1, '25', '', 4),
+('bx_groups_administration', 'account', '_bx_groups_grid_column_title_adm_account', '25%', 0, '25', '', 5),
+('bx_groups_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_groups_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_groups_common', 'group_name', '_bx_groups_grid_column_title_adm_group_name', '48%', 0, '', '', 2),
+('bx_groups_common', 'last_online', '_bx_groups_grid_column_title_adm_last_online', '30%', 1, '25', '', 3),
+('bx_groups_common', 'actions', '', '20%', 0, '', '', 4);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_groups_administration', 'bulk', 'set_acl_level', '_bx_groups_grid_action_title_adm_set_acl_level', '', 0, 0, 1),
+('bx_groups_administration', 'bulk', 'delete', '_bx_groups_grid_action_title_adm_delete', '', 0, 1, 2),
+('bx_groups_administration', 'bulk', 'delete_with_content', '_bx_groups_grid_action_title_adm_delete_with_content', '', 0, 1, 3),
+('bx_groups_administration', 'single', 'set_acl_level', '_bx_groups_grid_action_title_adm_set_acl_level', 'certificate', 1, 0, 1),
+('bx_groups_administration', 'single', 'settings', '_bx_groups_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
+('bx_groups_common', 'bulk', 'delete', '_bx_groups_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_groups_common', 'bulk', 'delete_with_content', '_bx_groups_grid_action_title_adm_delete_with_content', '', 0, 1, 2),
+('bx_groups_common', 'single', 'settings', '_bx_groups_grid_action_title_adm_more_actions', 'cog', 1, 0, 1);

+ 225 - 0
modules/boonex/groups/install/sql/install.sql

@@ -0,0 +1,225 @@
+
+-- TABLE: PROFILES
+CREATE TABLE IF NOT EXISTS `bx_groups_data` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `picture` int(11) NOT NULL,
+  `cover` int(11) NOT NULL,
+  `group_name` varchar(255) NOT NULL,
+  `group_cat` int(11) NOT NULL,
+  `group_desc` text NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `group_name` (`group_name`)
+);
+
+-- TABLE: STORAGES & TRANSCODERS
+CREATE TABLE `bx_groups_pics` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(255) 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` int(11) 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 `bx_groups_pics_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(255) 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` int(11) 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: VIEWS
+CREATE TABLE `bx_groups_views_track` (
+  `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',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE `bx_groups_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: fans
+CREATE TABLE IF NOT EXISTS `bx_groups_fans` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `initiator` int(11) NOT NULL,
+  `content` int(11) NOT NULL,
+  `mutual` tinyint(4) NOT NULL,
+  `added` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `initiator` (`initiator`,`content`),
+  KEY `content` (`content`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- STORAGES & TRANSCODERS
+
+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_groups_pics', 'Local', '', 360, 2592000, 3, 'bx_groups_pics', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_groups_pics_resized', 'Local', '', 360, 2592000, 3, 'bx_groups_pics_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_groups_icon', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0'),
+('bx_groups_thumb', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0'),
+('bx_groups_avatar', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0'),
+('bx_groups_picture', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0'),
+('bx_groups_cover', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0'),
+('bx_groups_cover_thumb', 'bx_groups_pics_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_groups_pics";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_groups_icon', 'Resize', 'a:3:{s:1:"w";s:2:"32";s:1:"h";s:2:"32";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_groups_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_groups_avatar', 'Resize', 'a:3:{s:1:"w";s:2:"96";s:1:"h";s:2:"96";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_groups_picture', 'Resize', 'a:3:{s:1:"w";s:4:"1024";s:1:"h";s:4:"1024";s:13:"square_resize";s:1:"0";}', '0'),
+('bx_groups_cover', 'Resize', 'a:1:{s:1:"w";s:4:"1024";}', '0'),
+('bx_groups_cover_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0');
+
+-- FORMS
+
+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_group', 'bx_groups', '_bx_groups_form_profile', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_groups_data', 'id', '', '', 'do_submit', '', 0, 1, 'BxGroupsFormEntry', 'modules/boonex/groups/classes/BxGroupsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_group', 'bx_group_add', 'bx_groups', 0, '_bx_groups_form_profile_display_add'),
+('bx_group', 'bx_group_delete', 'bx_groups', 0, '_bx_groups_form_profile_display_delete'),
+('bx_group', 'bx_group_edit', 'bx_groups', 0, '_bx_groups_form_profile_display_edit'),
+('bx_group', 'bx_group_edit_cover', 'bx_groups', 0, '_bx_groups_form_profile_display_edit_cover'),
+('bx_group', 'bx_group_view', 'bx_groups', 1, '_bx_groups_form_profile_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_group', 'bx_groups', 'cover', '', '', 0, 'file', '_bx_groups_form_profile_input_sys_cover', '_bx_groups_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_group', 'bx_groups', 'cover_preview', '', '', 0, 'custom', '_bx_groups_form_profile_input_sys_cover_preview', '_bx_groups_form_profile_input_cover_preview', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_group', 'bx_groups', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_groups_form_profile_input_sys_delete_confirm', '_bx_groups_form_profile_input_delete_confirm', '_bx_groups_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_groups_form_profile_input_delete_confirm_error', '', '', 1, 0),
+('bx_group', 'bx_groups', 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_bx_groups_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_group', 'bx_groups', 'group_desc', '', '', 0, 'textarea', '_bx_groups_form_profile_input_sys_group_name', '_bx_groups_form_profile_input_group_name', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 1),
+('bx_group', 'bx_groups', 'group_cat', '', '#!bx_groups_cats', 0, 'select', '_bx_groups_form_profile_input_sys_group_cat', '_bx_groups_form_profile_input_group_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_groups_form_profile_input_group_cat_err', 'Xss', '', 1, 1),
+('bx_group', 'bx_groups', 'group_name', '', '', 0, 'text', '_bx_groups_form_profile_input_sys_group_name', '_bx_groups_form_profile_input_group_name', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_groups_form_profile_input_group_name_err', 'Xss', '', 1, 0),
+('bx_group', 'bx_groups', 'picture', '', '', 0, 'file', '_bx_groups_form_profile_input_sys_picture', '_bx_groups_form_profile_input_picture', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_groups_form_profile_input_picture_err', 'Int', '', 1, 0),
+('bx_group', 'bx_groups', 'picture_preview', '', '', 0, 'custom', '_bx_groups_form_profile_input_sys_picture_preview', '_bx_groups_form_profile_input_picture_preview', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_group_add', 'cover_preview', 2147483647, 0, 1),
+('bx_group_add', 'picture_preview', 2147483647, 0, 2),
+('bx_group_add', 'delete_confirm', 2147483647, 0, 3),
+('bx_group_add', 'cover', 2147483647, 0, 4),
+('bx_group_add', 'picture', 2147483647, 1, 5),
+('bx_group_add', 'group_name', 2147483647, 1, 6),
+('bx_group_add', 'group_cat', 2147483647, 1, 7),
+('bx_group_add', 'group_desc', 2147483647, 1, 8),
+('bx_group_add', 'do_submit', 2147483647, 1, 9),
+('bx_group_delete', 'cover_preview', 2147483647, 0, 0),
+('bx_group_delete', 'picture', 2147483647, 0, 0),
+('bx_group_delete', 'delete_confirm', 2147483647, 1, 0),
+('bx_group_delete', 'picture_preview', 2147483647, 0, 0),
+('bx_group_delete', 'cover', 2147483647, 0, 0),
+('bx_group_delete', 'do_submit', 2147483647, 1, 1),
+('bx_group_delete', 'group_name', 2147483647, 0, 2),
+('bx_group_delete', 'group_cat', 2147483647, 0, 3),
+('bx_group_edit', 'cover_preview', 2147483647, 0, 1),
+('bx_group_edit', 'delete_confirm', 2147483647, 0, 2),
+('bx_group_edit', 'cover', 2147483647, 0, 3),
+('bx_group_edit', 'picture_preview', 2147483647, 1, 4),
+('bx_group_edit', 'picture', 2147483647, 1, 5),
+('bx_group_edit', 'group_name', 2147483647, 1, 6),
+('bx_group_edit', 'group_cat', 2147483647, 1, 7),
+('bx_group_edit', 'group_desc', 2147483647, 1, 8),
+('bx_group_edit', 'do_submit', 2147483647, 1, 9),
+('bx_group_edit_cover', 'delete_confirm', 2147483647, 0, 1),
+('bx_group_edit_cover', 'group_name', 2147483647, 0, 2),
+('bx_group_edit_cover', 'picture', 2147483647, 0, 3),
+('bx_group_edit_cover', 'picture_preview', 2147483647, 0, 4),
+('bx_group_edit_cover', 'group_cat', 2147483647, 0, 5),
+('bx_group_edit_cover', 'cover_preview', 2147483647, 1, 6),
+('bx_group_edit_cover', 'cover', 2147483647, 1, 7),
+('bx_group_edit_cover', 'do_submit', 2147483647, 1, 8),
+('bx_group_view', 'cover_preview', 2147483647, 0, 1),
+('bx_group_view', 'picture_preview', 2147483647, 0, 2),
+('bx_group_view', 'delete_confirm', 2147483647, 0, 3),
+('bx_group_view', 'picture', 2147483647, 0, 4),
+('bx_group_view', 'cover', 2147483647, 0, 5),
+('bx_group_view', 'do_submit', 2147483647, 0, 6),
+('bx_group_view', 'group_name', 2147483647, 1, 7),
+('bx_group_view', 'group_cat', 2147483647, 1, 8),
+('bx_group_view', 'group_desc', 2147483647, 1, 9);
+
+-- PRE-VALUES
+
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_groups_cats', '_bx_groups_pre_lists_cats', 'bx_groups', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_groups_cats', '', 0, '_sys_please_select', ''),
+('bx_groups_cats', '1', 1, '_bx_groups_cat_Agriculture', ''),
+('bx_groups_cats', '2', 2, '_bx_groups_cat_Financial', ''),
+('bx_groups_cats', '3', 3, '_bx_groups_cat_Biotech', ''),
+('bx_groups_cats', '4', 4, '_bx_groups_cat_Cause', ''),
+('bx_groups_cats', '5', 5, '_bx_groups_cat_Chemical', ''),
+('bx_groups_cats', '6', 6, '_bx_groups_cat_Religious', ''),
+('bx_groups_cats', '7', 7, '_bx_groups_cat_Community', ''),
+('bx_groups_cats', '8', 8, '_bx_groups_cat_Company', ''),
+('bx_groups_cats', '9', 9, '_bx_groups_cat_Entertainment', ''),
+('bx_groups_cats', '10', 10, '_bx_groups_cat_Technology', ''),
+('bx_groups_cats', '11', 11, '_bx_groups_cat_Consulting', ''),
+('bx_groups_cats', '12', 12, '_bx_groups_cat_Education', ''),
+('bx_groups_cats', '13', 13, '_bx_groups_cat_Energy', ''),
+('bx_groups_cats', '14', 14, '_bx_groups_cat_Engineering', ''),
+('bx_groups_cats', '15', 15, '_bx_groups_cat_Food', ''),
+('bx_groups_cats', '16', 16, '_bx_groups_cat_Government', ''),
+('bx_groups_cats', '17', 17, '_bx_groups_cat_Health', ''),
+('bx_groups_cats', '18', 18, '_bx_groups_cat_Medical', ''),
+('bx_groups_cats', '19', 19, '_bx_groups_cat_Industrial', ''),
+('bx_groups_cats', '20', 20, '_bx_groups_cat_Insurance', ''),
+('bx_groups_cats', '21', 21, '_bx_groups_cat_Internet', ''),
+('bx_groups_cats', '22', 22, '_bx_groups_cat_Software', ''),
+('bx_groups_cats', '23', 23, '_bx_groups_cat_Legal', ''),
+('bx_groups_cats', '24', 24, '_bx_groups_cat_Media', ''),
+('bx_groups_cats', '25', 25, '_bx_groups_cat_School', ''),
+('bx_groups_cats', '26', 26, '_bx_groups_cat_NGO', ''),
+('bx_groups_cats', '27', 27, '_bx_groups_cat_NPO', ''),
+('bx_groups_cats', '28', 28, '_bx_groups_cat_Political', ''),
+('bx_groups_cats', '29', 29, '_bx_groups_cat_Retail', ''),
+('bx_groups_cats', '30', 30, '_bx_groups_cat_Small_Business', ''),
+('bx_groups_cats', '31', 31, '_bx_groups_cat_Telecommunication', ''),
+('bx_groups_cats', '32', 32, '_bx_groups_cat_Transport', ''),
+('bx_groups_cats', '33', 33, '_bx_groups_cat_Travel', ''),
+('bx_groups_cats', '34', 34, '_bx_groups_cat_University', ''),
+('bx_groups_cats', '35', 35, '_bx_groups_cat_Other', '');
+
+-- STUDIO PAGE & WIDGET
+
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_groups', '_bx_groups', '_bx_groups', 'bx_groups@modules/boonex/groups/|std-pi.png');
+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`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_groups', '{url_studio}module.php?name=bx_groups', '', 'bx_groups@modules/boonex/groups/|std-wi.png', '_bx_groups', '', '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));
+

+ 40 - 0
modules/boonex/groups/install/sql/uninstall.sql

@@ -0,0 +1,40 @@
+
+-- TABLES
+
+DROP TABLE IF EXISTS `bx_groups_data`, `bx_groups_pics`, `bx_groups_pics_resized`, `bx_groups_views_track`, `bx_groups_meta_keywords`, `bx_groups_fans`;
+
+-- PROFILES
+
+DELETE FROM sys_profiles WHERE `type` = 'bx_groups';
+
+-- STORAGES & TRANSCODERS
+
+DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_groups_pics', 'bx_groups_pics_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_groups_pics', 'bx_groups_pics_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_groups_icon', 'bx_groups_thumb', 'bx_groups_avatar', 'bx_groups_picture', 'bx_groups_cover', 'bx_groups_cover_thumb');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_groups_icon', 'bx_groups_thumb', 'bx_groups_avatar', 'bx_groups_picture', 'bx_groups_cover', 'bx_groups_cover_thumb');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_groups_icon', 'bx_groups_thumb', 'bx_groups_avatar', 'bx_groups_picture', 'bx_groups_cover', 'bx_groups_cover_thumb');
+
+-- FORMS
+
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_groups';
+
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_groups';
+
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_groups';
+
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_group_add', 'bx_group_delete', 'bx_group_edit', 'bx_group_edit_cover', 'bx_group_view');
+
+-- PRE-VALUES
+
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_groups';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_groups_cats');
+
+-- STUDIO PAGE & WIDGET
+
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_groups';
+

+ 57 - 0
modules/boonex/groups/js/manage_tools.js

@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Organizations Organizations
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+function BxOrgsManageTools(oOptions) {
+	this._sActionsUrl = oOptions.sActionUrl;
+	this._sObjNameGrid = oOptions.sObjNameGrid;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxOrgsManageTools' : oOptions.sObjName;
+
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+}
+
+BxOrgsManageTools.prototype.onChangeFilter = function(oFilter) {
+	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
+	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
+
+	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
+	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
+	if(sValueSearch == _t('_sys_grid_search'))
+		sValueSearch = '';
+
+	glGrids[this._sObjNameGrid].setFilter(sValueFilter1 + this._sParamsDivider + sValueSearch, true);
+};
+
+BxOrgsManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
+	if($(oButton).hasClass('bx-btn-disabled'))
+		return false;
+
+	bx_menu_popup(sMenuObject, oButton, {}, {
+		content_id: $(oButton).attr('bx_grid_action_data')
+	});
+};
+
+BxOrgsManageTools.prototype.onClickDelete = function(iContentId) {
+	$('.bx-popup-applied:visible').dolPopupHide();
+
+	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
+};
+
+BxOrgsManageTools.prototype.onClickDeleteWithContent = function(iContentId) {
+	$('.bx-popup-applied:visible').dolPopupHide();
+
+	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
+};
+
+/** @} */

+ 18 - 0
modules/boonex/groups/request.php

@@ -0,0 +1,18 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     TridentModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+check_logged();
+
+BxBaseModProfileRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */

+ 1 - 0
modules/boonex/groups/template/account_link.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/account_link.html />

+ 1 - 0
modules/boonex/groups/template/cover.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/cover.html />

+ 1 - 0
modules/boonex/groups/template/css/main.css

@@ -0,0 +1 @@
+@import url(../../../../base/profile/template/css/main.css);

+ 1 - 0
modules/boonex/groups/template/css/manage_tools.css

@@ -0,0 +1 @@
+@import url(../../../../base/general/template/css/manage_tools.css);

+ 1 - 0
modules/boonex/groups/template/image_popup.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/image_popup.html />

BIN
modules/boonex/groups/template/images/icons/std-mi.png


BIN
modules/boonex/groups/template/images/icons/std-pi.png


BIN
modules/boonex/groups/template/images/icons/std-si.png


BIN
modules/boonex/groups/template/images/icons/std-wi.png


BIN
modules/boonex/groups/template/images/no-pciture-big.png


BIN
modules/boonex/groups/template/images/no-picture-icon.png


BIN
modules/boonex/groups/template/images/no-picture-preview.png


BIN
modules/boonex/groups/template/images/no-picture-thumb.png


+ 1 - 0
modules/boonex/groups/template/name_link.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/name_link.html />

+ 1 - 0
modules/boonex/groups/template/picture_preview.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/picture_preview.html />

+ 1 - 0
modules/boonex/groups/template/set_acl_popup.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/set_acl_popup.html />

+ 1 - 0
modules/boonex/groups/template/unit.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/unit.html />

+ 3 - 0
modules/boonex/groups/template/unit_live_search.html

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

+ 2 - 1
modules/boonex/timeline/install/config.php

@@ -51,7 +51,8 @@ $aConfig = array(
      * Menu triggers.
      */
     'menu_triggers' => array(
-    	'trigger_profile_view_submenu'
+    	'trigger_profile_view_submenu',
+    	'trigger_group_view_submenu',
     ),
 
     /**

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

@@ -74,7 +74,8 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 
 -- 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_timeline', 'timeline-author', '_bx_timeline_menu_item_title_system_view_timeline_author', '_bx_timeline_menu_item_title_view_timeline_author', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'clock-o col-green1', '', 2147483647, 1, 0, 0);
+('trigger_profile_view_submenu', 'bx_timeline', 'timeline-author', '_bx_timeline_menu_item_title_system_view_timeline_author', '_bx_timeline_menu_item_title_view_timeline_author', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'clock-o col-green1', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_timeline', 'timeline-author', '_bx_timeline_menu_item_title_system_view_timeline_author', '_bx_timeline_menu_item_title_view_timeline_author', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'clock-o col-green1', '', 2147483647, 1, 0, 0);
 
 
 -- SETTINGS

+ 11 - 8
template/scripts/BxBasePageAccount.php

@@ -55,16 +55,19 @@ class BxBasePageAccount extends BxTemplPage
         if ($iSwitchToProfileId = (int)bx_get('switch_to_profile')) {
             $oInformer = BxDolInformer::getInstance($this->_oTemplate);
             $oProfile = BxDolProfile::getInstance($iSwitchToProfileId);
-            $sInformerMsg = '';
+            $aProfile = $oProfile->getInfo();
+            $sInformerMsg = '';            
 
-            if ($oProfile && $oProfile->getAccountId() == getLoggedId()) {
-                $oAccount = BxDolAccount::getInstance();
-                if ($oAccount->updateProfileContext($iSwitchToProfileId))
-                    $sInformerMsg = _t('_sys_txt_account_profile_context_changed_success', $oProfile->getDisplayName());
-            }
+            if (BxDolService::call($aProfile['type'], 'act_as_profile')) {
+                if ($oProfile && $oProfile->getAccountId() == getLoggedId()) {
+                    $oAccount = BxDolAccount::getInstance();
+                    if ($oAccount->updateProfileContext($iSwitchToProfileId))
+                        $sInformerMsg = _t('_sys_txt_account_profile_context_changed_success', $oProfile->getDisplayName());
+                }
 
-            if ($oInformer)
-                $oInformer->add('sys-account-profile-context-change-result', $sInformerMsg ? $sInformerMsg : _t('_error occured'), $sInformerMsg ? BX_INFORMER_INFO : BX_INFORMER_ERROR);
+                if ($oInformer)
+                    $oInformer->add('sys-account-profile-context-change-result', $sInformerMsg ? $sInformerMsg : _t('_error occured'), $sInformerMsg ? BX_INFORMER_INFO : BX_INFORMER_ERROR);
+            }
         }
 
     }

+ 1 - 1
template/scripts/BxBaseServiceProfiles.php

@@ -150,7 +150,7 @@ class BxBaseServiceProfiles extends BxDol
             'bx_repeat:row' => array(),
         );
         foreach ($aProfiles as $aProfile) {
-            if ($aProfile['type'] == 'system') // skip system account profile
+            if (!BxDolService::call($aProfile['type'], 'act_as_profile'))
                 continue;
             $aVars['bx_repeat:row'][] = array (
                 'class' => $iActiveProfileId == $aProfile['id'] ? '' : 'bx-def-color-bg-box',

+ 5 - 0
template/scripts/BxBaseServices.php

@@ -62,6 +62,11 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
         return new BxTemplAccountForms();
     }
 
+    public function serviceActAsProfile ()
+    {
+        return false;
+    }
+
     public function servicePrepareFields ($aFieldsProfile)
     {
         return $aFieldsProfile;