Sfoglia il codice sorgente

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

AntonLV 9 anni fa
parent
commit
61cefce2d7

+ 1 - 1
install/sql/system.sql

@@ -60,7 +60,7 @@ INSERT INTO `sys_objects_file_handlers` (`object`, `title`, `preg_ext`, `active`
 ('sys_ms_viewer', '_sys_file_handlers_ms_viewer', '/\\.(doc|docx|xls|xlsx|ppt|pptx)$/i', 1, 1, 'BxTemplFileHandlerMsViewer', ''),
 ('sys_google_viewer', '_sys_file_handlers_google_viewer', '/\\.(pdf|doc|docx|xls|xlsx|ppt|pptx|ai|svg|ps|tif|tiff)$/i', 1, 2, 'BxTemplFileHandlerGoogleViewer', ''),
 ('sys_images_viewer', '_sys_file_handlers_images_viewer', '/\\.(jpg|jpeg|png|gif|webp)$/i', 1, 3, 'BxTemplFileHandlerImagesViewer', ''),
-('sys_code_viewer', '_sys_file_handlers_code_viewer', '/\\.(1st|aspx|asp|json|js|jsp|java|php|xml|html|htm|rdf|xsd|xsl|xslt|sax|rss|cfm|js|asm|pl|prl|bas|b|vbs|fs|src|cs|ws|cgi|bat|py|c|cpp|cc|cp|h|hh|cxx|hxx|c++|m|lua|swift|sh|as|cob|tpl|lsp|x|cmd|rb|cbl|pas|pp|vb|f|perl|jl|lol|bal|pli|css|less|sass|saas|bcc|coffee|jade|j|tea|c#|sas|diff|pro|for|sh|bsh|bash|twig|csh|lisp|lsp|cobol|pl|d|git|rb|hrl|cr|inp|a|go|as3|m|sql|md|txt)$/i', 1, 4, 'BxTemplFileHandlerCodeViewer', '');
+('sys_code_viewer', '_sys_file_handlers_code_viewer', '/\\.(1st|aspx|asp|json|js|jsp|java|php|xml|html|htm|rdf|xsd|xsl|xslt|sax|rss|cfm|js|asm|pl|prl|bas|b|vbs|fs|src|cs|ws|cgi|bat|py|c|cpp|cc|cp|h|hh|cxx|hxx|c++|m|lua|swift|sh|as|cob|tpl|lsp|x|cmd|rb|cbl|pas|pp|vb|f|perl|jl|lol|bal|pli|css|less|sass|saas|bcc|coffee|jade|j|tea|c#|sas|diff|pro|for|sh|bsh|bash|twig|csh|lisp|lsp|cobol|pl|d|git|rb|hrl|cr|inp|a|go|as3|m|sql|md|txt|csv)$/i', 1, 4, 'BxTemplFileHandlerCodeViewer', '');
 
 
 -- --------------------------------------------------------

+ 1 - 1
modules/base/groups/classes/BxBaseModGroupsFormEntry.php

@@ -21,7 +21,7 @@ class BxBaseModGroupsFormEntry extends BxBaseModProfileFormEntry
         $CNF = &$this->_oModule->_oConfig->CNF;
 
         if (isset($this->aInputs['initial_members']) && !isset($this->aInputs['initial_members']['value'])) {
-            $this->aInputs['initial_members']['value'] = array(bx_get_logged_profile_id());
+            $this->aInputs['initial_members']['value'] = isset($CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE']) && $CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE'] == $this->aParams['display'] ? array() : array(bx_get_logged_profile_id());
         }
     }
 

+ 24 - 7
modules/base/groups/classes/BxBaseModGroupsFormsEntryHelper.php

@@ -38,17 +38,24 @@ class BxBaseModGroupsFormsEntryHelper extends BxBaseModProfileFormsEntryHelper
         if (!($oGroupProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->_oModule->_oConfig->getName())))
             return '';
 
