Quellcode durchsuchen

Ticket #5076 - Profile badge. Organizations.

AntonLV vor 1 Jahr
Ursprung
Commit
8b7c6239fa

+ 7 - 0
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -26,6 +26,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'edit-organization-profile' => 'checkAllowedEdit',
             'organization-manage' => 'checkAllowedEdit',
             'edit-organization-cover' => 'checkAllowedChangeCover',
+            'edit-organization-badge' => 'checkAllowedChangeBadge',
             'invite-to-organization' => 'checkAllowedInvite',
             'delete-organization-profile' => 'checkAllowedDelete',
             'profile-friends' => 'checkAllowedFriends',
@@ -62,6 +63,8 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
             'FIELD_COVER_POSITION' => 'cover_data',
+            'FIELD_BADGE' => 'badge',
+            'FIELD_BADGE_LINK' => 'badge_link',
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -133,6 +136,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             // objects
             'OBJECT_STORAGE' => 'bx_organizations_pics',
             'OBJECT_STORAGE_COVER' => 'bx_organizations_pics',
+            'OBJECT_STORAGE_BADGE' => 'bx_organizations_pics',
             'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_organizations_thumb',
             'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_organizations_icon',
             'OBJECT_IMAGES_TRANSCODER_AVATAR' => 'bx_organizations_avatar',
@@ -141,6 +145,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_organizations_cover',
             'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_organizations_cover_thumb',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_organizations_gallery',
+            'OBJECT_IMAGES_TRANSCODER_BADGE' => 'bx_organizations_badge',
             'OBJECT_VIEWS' => 'bx_organizations',
             'OBJECT_VOTES' => 'bx_organizations',
             'OBJECT_REACTIONS' => 'bx_organizations_reactions',
@@ -158,6 +163,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_organization_add',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_organization_edit',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_organization_edit_cover',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT_BADGE' => 'bx_organization_edit_badge',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_organization_delete',
             'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_organization_invite',
             'OBJECT_FORM_PRICE' => 'bx_organizations_price',
@@ -191,6 +197,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'OBJECT_CONNECTIONS' => 'bx_organizations_fans',
             'OBJECT_UPLOADERS_COVER' => array('bx_organizations_cover_crop'),
             'OBJECT_UPLOADERS_PICTURE' => array('bx_organizations_picture_crop'),
+            'OBJECT_UPLOADERS_BADGE' => array('bx_organizations_badge_crop'),
             'OBJECT_PRE_LIST_ROLES' => 'bx_organizations_roles',
             'OBJECT_PRE_LIST_PERIOD_UNITS' => 'bx_organizations_period_units',
             

+ 1 - 1
modules/boonex/organizations/classes/BxOrgsSearchResult.php

@@ -48,7 +48,7 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_organizations_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'org_name', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'org_name', 'picture', 'cover', 'cover_data', 'badge', 'badge_link', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 21 - 0
modules/boonex/organizations/classes/BxOrgsUploaderBadgeCrop.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Organizations Organizations
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxOrgsUploaderBadgeCrop extends BxBaseModGroupsUploaderBadgeCrop
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_oModule = BxDolModule::getInstance('bx_organizations');
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+}
+
+/** @} */

+ 5 - 4
modules/boonex/organizations/install/config.php

@@ -65,7 +65,7 @@ $aConfig = array(
     	'trigger_page_profile_view_entry', 
     ),
 
-	/**
+    /**
      * Storage objects to automatically delete files from upon module uninstallation.
      * Note. Don't add storage objects used in transcoder objects.
      */
@@ -73,7 +73,7 @@ $aConfig = array(
     	'bx_organizations_pics'
     ),
 