-        // insert invited members, so they will join without confirmation
-        $aInitialProfiles = bx_get('initial_members');
-        foreach ($aInitialProfiles as $iProfileId) {
-            if (!($oProfile = BxDolProfile::getInstance($iProfileId)))
-                continue;
-            $this->_oModule->serviceAddMutualConnection ($oGroupProfile->id(), $oProfile->id(), true);            
-        }
+        $this->inviteMembers ($oGroupProfile, bx_get('initial_members'));
         
         return '';
     }
 
+    public function onDataEditAfter ($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm)
+    {
+        if ($s = parent::onDataEditAfter($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm))
+            return $s;
+
+        if (!($oGroupProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->_oModule->_oConfig->getName())))
+            return '';
+
+        $this->inviteMembers ($oGroupProfile, bx_get('initial_members'));
+
+        return '';
+    }
+    
     public function onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile)
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
@@ -62,6 +69,16 @@ class BxBaseModGroupsFormsEntryHelper extends BxBaseModProfileFormsEntryHelper
 
         return '';
     }
+
+    protected function inviteMembers ($oGroupProfile, $aInitialProfiles)
+    {
+        // insert invited members, so they will join without confirmation
+        foreach ($aInitialProfiles as $iProfileId) {
+            if (!($oProfile = BxDolProfile::getInstance($iProfileId)))
+                continue;
+            $this->_oModule->serviceAddMutualConnection ($oGroupProfile->id(), $oProfile->id(), true);            
+        }
+    }
 }
 
 /** @} */

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

@@ -231,6 +231,11 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
         return $this->_serviceBrowse ('joined_entries', array('joined_profile' => $iProfileId), BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
     }
 
+    public function serviceEntityInvite ($iContentId = 0)
+    {
+        return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE']);
+    }
+    
     /**
      * Entry social sharing block
      */
@@ -404,6 +409,11 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
         return parent::checkAllowedEdit ($aDataEntry, $isPerformAction);
     }
 
+    public function checkAllowedInvite ($aDataEntry, $isPerformAction = false)
+    {
+        return $this->checkAllowedEdit ($aDataEntry, $isPerformAction);
+    }
+    
     public function checkAllowedChangeCover ($aDataEntry, $isPerformAction = false)
     {
         $oGroupProfile = BxDolProfile::getInstanceByContentAndType($aDataEntry[$this->_oConfig->CNF['FIELD_ID']], $this->getName());

+ 2 - 0
modules/boonex/events/classes/BxEventsConfig.php

@@ -19,6 +19,7 @@ class BxEventsConfig extends BxBaseModProfileConfig
             'view-event-profile' => 'checkAllowedView',
             'edit-event-profile' => 'checkAllowedEdit',
             'edit-event-cover' => 'checkAllowedChangeCover',
+            'invite-to-event' => 'checkAllowedInvite',
             'delete-event-profile' => 'checkAllowedDelete',
             'profile-fan-add' => 'checkAllowedFanAdd',
             'profile-fan-remove' => 'checkAllowedFanRemove',
@@ -87,6 +88,7 @@ class BxEventsConfig extends BxBaseModProfileConfig
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_event_edit',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_event_edit_cover',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_event_delete',
+            'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_event_invite',
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_events_view_actions', // actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_events_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_SUBMENU' => 'bx_events_submenu', // main module submenu

+ 8 - 2
modules/boonex/events/install/langs/en.xml

@@ -13,7 +13,8 @@
 	<string name="_bx_events_form_profile_display_edit_cover"><![CDATA[Edit Cover]]></string>
 	<string name="_bx_events_form_profile_display_delete"><![CDATA[Delete Event]]></string>
 	<string name="_bx_events_form_profile_display_view"><![CDATA[View Event]]></string>
-	<string name="_bx_events_form_profile_display_view_full"><![CDATA[Full View Event]]></string>
+    <string name="_bx_events_form_profile_display_view_full"><![CDATA[Full View Event]]></string>
+    <string name="_bx_events_form_profile_display_invite"><![CDATA[Invite to Event]]></string>
 	<string name="_bx_events_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
     <string name="_bx_events_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_events_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
@@ -98,7 +99,9 @@
 	<string name="_bx_events_page_title_sys_top"><![CDATA[Top Events]]></string>
     <string name="_bx_events_page_title_top"><![CDATA[Top Events]]></string>
 	<string name="_bx_events_page_title_sys_calendar"><![CDATA[Events Calendar]]></string>
-	<string name="_bx_events_page_title_calendar"><![CDATA[Events Calendar]]></string>
+    <string name="_bx_events_page_title_calendar"><![CDATA[Events Calendar]]></string>
+    <string name="_bx_events_page_title_sys_invite_to_group"><![CDATA[Invite Members to the Event]]></string>
+	<string name="_bx_events_page_title_invite_to_group"><![CDATA[Invite Members to the Event]]></string>
 
 	<string name="_bx_events_page_block_title_favorites_of_author"><![CDATA[Favorite Events]]></string>
     <string name="_bx_events_page_block_title_sys_favorites_of_author"><![CDATA[Favorite Events]]></string>
@@ -129,6 +132,7 @@
     <string name="_bx_events_page_block_title_calendar"><![CDATA[Events calendar]]></string>
     <string name="_bx_events_page_block_title_profile_calendar"><![CDATA[Calendar]]></string>
     <string name="_bx_events_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_events_page_block_title_invite_to_group"><![CDATA[Invite Members to the Event]]></string>
 
     <string name="_bx_events_menu_title_submenu"><![CDATA[Events Submenu]]></string>
     <string name="_bx_events_menu_set_title_submenu"><![CDATA[Events Submenu]]></string>
@@ -167,6 +171,8 @@
     <string name="_bx_events_menu_item_title_view_profile_info"><![CDATA[Info]]></string>
     <string name="_bx_events_menu_item_title_system_view_profile_view"><![CDATA[Event]]></string>
     <string name="_bx_events_menu_item_title_view_profile_view"><![CDATA[Event]]></string>
+    <string name="_bx_events_menu_item_title_system_invite"><![CDATA[Invite]]></string>
+    <string name="_bx_events_menu_item_title_invite"><![CDATA[Invite]]></string>
 
     <string name="_bx_events_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
     <string name="_bx_events_menu_item_title_befriend"><![CDATA[Add friend]]></string>

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

@@ -10,7 +10,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 -- PAGES
 
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_events';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_events' OR `object` IN('bx_events_create_profile', 'bx_events_delete_profile', 'bx_events_edit_profile', 'bx_events_edit_profile_cover', 'bx_events_view_profile', 'bx_events_view_profile_closed', 'bx_events_profile_info', 'bx_events_home', 'bx_events_fans', 'bx_events_joined', 'bx_events_top', 'bx_events_manage', 'bx_events_administration');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_events' OR `object` IN('bx_events_create_profile', 'bx_events_delete_profile', 'bx_events_edit_profile', 'bx_events_edit_profile_cover', 'bx_events_invite', 'bx_events_view_profile', 'bx_events_view_profile_closed', 'bx_events_profile_info', 'bx_events_home', 'bx_events_fans', 'bx_events_joined', 'bx_events_top', 'bx_events_manage', 'bx_events_administration');
 
 -- MENU
 

+ 9 - 0
modules/boonex/events/install/sql/enable.sql

@@ -63,6 +63,14 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_events_edit_profile_cover', 1, 'bx_events', '_bx_events_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
 
+-- PAGE: invite members
+
+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_events_invite', 'invite-to-event', '_bx_events_page_title_sys_invite_to_group', '_bx_events_page_title_invite_to_group', 'bx_events', 5, 2147483647, 1, 'page.php?i=invite-to-event', '', '', '', 0, 1, 0, 'BxEventsPageEntry', 'modules/boonex/events/classes/BxEventsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_events_invite', 1, 'bx_events', '_bx_events_page_block_title_invite_to_group', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:13:\"entity_invite\";}', 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 
@@ -193,6 +201,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_events_view_actions_more', 'bx_events', 'profile-subscribe-remove', '_bx_events_menu_item_title_system_unsubscribe', '_bx_events_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
 ('bx_events_view_actions_more', 'bx_events', 'edit-event-cover', '_bx_events_menu_item_title_system_edit_cover', '_bx_events_menu_item_title_edit_cover', 'page.php?i=edit-event-cover&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
 ('bx_events_view_actions_more', 'bx_events', 'edit-event-profile', '_bx_events_menu_item_title_system_edit_profile', '_bx_events_menu_item_title_edit_profile', 'page.php?i=edit-event-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 40),
+('bx_events_view_actions_more', 'bx_events', 'invite-to-event', '_bx_events_menu_item_title_system_invite', '_bx_events_menu_item_title_invite', 'page.php?i=invite-to-event&id={content_id}', '', '', 'user-plus', '', 2147483647, 1, 0, 42),
 ('bx_events_view_actions_more', 'bx_events', 'delete-event-profile', '_bx_events_menu_item_title_system_delete_profile', '_bx_events_menu_item_title_delete_profile', 'page.php?i=delete-event-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 50);
 
 -- MENU: module sub-menu

+ 5 - 1
modules/boonex/events/install/sql/install.sql

@@ -204,7 +204,8 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_event', 'bx_event_edit', 'bx_events', 0, '_bx_events_form_profile_display_edit'),
 ('bx_event', 'bx_event_edit_cover', 'bx_events', 0, '_bx_events_form_profile_display_edit_cover'),
 ('bx_event', 'bx_event_view', 'bx_events', 1, '_bx_events_form_profile_display_view'),
-('bx_event', 'bx_event_view_full', 'bx_events', 1, '_bx_events_form_profile_display_view_full');
+('bx_event', 'bx_event_view_full', 'bx_events', 1, '_bx_events_form_profile_display_view_full'),
+('bx_event', 'bx_event_invite', 'bx_events', 0, '_bx_events_form_profile_display_invite');
 
 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_event', 'bx_events', 'allow_view_to', 3, '', 0, 'custom', '_bx_events_form_profile_input_sys_allow_view_to', '_bx_events_form_profile_input_allow_view_to', '_bx_events_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
@@ -242,6 +243,9 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_event_add', 'allow_view_to', 2147483647, 1, 15),
 ('bx_event_add', 'do_submit', 2147483647, 1, 16),
 
+('bx_event_invite', 'initial_members', 2147483647, 1, 1),
+('bx_event_invite', 'do_submit', 2147483647, 1, 2),
+
 ('bx_event_delete', 'cover', 2147483647, 0, 0),
 ('bx_event_delete', 'picture', 2147483647, 0, 0),
 ('bx_event_delete', 'delete_confirm', 2147483647, 1, 0),

+ 5 - 4
modules/boonex/files/classes/BxFilesTemplate.php

@@ -60,14 +60,15 @@ class BxFilesTemplate extends BxBaseModTextTemplate
         $oModule = BxDolModule::getInstance($this->MODULE);
         $CNF = $oModule->_oConfig->CNF;
 
+        $sNoPreview = MsgBox(_t('_bx_files_txt_preview_not_available'));
         if (!($aFile = $oModule->getContentFile($aData)))
-            return '';
+            return $sNoPreview;
         if (!($oFileHandler = BxDolFileHandler::getObjectInstanceByFile($aFile['file_name'])))
-            return '';
+            return $sNoPreview;
         if (!($oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE'])))
-            return '';
+            return $sNoPreview;
         if (!($sFileUrl = $oStorage->getFileUrlById($aFile['id'])))
-            return '';
+            return $sNoPreview;
 
         return $oFileHandler->display($sFileUrl, $aFile);
     }

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

@@ -179,6 +179,7 @@
     <string name="_bx_files_cat_backup"><![CDATA[Backup]]></string>
 
     <string name="_bx_files_txt_all_entries_by"><![CDATA[<a href="{0}">All Files by {1} ({2})</a>]]></string>
+    <string name="_bx_files_txt_preview_not_available"><![CDATA[Preview isn't available]]></string>
     <string name="_bx_files_txt_sample_single"><![CDATA[file]]></string>
     <string name="_bx_files_txt_sample_single_with_article"><![CDATA[a file]]></string>
     <string name="_bx_files_txt_sample_comment_single"><![CDATA[file's comment]]></string>

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

@@ -19,6 +19,7 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'view-group-profile' => 'checkAllowedView',
             'edit-group-profile' => 'checkAllowedEdit',
             'edit-group-cover' => 'checkAllowedChangeCover',
+            'invite-to-group' => 'checkAllowedInvite',
             'delete-group-profile' => 'checkAllowedDelete',
             'profile-fan-add' => 'checkAllowedFanAdd',
             'profile-fan-remove' => 'checkAllowedFanRemove',
@@ -86,6 +87,7 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             '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_FORM_ENTRY_DISPLAY_INVITE' => 'bx_group_invite',
             '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

+ 7 - 2
modules/boonex/groups/install/langs/en.xml

@@ -14,6 +14,7 @@
 	<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_display_view_full"><![CDATA[Full View Group]]></string>
+	<string name="_bx_groups_form_profile_display_invite"><![CDATA[Invite to Group]]></string>
 	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
     <string name="_bx_groups_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_groups_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
@@ -77,6 +78,8 @@
 	<string name="_bx_groups_page_title_manage"><![CDATA[Manage Groups]]></string>
 	<string name="_bx_groups_page_title_sys_top"><![CDATA[Top Groups]]></string>
 	<string name="_bx_groups_page_title_top"><![CDATA[Top Groups]]></string>
+	<string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
+	<string name="_bx_groups_page_title_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
 
 	<string name="_bx_groups_page_block_title_favorites_of_author"><![CDATA[Favorite Groups]]></string>
     <string name="_bx_groups_page_block_title_sys_favorites_of_author"><![CDATA[Favorite Groups]]></string>
@@ -103,8 +106,8 @@
 	<string name="_bx_groups_page_block_title_manage"><![CDATA[Manage Groups]]></string>
     <string name="_bx_groups_page_block_title_top_profiles"><![CDATA[Top Groups]]></string>
     <string name="_bx_groups_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
-
     <string name="_bx_groups_page_block_title_categories"><![CDATA[Group categories]]></string>
+    <string name="_bx_groups_page_block_title_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
 
     <string name="_bx_groups_menu_title_submenu"><![CDATA[Groups Submenu]]></string>
     <string name="_bx_groups_menu_set_title_submenu"><![CDATA[Groups Submenu]]></string>
@@ -143,6 +146,8 @@
     <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_invite"><![CDATA[Invite]]></string>
+    <string name="_bx_groups_menu_item_title_invite"><![CDATA[Invite]]></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>
@@ -269,4 +274,4 @@
     <string name="_bx_groups_email_invitation_body"><![CDATA[{email_header}
 <p><a href="{InviterUrl}">{InviterDisplayName}</a> invited you to <a href="{EntryUrl}">{EntryTitle} group</a>.</p>
 {email_footer}]]></string>
-</resources>
+</resources>

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

@@ -10,7 +10,7 @@ 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_view_profile_closed', 'bx_groups_profile_info', 'bx_groups_home', 'bx_groups_fans', 'bx_groups_joined', 'bx_groups_top', 'bx_groups_manage', 'bx_groups_administration');
+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_invite', 'bx_groups_view_profile', 'bx_groups_view_profile_closed', 'bx_groups_profile_info', 'bx_groups_home', 'bx_groups_fans', 'bx_groups_joined', 'bx_groups_top', 'bx_groups_manage', 'bx_groups_administration');
 
 -- MENU
 

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

@@ -61,6 +61,14 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 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: invite members
+
+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_invite', 'invite-to-group', '_bx_groups_page_title_sys_invite_to_group', '_bx_groups_page_title_invite_to_group', 'bx_groups', 5, 2147483647, 1, 'page.php?i=invite-to-group', '', '', '', 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_invite', 1, 'bx_groups', '_bx_groups_page_block_title_invite_to_group', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:13:\"entity_invite\";}', 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 
@@ -181,6 +189,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('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-cover', '_bx_groups_menu_item_title_system_edit_cover', '_bx_groups_menu_item_title_edit_cover', 'page.php?i=edit-group-cover&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
 ('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, 40),
+('bx_groups_view_actions_more', 'bx_groups', 'invite-to-group', '_bx_groups_menu_item_title_system_invite', '_bx_groups_menu_item_title_invite', 'page.php?i=invite-to-group&id={content_id}', '', '', 'user-plus', '', 2147483647, 1, 0, 42),
 ('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, 50);
 
 -- MENU: module sub-menu

+ 5 - 1
modules/boonex/groups/install/sql/install.sql

@@ -171,7 +171,8 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('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'),
-('bx_group', 'bx_group_view_full', 'bx_groups', 1, '_bx_groups_form_profile_display_view_full');
+('bx_group', 'bx_group_view_full', 'bx_groups', 1, '_bx_groups_form_profile_display_view_full'),
+('bx_group', 'bx_group_invite', 'bx_groups', 0, '_bx_groups_form_profile_display_invite');
 
 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', 'allow_view_to', 3, '', 0, 'custom', '_bx_groups_form_profile_input_sys_allow_view_to', '_bx_groups_form_profile_input_allow_view_to', '_bx_groups_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
@@ -197,6 +198,9 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_group_add', 'allow_view_to', 2147483647, 1, 11),
 ('bx_group_add', 'do_submit', 2147483647, 1, 12),
 
+('bx_group_invite', 'initial_members', 2147483647, 1, 1),
+('bx_group_invite', 'do_submit', 2147483647, 1, 2),
+
 ('bx_group_delete', 'delete_confirm', 2147483647, 1, 0),
 ('bx_group_delete', 'cover', 2147483647, 0, 0),
 ('bx_group_delete', 'picture', 2147483647, 0, 0),

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

@@ -13,7 +13,8 @@
 	<string name="_bx_events_form_profile_display_edit_cover"><![CDATA[Редактирование обложки]]></string>
 	<string name="_bx_events_form_profile_display_delete"><![CDATA[Удаление события]]></string>
 	<string name="_bx_events_form_profile_display_view"><![CDATA[Просмотр события]]></string>
-	<string name="_bx_events_form_profile_display_view_full"><![CDATA[Полный просмотр события]]></string>
+    <string name="_bx_events_form_profile_display_view_full"><![CDATA[Полный просмотр события]]></string>
+    <string name="_bx_events_form_profile_display_invite"><![CDATA[Приглашение на событие]]></string>
 	<string name="_bx_events_form_profile_input_sys_do_submit"><![CDATA[Выполнить]]></string>
     <string name="_bx_events_form_profile_input_sys_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
     <string name="_bx_events_form_profile_input_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
@@ -96,7 +97,9 @@
 	<string name="_bx_events_page_title_sys_top"><![CDATA[Лучшие события]]></string>
     <string name="_bx_events_page_title_top"><![CDATA[Лучшие события]]></string>
 	<string name="_bx_events_page_title_sys_calendar"><![CDATA[Календарь событий]]></string>
-	<string name="_bx_events_page_title_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_title_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_title_sys_invite_to_group"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_page_title_invite_to_group"><![CDATA[Приглашение на событие]]></string>
 
 	<string name="_bx_events_page_block_title_favorites_of_author"><![CDATA[Избранные события]]></string>   
     <string name="_bx_events_page_block_title_sys_favorites_of_author"><![CDATA[Избранные события]]></string>
@@ -127,6 +130,8 @@
     <string name="_bx_events_page_block_title_calendar"><![CDATA[Календарь событий]]></string>
     <string name="_bx_events_page_block_title_profile_calendar"><![CDATA[Календарь]]></string>
     <string name="_bx_events_page_block_title_entry_location"><![CDATA[Местоположение]]></string>
+    <string name="_bx_events_page_block_title_categories"><![CDATA[Категории групп]]></string>
+    <string name="_bx_events_page_block_title_invite_to_group"><![CDATA[Приглашение на событие]]></string>
 
     <string name="_bx_events_menu_title_submenu"><![CDATA[Под-меню событий]]></string>
     <string name="_bx_events_menu_set_title_submenu"><![CDATA[Под-меню событий]]></string>
@@ -165,6 +170,8 @@
     <string name="_bx_events_menu_item_title_view_profile_info"><![CDATA[Инфо]]></string>
     <string name="_bx_events_menu_item_title_system_view_profile_view"><![CDATA[Событие]]></string>
     <string name="_bx_events_menu_item_title_view_profile_view"><![CDATA[Событие]]></string>
+    <string name="_bx_events_menu_item_title_system_invite"><![CDATA[Пригласить]]></string>
+    <string name="_bx_events_menu_item_title_invite"><![CDATA[Пригласить]]></string>
 
     <string name="_bx_events_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
     <string name="_bx_events_menu_item_title_befriend"><![CDATA[Add friend]]></string>

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

@@ -179,6 +179,7 @@
     <string name="_bx_files_cat_backup"><![CDATA[Резервная копия]]></string>
 
     <string name="_bx_files_txt_all_entries_by"><![CDATA[<a href="{0}">Все файлы от пользователя {1} ({2})</a>]]></string>
+    <string name="_bx_files_txt_preview_not_available"><![CDATA[Предварительный просмотр недоступен]]></string>
     <string name="_bx_files_txt_sample_single"><![CDATA[файл]]></string>
     <string name="_bx_files_txt_sample_single_with_article"><![CDATA[файл]]></string>
     <string name="_bx_files_txt_sample_comment_single"><![CDATA[комментарии к файлу]]></string>

+ 12 - 6
modules/boonex/russian/data/langs/bx_groups/ru.xml

@@ -13,7 +13,8 @@
 	<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_display_view_full"><![CDATA[Полный просмотр группы]]></string>
+    <string name="_bx_groups_form_profile_display_view_full"><![CDATA[Полный просмотр группы]]></string>
+    <string name="_bx_groups_form_profile_display_invite"><![CDATA[Приглашение в группу]]></string>
 	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Выполнить]]></string>
     <string name="_bx_groups_form_profile_input_sys_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
     <string name="_bx_groups_form_profile_input_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
@@ -70,14 +71,15 @@
 	<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_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_top"><![CDATA[Популярные Группы]]></string>
-	<string name="_bx_groups_page_title_top"><![CDATA[Популярные Группы]]></string>
-    <string name="_bx_groups_page_block_title_categories"><![CDATA[Категории групп]]></string>
+	<string name="_bx_groups_page_title_sys_top"><![CDATA[Популярные группы]]></string>
+    <string name="_bx_groups_page_title_top"><![CDATA[Популярные Группы]]></string>
+    <string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
+    <string name="_bx_groups_page_title_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
 
 	<string name="_bx_groups_page_block_title_favorites_of_author"><![CDATA[Избранные группы]]></string>   
     <string name="_bx_groups_page_block_title_sys_favorites_of_author"><![CDATA[Избранные группы]]></string>
@@ -104,6 +106,8 @@
 	<string name="_bx_groups_page_block_title_manage"><![CDATA[Управление группами]]></string>
     <string name="_bx_groups_page_block_title_top_profiles"><![CDATA[Популярные Группы]]></string>
     <string name="_bx_groups_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_groups_page_block_title_categories"><![CDATA[Категории групп]]></string>
+    <string name="_bx_groups_page_block_title_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
 
     <string name="_bx_groups_menu_title_submenu"><![CDATA[Группы - Подменю]]></string>
     <string name="_bx_groups_menu_set_title_submenu"><![CDATA[Группы - Подменю]]></string>
@@ -142,7 +146,9 @@
     <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_invite"><![CDATA[Пригласить]]></string>
+    <string name="_bx_groups_menu_item_title_invite"><![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>