-	/**
+    /**
      * Transcoders.
      */
     'transcoders' => array(
@@ -84,10 +84,11 @@ $aConfig = array(
     	'bx_organizations_picture', 
     	'bx_organizations_cover', 
     	'bx_organizations_cover_thumb',
-    	'bx_organizations_gallery'
+    	'bx_organizations_gallery',
+        'bx_organizations_badge'
     ),
 
-	/**
+    /**
      * Extended Search Forms.
      */
     'esearches' => array(

+ 10 - 0
modules/boonex/organizations/install/langs/en.xml

@@ -71,6 +71,10 @@
     <string name="_bx_orgs_form_profile_input_online_search"><![CDATA[Online only]]></string>
     <string name="_bx_orgs_form_profile_input_sys_cover"><![CDATA[Cover Picture]]></string>
     <string name="_bx_orgs_form_profile_input_cover"><![CDATA[Upload New Cover Picture]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_badge"><![CDATA[Badge Image]]></string>
+    <string name="_bx_orgs_form_profile_input_badge"><![CDATA[Upload New Badge Image]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_badge_link"><![CDATA[Badge Link]]></string>
+    <string name="_bx_orgs_form_profile_input_badge_link"><![CDATA[Badge Link]]></string>
     <string name="_bx_orgs_form_profile_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
     <string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this profile]]></string>
     <string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
@@ -120,6 +124,7 @@
     <string name="_bx_orgs_acl_action_use_paid_join"><![CDATA[Use paid join]]></string>
     <string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Delete Organization's Profile]]></string>
     <string name="_bx_orgs_acl_action_view_profile"><![CDATA[View Organization's Profile]]></string>
+    <string name="_bx_orgs_acl_action_change_badge"><![CDATA[Change Organization's Profile Badge]]></string>
     <string name="_bx_orgs_acl_action_edit_any_profile"><![CDATA[Edit Any Organization's Profile]]></string>
     <string name="_bx_orgs_acl_action_delete_any_profile"><![CDATA[Delete Any Organization's Profile]]></string>
     <string name="_bx_orgs_acl_action_delete_invites"><![CDATA[Delete Invites]]></string>
@@ -130,6 +135,8 @@
     <string name="_bx_orgs_page_title_edit_profile"><![CDATA[Edit Profile]]></string>
     <string name="_bx_orgs_page_title_sys_edit_profile_cover"><![CDATA[Edit Profile Cover]]></string>
     <string name="_bx_orgs_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_orgs_page_title_sys_edit_profile_badge"><![CDATA[Edit Badge]]></string>
+    <string name="_bx_orgs_page_title_edit_profile_badge"><![CDATA[Edit Badge]]></string>
     <string name="_bx_orgs_page_title_manage_profile"><![CDATA[Manage]]></string>
     <string name="_bx_orgs_page_title_sys_manage_profile"><![CDATA[Manage]]></string>
     <string name="_bx_orgs_page_title_sys_delete_profile"><![CDATA[Delete Profile]]></string>
@@ -193,6 +200,7 @@
     <string name="_bx_orgs_page_block_title_create_profile"><![CDATA[Create a Profile - Organization]]></string>
     <string name="_bx_orgs_page_block_title_edit_profile"><![CDATA[Edit Profile]]></string>
     <string name="_bx_orgs_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_orgs_page_block_title_edit_profile_badge"><![CDATA[Edit Badge]]></string>
     <string name="_bx_orgs_page_block_title_delete_profile"><![CDATA[Delete Profile]]></string>
     <string name="_bx_orgs_page_block_title_profile_all_actions"><![CDATA[All Actions]]></string>
     <string name="_bx_orgs_page_block_title_join_profile"><![CDATA[Join Organization]]></string>
@@ -294,6 +302,8 @@
     <string name="_bx_orgs_menu_item_title_edit_pricing"><![CDATA[Edit Pricing]]></string>
     <string name="_bx_orgs_menu_item_title_system_edit_profile"><![CDATA[Edit Organization]]></string>
     <string name="_bx_orgs_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
+    <string name="_bx_orgs_menu_item_title_system_edit_badge"><![CDATA[Edit Badge]]></string>
+    <string name="_bx_orgs_menu_item_title_edit_badge"><![CDATA[Edit Badge]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete_profile"><![CDATA[Delete Profile and Data]]></string>
     <string name="_bx_orgs_menu_item_title_delete_profile"><![CDATA[Delete Profile and Data]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>

+ 2 - 2
modules/boonex/organizations/install/sql/disable.sql

@@ -8,7 +8,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 
 -- PAGES
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_organizations';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_join_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_profile_cover', 'bx_organizations_invite', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_pricing', 'bx_organizations_fans', 'bx_organizations_manage_item', 'bx_organizations_profile_friends', 'bx_organizations_friend_requests', 'bx_organizations_profile_favorites', 'bx_organizations_profile_subscriptions', 'bx_organizations_profile_comments', 'bx_organizations_home', 'bx_organizations_search', 'bx_organizations_manage', 'bx_organizations_joined');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_join_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_badge', 'bx_organizations_invite', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_pricing', 'bx_organizations_fans', 'bx_organizations_manage_item', 'bx_organizations_profile_friends', 'bx_organizations_friend_requests', 'bx_organizations_profile_favorites', 'bx_organizations_profile_subscriptions', 'bx_organizations_profile_comments', 'bx_organizations_home', 'bx_organizations_search', 'bx_organizations_manage', 'bx_organizations_joined');
 
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_organizations';
@@ -57,7 +57,7 @@ DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_organizations_allow_vie
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_organizations';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_organizations_cover_crop', 'bx_organizations_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_organizations_cover_crop', 'bx_organizations_picture_crop', 'bx_organizations_badge_crop');
 
 -- CRON
 DELETE FROM `sys_cron_jobs` WHERE `name` IN ('bx_organizations_pruning');

+ 19 - 1
modules/boonex/organizations/install/sql/enable.sql

@@ -80,6 +80,13 @@ 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_organizations_edit_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
+-- PAGE: edit badge
+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_organizations_edit_badge', 'edit-organization-badge', '_bx_orgs_page_title_sys_edit_profile_badge', '_bx_orgs_page_title_edit_profile_badge', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=edit-persons-badge', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_edit_badge', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile_badge', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:17:"entity_edit_badge";}', 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_organizations_invite', 'invite-to-organization', '_bx_orgs_page_title_sys_invite_to_organization', '_bx_orgs_page_title_invite_to_organization', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=invite-to-organization', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
@@ -317,6 +324,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_organizations_view_actions_more', 'bx_organizations', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', 192, '', 1, 0, 20),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_organizations&content_id={content_id}', '', '', 'history', '', 192, '', 1, 0, 30),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-profile', '_bx_orgs_menu_item_title_system_edit_profile', '_bx_orgs_menu_item_title_edit_profile', 'page.php?i=edit-organization-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 40),
+('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-badge', '_bx_orgs_menu_item_title_system_edit_badge', '_bx_orgs_menu_item_title_edit_badge', 'page.php?i=edit-organization-badge&id={content_id}', '', '', 'fa-certificate', '', 2147483647, '', 1, 0, 42),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-pricing', '_bx_orgs_menu_item_title_system_edit_pricing', '_bx_orgs_menu_item_title_edit_pricing', 'page.php?i=edit-organization-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 50),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'invite-to-organization', '_bx_orgs_menu_item_title_system_invite', '_bx_orgs_menu_item_title_invite', 'page.php?i=invite-to-organization&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 60),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-profile', '_bx_orgs_menu_item_title_system_delete_profile', '_bx_orgs_menu_item_title_delete_profile', 'page.php?i=delete-organization-profile&id={content_id}', '', '', 'remove', '', 2147483647, '', 1, 0, 70),
@@ -517,6 +525,10 @@ INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`,
 ('bx_organizations', 'view entry', NULL, '_bx_orgs_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_organizations', 'change badge', NULL, '_bx_orgs_acl_action_change_badge', '', 1, 3);
+SET @iIdActionChangeBadge = LAST_INSERT_ID();
+
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 ('bx_organizations', 'edit any entry', NULL, '_bx_orgs_acl_action_edit_any_profile', '', 1, 3);
 SET @iIdActionProfileEditAny = LAST_INSERT_ID();
@@ -575,6 +587,11 @@ INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
 (@iAdministrator, @iIdActionProfileView),
 (@iPremium, @iIdActionProfileView),
 
+-- set profile badge
+(@iModerator, @iIdActionChangeBadge),
+(@iAdministrator, @iIdActionChangeBadge),
+(@iPremium, @iIdActionChangeBadge),
+
 -- any profile edit
 (@iModerator, @iIdActionProfileEditAny),
 (@iAdministrator, @iIdActionProfileEditAny),
@@ -771,7 +788,8 @@ INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `B
 -- UPLOADERS
 INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
 ('bx_organizations_cover_crop', 1, 'BxOrgsUploaderCoverCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderCoverCrop.php'),
-('bx_organizations_picture_crop', 1, 'BxOrgsUploaderPictureCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderPictureCrop.php');
+('bx_organizations_picture_crop', 1, 'BxOrgsUploaderPictureCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderPictureCrop.php'),
+('bx_organizations_badge_crop', 1, 'BxOrgsUploaderBadgeCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderBadgeCrop.php');
 
 
 -- CRON

+ 14 - 3
modules/boonex/organizations/install/sql/install.sql

@@ -2,7 +2,7 @@
 SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
 
 -- TABLE: PROFILES
-CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
+CREATE TABLE IF NOT EXISTS ``sys_objects_transcoder`` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `author` int(10) unsigned NOT NULL,
   `added` int(11) NOT NULL,
@@ -10,6 +10,8 @@ CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
   `cover_data` varchar(50) NOT NULL,
+  `badge` int(11) NOT NULL default '0',
+  `badge_link` varchar(255) NOT NULL default '',
   `org_name` varchar(255) NOT NULL,
   `org_cat` int(11) NOT NULL,
   `multicat` text NOT NULL,
@@ -330,7 +332,8 @@ INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`,
 ('bx_organizations_picture', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
 ('bx_organizations_cover', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
 ('bx_organizations_cover_thumb', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
-('bx_organizations_gallery', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0');
+('bx_organizations_gallery', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_badge', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0');
 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 ('bx_organizations_icon', 'Resize', 'a:3:{s:1:"w";s:2:"30";s:1:"h";s:2:"30";s:13:"square_resize";s:1:"1";}', '0'),
@@ -340,7 +343,8 @@ INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_par
 ('bx_organizations_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_organizations_cover', 'Resize', 'a:2:{s:1:"w";s:3:"960";s:1:"h";s:3:"480";}', '0'),
 ('bx_organizations_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'),
-('bx_organizations_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+('bx_organizations_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_organizations_badge', 'Resize', 'a:3:{s:1:"w";s:2:"32";s:1:"h";s:2:"32";s:13:"square_resize";s:1:"1";}', '0');
 
 
 -- FORMS
@@ -352,6 +356,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_organization', 'bx_organization_delete', 'bx_organizations', 0, '_bx_orgs_form_profile_display_delete'),
 ('bx_organization', 'bx_organization_edit', 'bx_organizations', 0, '_bx_orgs_form_profile_display_edit'),
 ('bx_organization', 'bx_organization_edit_cover', 'bx_organizations', 0, '_bx_orgs_form_profile_display_edit_cover'),
+('bx_organization', 'bx_organization_edit_badge', 'bx_organizations', 0, '_bx_orgs_form_profile_display_edit_badge'),
 ('bx_organization', 'bx_organization_view', 'bx_organizations', 1, '_bx_orgs_form_profile_display_view'),
 ('bx_organization', 'bx_organization_view_full', 'bx_organizations', 1, '_bx_orgs_form_profile_display_view_full'),
 ('bx_organization', 'bx_organization_invite', 'bx_organizations', 0, '_bx_orgs_form_profile_display_invite');
@@ -372,6 +377,8 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_organization', 'bx_organizations', 'join_confirmation', 1, '', 1, 'switcher', '_bx_orgs_form_profile_input_sys_join_confirm', '_bx_orgs_form_profile_input_join_confirm', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'cover', 'a:1:{i:0;s:27:"bx_organizations_cover_crop";}', 'a:1:{s:27:"bx_organizations_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_cover', '_bx_orgs_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'picture', 'a:1:{i:0;s:29:"bx_organizations_picture_crop";}', 'a:1:{s:29:"bx_organizations_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_picture', '_bx_orgs_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_orgs_form_profile_input_picture_err', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'badge', 'a:1:{i:0;s:27:"bx_organizations_badge_crop";}', 'a:1:{s:27:"bx_organizations_badge_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_badge', '_bx_orgs_form_profile_input_badge', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'badge_link', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_badge_link', '_bx_orgs_form_profile_input_badge_link', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'profile_email', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_email', '_bx_orgs_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
 ('bx_organization', 'bx_organizations', 'profile_status', '', '', 0, 'custom', '_bx_orgs_form_profile_input_sys_profile_status', '_bx_orgs_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
@@ -418,6 +425,10 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_organization_edit_cover', 'cover', 2147483647, 1, 1),
 ('bx_organization_edit_cover', 'do_submit', 2147483647, 1, 2),
 
+('bx_organization_edit_badge', 'badge', 2147483647, 1, 1),
+('bx_organization_edit_badge', 'badge_link', 2147483647, 1, 2),
+('bx_organization_edit_badge', 'do_submit', 2147483647, 1, 3),
+
 ('bx_organization_view', 'org_name', 2147483647, 1, 1),
 ('bx_organization_view', 'org_cat', 2147483647, 1, 2),
 ('bx_organization_view', 'profile_email', 192, 1, 3),

+ 4 - 4
modules/boonex/organizations/install/sql/uninstall.sql

@@ -9,15 +9,15 @@ DELETE FROM sys_profiles WHERE `type` = 'bx_organizations';
 DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_organizations_pics', 'bx_organizations_pics_resized');
 DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_organizations_pics', 'bx_organizations_pics_resized');
 
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
-DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery', 'bx_organizations_badge');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery', 'bx_organizations_badge');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_avatar_big', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery', 'bx_organizations_badge');
 
 -- FORMS
 DELETE FROM `sys_objects_form` WHERE `module` = 'bx_organizations';
 DELETE FROM `sys_form_displays` WHERE `module` = 'bx_organizations';
 DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_organizations';
-DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_organization_add', 'bx_organization_delete', 'bx_organization_edit', 'bx_organization_edit_cover', 'bx_organization_view', 'bx_organization_view_full', 'bx_organization_invite', 'bx_organizations_price_add', 'bx_organizations_price_edit');
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_organization_add', 'bx_organization_delete', 'bx_organization_edit', 'bx_organization_edit_cover', 'bx_organization_edit_badge', 'bx_organization_view', 'bx_organization_view_full', 'bx_organization_invite', 'bx_organizations_price_add', 'bx_organizations_price_edit');
 
 -- PRE-VALUES
 DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_organizations';

+ 10 - 0
modules/boonex/russian/data/langs/bx_organizations/ru.xml

@@ -67,6 +67,10 @@
     <string name="_bx_orgs_form_profile_input_online_search"><![CDATA[В сети]]></string>
     <string name="_bx_orgs_form_profile_input_sys_cover"><![CDATA[Картинка обложки]]></string>
     <string name="_bx_orgs_form_profile_input_cover"><![CDATA[Загрузить новую картинку обложки]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_badge"><![CDATA[Изображение значка]]></string>
+    <string name="_bx_orgs_form_profile_input_badge"><![CDATA[Загрузить новое изображение значка]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_badge_link"><![CDATA[Ссылка значка]]></string>
+    <string name="_bx_orgs_form_profile_input_badge_link"><![CDATA[Ссылка значка]]></string>
     <string name="_bx_orgs_form_profile_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
     <string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить этот профиль]]></string>
     <string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено.]]></string>
@@ -117,6 +121,7 @@
     <string name="_bx_orgs_acl_action_use_paid_join"><![CDATA[Использовать платный вход в организацию]]></string>
     <string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Удалить профиль организации]]></string>
     <string name="_bx_orgs_acl_action_view_profile"><![CDATA[Просмотреть профиль организации]]></string>
+    <string name="_bx_orgs_acl_action_change_badge"><![CDATA[Изменять значок профиля организации]]></string>
     <string name="_bx_orgs_acl_action_edit_any_profile"><![CDATA[Редактировать профиль любой организации]]></string>
     <string name="_bx_orgs_acl_action_delete_any_profile"><![CDATA[Удалять профиль любой организации]]></string>
     <string name="_bx_orgs_acl_action_delete_invites"><![CDATA[Удалять приглашения]]></string>
@@ -127,6 +132,8 @@
     <string name="_bx_orgs_page_title_edit_profile"><![CDATA[Редактировать профиль]]></string>
     <string name="_bx_orgs_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку профиля]]></string>
     <string name="_bx_orgs_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_orgs_page_title_sys_edit_profile_badge"><![CDATA[Редактировать значок]]></string>
+    <string name="_bx_orgs_page_title_edit_profile_badge"><![CDATA[Редактировать значок]]></string>
     <string name="_bx_orgs_page_title_manage_profile"><![CDATA[Управление]]></string>
     <string name="_bx_orgs_page_title_sys_manage_profile"><![CDATA[Управление группой]]></string>
     <string name="_bx_orgs_page_title_sys_delete_profile"><![CDATA[Удалить профиль]]></string>
@@ -190,6 +197,7 @@
     <string name="_bx_orgs_page_block_title_create_profile"><![CDATA[Создать профиль - организация]]></string>
     <string name="_bx_orgs_page_block_title_edit_profile"><![CDATA[Редактировать профиль]]></string>
     <string name="_bx_orgs_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_orgs_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
     <string name="_bx_orgs_page_block_title_delete_profile"><![CDATA[Удалить профиль]]></string>
     <string name="_bx_orgs_page_block_title_profile_all_actions"><![CDATA[Все действия]]></string>
     <string name="_bx_orgs_page_block_title_join_profile"><![CDATA[Присоединиться к организации]]></string>
@@ -288,6 +296,8 @@
     <string name="_bx_orgs_menu_item_title_edit_pricing"><![CDATA[Редактировать цены]]></string>
     <string name="_bx_orgs_menu_item_title_system_edit_profile"><![CDATA[Редактировать организацию]]></string>
     <string name="_bx_orgs_menu_item_title_edit_profile"><![CDATA[Редактировать профиль]]></string>
+    <string name="_bx_orgs_menu_item_title_system_edit_badge"><![CDATA[Редактировать значок]]></string>
+    <string name="_bx_orgs_menu_item_title_edit_badge"><![CDATA[Редактировать значок]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete_profile"><![CDATA[Удалить профиль и данные]]></string>
     <string name="_bx_orgs_menu_item_title_delete_profile"><![CDATA[Удалить профиль и данные]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete_account"><![CDATA[Удалить аккаунт]]></string>