RomanL 8 лет назад
Родитель
Сommit
aec9e928ff

+ 13 - 3
inc/classes/BxDolMetatags.php

@@ -390,7 +390,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
             return $s;
 
         foreach ($a as $sKeyword)
-            $s = str_ireplace('#' . $sKeyword, '<a class="bx-tag" rel="tag" href="' . BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword) . '"><s>#</s><b>' . $sKeyword . '</b></a>', $s);
+            $s = str_ireplace('#' . $sKeyword, '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword) . '"><s>#</s><b>' . $sKeyword . '</b></a>', $s);
 
         return $s;
     }
@@ -409,10 +409,20 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
     
         foreach ($a as $sKeyword)
             if (0 === strcasecmp(mb_strtolower($s), mb_strtolower($sKeyword)))
-                $s = '<a class="bx-tag" rel="tag" href="' . BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword) . '">' . $sKeyword . '</a>';
+                $s = '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword) . '">' . $sKeyword . '</a>';
 
         return $s;
     }
+	
+	public function keywordsGetHashTagUrl($sKeyword) 
+    {   
+        $sUrl = BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword);
+        bx_alert('meta_keyword', 'add_url', 0, false, array(
+           'url' => &$sUrl,
+           'keyword' => $sKeyword
+        ));
+	    return $sUrl;
+	}
 
     /**
      * Add keywords meta info to the head section
@@ -902,7 +912,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
         return $i;
     }
 
-    protected function _metaAdd($iId, $s, $sPreg, $sFuncDelete, $sFuncAdd, $iMaxItems, $sAlertName)
+    protected function _metaAdd($iId, $s, $sPreg, $sFuncDelete, $sFuncAdd, $iMaxItems, $sAlertName) 
     {
         $a = array();
         if (!preg_match_all($sPreg, $s, $a)) {

+ 2 - 1
inc/classes/BxDolMetatagsQuery.php

@@ -31,7 +31,7 @@ class BxDolMetatagsQuery extends BxDolDb
 
         return $aObject;
     }
-
+    
     public function mentionsAdd($mixedContentId, $aMentions, $bDeletePrevious = true)
     {
         return $this->metaAdd($mixedContentId, $aMentions, $bDeletePrevious, 'mentionsDelete', $this->_aObject['table_mentions'], 'profile_id');
@@ -49,6 +49,7 @@ class BxDolMetatagsQuery extends BxDolDb
 
     public function keywordsDelete($mixedContentId)
     {
+        bx_alert('meta_keyword', 'deleted', $mixedContentId, bx_get_logged_profile_id(), array('object' => $this->_aObject['object']));
         return $this->metaDelete($this->_aObject['table_keywords'], $mixedContentId);
     }
 

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

@@ -42,7 +42,7 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
             $this->aInputs[$CNF['FIELD_CHANGED']]['date_format'] = BX_FORMAT_DATE;
         }
 
-        if (isset($this->aInputs[$CNF['FIELD_TEXT']]) && isset($CNF['FIELD_TEXT_ID'])) {
+        if (isset($CNF['FIELD_TEXT']) && isset($this->aInputs[$CNF['FIELD_TEXT']]) && isset($CNF['FIELD_TEXT_ID'])) {
             $this->aInputs[$CNF['FIELD_TEXT']]['attrs'] = array_merge (
                 array ('id' => $CNF['FIELD_TEXT_ID']),
                 is_array($this->aInputs[$CNF['FIELD_TEXT']]['attrs']) ? $this->aInputs[$CNF['FIELD_TEXT']]['attrs'] : array ()

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -233,7 +233,7 @@ class BxBaseModGeneralModule extends BxDolModule
 			}
 		}
 
-		if(!empty($CNF['OBJECT_MENU_SUBMENU'])) {
+		if(!empty($CNF['OBJECT_MENU_SUBMENU']) && isset($CNF['URI_MANAGE_COMMON'])) {
 			BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU'])->setSelected($this->_aModule['name'], $CNF['URI_MANAGE_COMMON']);
 		}
 

+ 2 - 2
modules/base/groups/classes/BxBaseModGroupsAlertsResponse.php

@@ -23,10 +23,10 @@ class BxBaseModGroupsAlertsResponse extends BxBaseModProfileAlertsResponse
         $CNF = $this->_oModule->_oConfig->CNF;
 
         // connection events
-        if ($CNF['OBJECT_CONNECTIONS'] == $oAlert->sUnit && 'connection_added' == $oAlert->sAction) {
+        if (isset($CNF['OBJECT_CONNECTIONS']) && $CNF['OBJECT_CONNECTIONS'] == $oAlert->sUnit && 'connection_added' == $oAlert->sAction) {
             $this->_oModule->serviceAddMutualConnection($oAlert->aExtras['content'], $oAlert->aExtras['initiator']);
         }
-        elseif ($CNF['OBJECT_CONNECTIONS'] == $oAlert->sUnit && 'connection_removed' == $oAlert->sAction) {
+        elseif (isset($CNF['OBJECT_CONNECTIONS']) && $CNF['OBJECT_CONNECTIONS'] == $oAlert->sUnit && 'connection_removed' == $oAlert->sAction) {
             $this->_oModule->serviceOnRemoveConnection($oAlert->aExtras['content'], $oAlert->aExtras['initiator']);
         }
 

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

@@ -61,7 +61,7 @@ class BxBaseModGroupsFormsEntryHelper extends BxBaseModProfileFormsEntryHelper
         $CNF = &$this->_oModule->_oConfig->CNF;
         $oGroupProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->_oModule->_oConfig->getName());
 
-        if ($oGroupProfile)
+        if ($oGroupProfile && isset($CNF['TABLE_ADMINS']))
             $this->_oModule->_oDb->deleteAdminsByGroupId($oGroupProfile->id());
 
         if (isset($CNF['OBJECT_CONNECTIONS']) && $oGroupProfile && ($oConnection = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS'])))

+ 9 - 7
modules/base/groups/classes/BxBaseModGroupsMenuSnippetMeta.php

@@ -16,18 +16,20 @@ class BxBaseModGroupsMenuSnippetMeta extends BxBaseModProfileMenuSnippetMeta
         parent::__construct($aObject, $oTemplate);
 
         $CNF = &$this->_oModule->_oConfig->CNF;
+        if (isset($CNF['OBJECT_CONNECTIONS'])){
+            $this->_aConnectionToFunctionCheck[$CNF['OBJECT_CONNECTIONS']] = array(
+			    'add' => 'checkAllowedFanAdd', 
+			    'remove' => 'checkAllowedFanRemove'
+            );
 
-        $this->_aConnectionToFunctionCheck[$CNF['OBJECT_CONNECTIONS']] = array(
-			'add' => 'checkAllowedFanAdd', 
-			'remove' => 'checkAllowedFanRemove'
-        );
-
-        $this->_aConnectionToFunctionTitle[$CNF['OBJECT_CONNECTIONS']] = '_getMenuItemConnectionsTitle';
+            $this->_aConnectionToFunctionTitle[$CNF['OBJECT_CONNECTIONS']] = '_getMenuItemConnectionsTitle';
+        }
     }
 
     protected function _getMenuItemJoin($aItem)
     {
-        return $this->_getMenuItemConnection($this->_oModule->_oConfig->CNF['OBJECT_CONNECTIONS'], 'add', $aItem);
+        if (isset($CNF['OBJECT_CONNECTIONS']))
+            return $this->_getMenuItemConnection($this->_oModule->_oConfig->CNF['OBJECT_CONNECTIONS'], 'add', $aItem);
     }
 
     protected function _getMenuItemLeave($aItem)

+ 7 - 6
modules/base/groups/classes/BxBaseModGroupsMenuView.php

@@ -21,18 +21,19 @@ class BxBaseModGroupsMenuView extends BxBaseModProfileMenuView
 
         if ($this->_oProfile && isLogged()) {
             $CNF = &$this->_oModule->_oConfig->CNF;
-            
-            $oConn = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS']);
+            $oConn = isset($CNF['OBJECT_CONNECTIONS']) ? BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS']) : false;
             if ($oConn && $oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
                 $this->addMarkers(array(
                     'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan_sent']),
                     'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group_cancel_request']),
                 ));
             } else {
-                $this->addMarkers(array(
-                    'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan']),
-                    'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group']),
-                ));
+                if (isset($CNF['T']['menu_item_title_become_fan']) && isset($CNF['T']['menu_item_title_leave_group'])){
+                    $this->addMarkers(array(
+                        'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan']),
+                        'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group']),
+                    ));
+                }
             }
 
             if ($oConn && $this->_oModule->isFan($this->_aContentInfo[$CNF['FIELD_ID']])) {

+ 8 - 4
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -53,8 +53,11 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
      */ 
     public function serviceGetParticipatingProfiles($iProfileId, $aConnectionObjects = false)
     {
-        $aConnectionObjects = array($this->_oConfig->CNF['OBJECT_CONNECTIONS'], 'sys_profiles_subscriptions');
-        return parent::serviceGetParticipatingProfiles($iProfileId, $aConnectionObjects);
+        if (isset($this->_oConfig->CNF['OBJECT_CONNECTIONS'])){
+            $aConnectionObjects = array($this->_oConfig->CNF['OBJECT_CONNECTIONS'], 'sys_profiles_subscriptions');
+            return parent::serviceGetParticipatingProfiles($iProfileId, $aConnectionObjects);
+        }
+        return parent::serviceGetParticipatingProfiles($iProfileId);
     }
     
     /**
@@ -591,8 +594,9 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
     public function isFan ($iContentId, $iProfileId = false) 
     {
         $oGroupProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->getName());
-
-        return $oGroupProfile && ($oConnection = BxDolConnection::getObjectInstance($this->_oConfig->CNF['OBJECT_CONNECTIONS'])) && $oConnection->isConnected($iProfileId ? $iProfileId : bx_get_logged_profile_id(), $oGroupProfile->id(), true);
+        if (isset($this->_oConfig->CNF['OBJECT_CONNECTIONS']))
+            return $oGroupProfile && ($oConnection = BxDolConnection::getObjectInstance($this->_oConfig->CNF['OBJECT_CONNECTIONS'])) && $oConnection->isConnected($iProfileId ? $iProfileId : bx_get_logged_profile_id(), $oGroupProfile->id(), true);
+        return false;
     }
 
     protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())

+ 3 - 1
modules/base/notifications/classes/BxBaseModNotificationsResponse.php

@@ -63,7 +63,9 @@ class BxBaseModNotificationsResponse extends BxDolAlertsResponse
 
         if(isset($aExtras['performer_id']))
             return (int)$aExtras['performer_id'];
-
+        
+        if(isset($aExtras['subobject_id']))
+            return (int)$aExtras['subobject_id'];
         return 0;
     }
 }

+ 27 - 0
modules/boonex/channels/classes/BxCnlAlertsResponse.php

@@ -16,6 +16,33 @@ class BxCnlAlertsResponse extends BxBaseModGroupsAlertsResponse
         $this->MODULE = 'bx_channels';
         parent::__construct();
     }
+    
+    public function response($oAlert)
+    {
+        parent::response($oAlert);
+        
+        if ($oAlert->sUnit == 'meta_keyword' && $oAlert->sAction == 'added'){
+            if (isset($oAlert->aExtras['meta']) && isset($oAlert->aExtras['object']) && isset($oAlert->iObject) && isset($oAlert->iSender)){
+                $this->_oModule->processHashtag($oAlert->aExtras['meta'], $oAlert->aExtras['object'], $oAlert->iObject, $oAlert->iSender);
+            }
+        }
+        
+        if ($oAlert->sUnit == 'meta_keyword' && $oAlert->sAction == 'add_url'){
+            if (isset($oAlert->aExtras['keyword'])){
+                $sName = $oAlert->aExtras['keyword'];
+                $id = $this->_oModule->_oDb->getChannelIdByName($sName);
+                if ($id > 0){
+                    $oAlert->aExtras['url'] = $this->_oModule->serviceProfileUrl($id);
+                }
+            }
+        }
+
+        if ($oAlert->sUnit == 'meta_keyword' && $oAlert->sAction == 'deleted'){
+            if (isset($oAlert->aExtras['object']) && isset($oAlert->iObject) && isset($oAlert->iSender)){
+                $this->_oModule->removeContentFromChannel($oAlert->iObject, $oAlert->aExtras['object']);
+            }
+        }
+    }
 }
 
 /** @} */

+ 3 - 27
modules/boonex/channels/classes/BxCnlConfig.php

@@ -21,8 +21,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
             'edit-channel-cover' => 'checkAllowedChangeCover',
             'invite-to-channel' => 'checkAllowedInvite',
             'delete-channel-profile' => 'checkAllowedDelete',
-            'profile-fan-add' => 'checkAllowedFanAdd',
-            'profile-fan-remove' => 'checkAllowedFanRemove',
             'profile-subscribe-add' => 'checkAllowedSubscribeAdd',
             'profile-subscribe-remove' => 'checkAllowedSubscribeRemove',
             'profile-actions-more' => 'checkAllowedViewMoreMenu',
@@ -37,7 +35,7 @@ class BxCnlConfig extends BxBaseModProfileConfig
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',
             'TABLE_ENTRIES_FULLTEXT' => 'search_fields',
-            'TABLE_ADMINS' => $aModule['db_prefix'] . 'admins',
+            'TABLE_CONTENT' => $aModule['db_prefix'] . 'content',
 
             // database fields
             'FIELD_ID' => 'id',
@@ -48,7 +46,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
             'FIELD_TITLE' => 'channel_name',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
-            'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
@@ -59,8 +56,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
             'URI_VIEW_ENTRY' => 'view-channel-profile',
             'URI_EDIT_ENTRY' => 'edit-channel-profile',
             'URI_EDIT_COVER' => 'edit-channel-cover',
-            'URI_JOINED_ENTRIES' => 'joined-channels',
-            'URI_MANAGE_COMMON' => 'channels-manage',
 
             'URL_HOME' => 'page.php?i=channels-home',
             'URL_MANAGE_COMMON' => 'page.php?i=channels-manage',
@@ -113,19 +108,9 @@ class BxCnlConfig extends BxBaseModProfileConfig
             'OBJECT_PRIVACY_VIEW' => 'bx_channels_allow_view_to',
             'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_channels_allow_view_notification_to',
             'OBJECT_GRID_ADMINISTRATION' => 'bx_channels_administration',
-            'OBJECT_GRID_COMMON' => 'bx_channels_common',
-            'OBJECT_GRID_CONNECTIONS' => 'bx_channels_fans',
-            'OBJECT_CONNECTIONS' => 'bx_channels_fans',
             'OBJECT_UPLOADERS_COVER' => array('bx_channels_cover_crop'),
             'OBJECT_UPLOADERS_PICTURE' => array('bx_channels_picture_crop'),
-
-            'EMAIL_INVITATION' => 'bx_channels_invitation',
-            'EMAIL_JOIN_REQUEST' => 'bx_channels_join_request',
-            'EMAIL_JOIN_CONFIRM' => 'bx_channels_join_confirm',
-            'EMAIL_FAN_BECOME_ADMIN' => 'bx_channels_fan_become_admin',
-            'EMAIL_ADMIN_BECOME_FAN' => 'bx_channels_admin_become_fan',
-            'EMAIL_FAN_REMOVE' => 'bx_channels_fan_remove',
-            'EMAIL_JOIN_REJECT' => 'bx_channels_join_reject',
+      
 
             'TRIGGER_MENU_PROFILE_VIEW_SUBMENU' => 'trigger_group_view_submenu',
             'TRIGGER_MENU_PROFILE_VIEW_ACTIONS' => 'trigger_group_view_actions',
@@ -155,9 +140,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
                 'txt_sample_comment_single' => '_bx_channels_txt_sample_comment_single',
                 'txt_sample_vote_single' => '_bx_channels_txt_sample_vote_single',
                 'txt_private_group' => '_bx_channels_txt_private_channel',
-                'txt_N_fans' => '_bx_channels_txt_N_fans',
-                'txt_ntfs_join_request' => '_bx_channels_txt_ntfs_join_request',
-                'txt_ntfs_fan_added' => '_bx_channels_txt_ntfs_fan_added',
                 'txt_ntfs_timeline_post_common' => '_bx_channels_txt_ntfs_timeline_post_common',
                 'form_field_author' => '_bx_channels_form_entry_input_author',
                 'menu_item_title_befriend_sent' => '_bx_channels_menu_item_title_befriend_sent',
@@ -174,10 +156,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
                 'filter_item_select_one_filter1' => '_bx_channels_grid_filter_item_title_adm_select_one_filter1',
                 'menu_item_manage_my' => '_bx_channels_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_channels_menu_item_title_manage_all',
-                'menu_item_title_become_fan_sent' => '_bx_channels_menu_item_title_become_fan_sent',
-                'menu_item_title_leave_group_cancel_request' => '_bx_channels_menu_item_title_leave_channel_cancel_request',
-                'menu_item_title_become_fan' => '_bx_channels_menu_item_title_become_fan',
-                'menu_item_title_leave_group' => '_bx_channels_menu_item_title_leave_channel',
                 'txt_all_entries_by_author' => '_bx_channels_page_title_browse_by_author'
             ),
 
@@ -192,9 +170,7 @@ class BxCnlConfig extends BxBaseModProfileConfig
         );
 
         $this->_aGridObjects = array(
-            'common' => $this->CNF['OBJECT_GRID_COMMON'],
-            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-            
+            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION']
         );
     }
 

+ 54 - 0
modules/boonex/channels/classes/BxCnlDb.php

@@ -27,6 +27,60 @@ class BxCnlDb extends BxBaseModGroupsDb
         );
         return $this->getOne("SELECT `" . $CNF['FIELD_ID'] . "` FROM `" . $CNF['TABLE_ENTRIES'] . "` WHERE `" . $CNF['FIELD_NAME'] . "` = :name", $aBindings);
     }
+    
+    public function addContentToChannel($iContentId, $iCnlId, $sModuleName, $iAuthorId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aBindings = array(
+            'content_id' => $iContentId,
+            'cnl_id' => $iCnlId,
+            'module_name' => $sModuleName,
+            'author_id' => $iAuthorId,
+        );
+        $this->query("INSERT INTO `" . $CNF['TABLE_CONTENT'] . "` (`content_id`, `cnl_id`, `module_name`, `author_id`) VALUES (:content_id, :cnl_id, :module_name, :author_id)", $aBindings);
+        return $this->lastId();
+    }
+    
+    public function checkContentInChannel($iContentId, $iCnlId, $sModuleName, $iAuthorId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aBindings = array(
+            'content_id' => $iContentId,
+            'cnl_id' => $iCnlId,
+            'module_name' => $sModuleName,
+            'author_id' => $iAuthorId,
+        );
+        return $this->getOne("SELECT COUNT(*) FROM `" . $CNF['TABLE_CONTENT'] . "` WHERE `content_id` = :content_id AND `module_name` = :module_name  AND `cnl_id` = :cnl_id AND `author_id` =:author_id", $aBindings);
+    }
+    
+    public function getContentById($iId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aBindings = array(
+            'id' => $iId
+        );
+        return $this->getFirstRow("SELECT * FROM `" . $CNF['TABLE_CONTENT'] . "` WHERE `id` = :id", $aBindings);
+    }
+    
+    public function getDataByContent($iContentId, $sModuleName)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aBindings = array(
+            'content_id' => $iContentId,
+            'module_name' => $sModuleName
+        );
+        return $this->getAll("SELECT `id`, `author_id`, `cnl_id` FROM `" . $CNF['TABLE_CONTENT'] . "` WHERE `content_id` = :content_id AND `module_name` = :module_name", $aBindings);
+    }
+    
+    public function removeContentFromChannel($iContentId, $sModuleName)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aBindings = array(
+            'content_id' => $iContentId,
+            'module_name' => $sModuleName
+        );
+        $this->query("DELETE FROM `" . $CNF['TABLE_CONTENT'] . "` WHERE `content_id` = :content_id AND `module_name` = :module_name", $aBindings);
+    }
 }
 
 /** @} */

+ 0 - 21
modules/boonex/channels/classes/BxCnlGridConnections.php

@@ -1,21 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defdroup    Channels Channels
- * @indroup     UnaModules
- * 
- * @{
- */
-
-class BxCnlGridConnections extends BxBaseModGroupsGridConnections
-{
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-        $this->_sContentModule = 'bx_channels';
-        parent::__construct ($aOptions, $oTemplate);
-    }
-}
-
-/** @} */

+ 136 - 12
modules/boonex/channels/classes/BxCnlModule.php

@@ -10,7 +10,7 @@
  */
 
 /**
- * Spaces profiles module.
+ * Channels profiles module.
  */
 
 class BxCnlModule extends BxBaseModGroupsModule
@@ -18,8 +18,6 @@ class BxCnlModule extends BxBaseModGroupsModule
     function __construct(&$aModule)
     {
         parent::__construct($aModule);
-       
-        $this->_aSearchableNamesExcept[] = $this->_oConfig->CNF['FIELD_JOIN_CONFIRMATION'];
     }
    
     public function checkAllowedSubscribeAdd (&$aDataEntry, $isPerformAction = false)
@@ -27,20 +25,146 @@ class BxCnlModule extends BxBaseModGroupsModule
         return parent::_checkAllowedSubscribeAdd ($aDataEntry, $isPerformAction);
     }
     
-    public function actionH($sName)
+    function processHashtag($sHashtag, $sModuleName, $iContentId, $iAuthorId)
     {
-        $iId = $this->_oDb->getChannelIdByName($sName);
-        $_GET['id'] = $iId;
-        $oPage = BxDolPage::getObjectInstance('bx_channels_view_profile');
-        echo $oPage->getCode($sName);
-
+        $mixedCnlId = $this->_oDb->getChannelIdByName($sHashtag);
+        if (empty($mixedCnlId)){
+            $CNF = &$this->_oConfig->CNF;
+            $oAccountQuery = BxDolAccountQuery::getInstance();
+            $aOperators = $oAccountQuery->getOperators();
+            if(count($aOperators) > 0){
+                $oProfile = BxDolProfile::getInstanceByAccount($aOperators[0]);
+                $aContent = $this->serviceEntityAdd($oProfile->id(), array($CNF['FIELD_NAME'] => $sHashtag));
+                if (isset($aContent['content']) && isset($aContent['content']['id']))
+                    $mixedCnlId = $aContent['content']['id'];
+            }
+        }
+        
+        if (!empty($mixedCnlId)){
+            if (0 == (int) $this->_oDb->checkContentInChannel($iContentId, $mixedCnlId, $sModuleName, $iAuthorId)){
+                $iId = $this->_oDb->addContentToChannel($iContentId, $mixedCnlId, $sModuleName, $iAuthorId);
+                $oModule = BxDolModule::getInstance($sModuleName);
+                $aInfo = $oModule->_getContent($iContentId);
+                if (is_array($aInfo)){
+                    $oDolProfileQuery = BxDolProfileQuery::getInstance();
+                    $iProfileInfo = $oDolProfileQuery->getProfileByContentAndType($mixedCnlId, $this->_aModule['name']);
+                    if(is_array($iProfileInfo)){
+                        bx_alert($this->_aModule['name'], 'hashtag_added', $iId, $iProfileInfo['id'], array('object_author_id' => $iAuthorId, 'privacy_view' => $aInfo[1]['allow_view_to']));
+                        bx_alert($this->_aModule['name'], 'hashtag_added_notif', $mixedCnlId, $iProfileInfo['id'], array('object_author_id' => $iAuthorId, 'privacy_view' => $aInfo[1]['allow_view_to'], 'subobject_id' => $iId));
+                    }
+                }
+            }
+        }
     }
     
-    function addChannel($sName)
+    function removeContentFromChannel($iContentId, $sModuleName)
+    {
+        $oDolProfileQuery = BxDolProfileQuery::getInstance();
+        
+        $aData = $this->_oDb->getDataByContent($iContentId, $sModuleName);
+        foreach ($aData as $aRow) {
+            $iProfileInfo = $oDolProfileQuery->getProfileByContentAndType($aRow['cnl_id'], $this->_aModule['name']);
+            if(is_array($iProfileInfo)){
+                bx_alert($this->_aModule['name'], 'hashtag_deleted', $aRow['id'], $iProfileInfo['id']);
+                bx_alert($this->_aModule['name'], 'hashtag_deleted_notif', $aRow['cnl_id'], $iProfileInfo['id'], array('subobject_id' => $aRow['id']));
+            }
+        }
+        
+        return $this->_oDb->removeContentFromChannel($iContentId, $sModuleName);
+    }
+    
+    function serviceSearchResultByHashtag($iContentId = 0)
     {
-        //todo IdProfile
         $CNF = &$this->_oConfig->CNF;
-        $this->serviceEntityAdd(6, array($CNF['FIELD_NAME'] => $sName));
+        
+        $oSearch = new BxTemplSearch();
+        $oSearch->setLiveSearch(0);
+        $oSearch->setMetaType('keyword');
+        $aContentInfo = $this->_oDb->getContentInfoById(bx_get('id'));
+        $_GET['keyword'] = $aContentInfo[$CNF['FIELD_NAME']];
+        $sCode = '';
+        $sCode = $oSearch->response();
+        if (!$sCode)
+            $sCode = $oSearch->getEmptyResult();
+        
+        return $sCode;
+    }
+    
+    /**
+     * Data for Timeline module
+     */
+    public function serviceGetTimelineData()
+    {
+        $sModule = $this->_aModule['name'];
+
+        return array(
+            'handlers' => array(
+                array('group' => $sModule . '_hastag', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_added', 'module_name' => $sModule, 'module_method' => 'get_timeline_post_hashtag', 'module_class' => 'Module',  'groupable' => 0, 'group_by' => ''),
+                array('group' => $sModule . '_hastag', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_deleted')
+            ),
+            'alerts' => array(
+                array('unit' => $sModule, 'action' => 'hashtag_added'),
+                array('unit' => $sModule, 'action' => 'hashtag_deleted')
+            )
+        );
+    }
+    
+    public function serviceGetTimelinePostHashtag($aEvent, $aBrowseParams = array())
+    {
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+        
+        $aContentEvent = $this->_oDb->getContentById($aEvent['object_id']);
+        if(empty($aContentEvent) || !is_array($aContentEvent))
+            return '';
+
+        $oModule = BxDolModule::getInstance($aContentEvent['module_name']);
+        if ($oModule){
+            return $oModule->serviceGetTimelinePost(array('object_id' => $aContentEvent['content_id']));
+        }
+        
+        return '';
+    }
+    
+    /**
+     * Data for Notifications module
+     */
+    public function serviceGetNotificationsData()
+    {      
+        $a = parent::serviceGetNotificationsData();
+        
+        $sModule = $this->_aModule['name'];
+
+        $a['handlers'][] = array('group' => $sModule . '_hastag_notif', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_added_notif', 'module_name' => $sModule, 'module_method' => 'get_notifications_post_hashtag', 'module_class' => 'Module');
+        $a['handlers'][] = array('group' => $sModule . '_hastag_notif', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_deleted_notif');
+
+        $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_added_notif');
+        $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_deleted_notif');
+        
+        return $a;
+    }
+
+    public function serviceGetNotificationsPostHashtag($aEvent)
+    {
+         if(empty($aEvent) || !is_array($aEvent))
+            return '';
+         
+         $aContentEvent = $this->_oDb->getContentById($aEvent['subobject_id']);
+         if(empty($aContentEvent) || !is_array($aContentEvent))
+             return '';
+         
+         $oModule = BxDolModule::getInstance($aContentEvent['module_name']);
+         if ($oModule){
+             $oPrivacy = BxDolPrivacy::getObjectInstance($oModule->_oConfig->CNF['OBJECT_PRIVACY_VIEW']);
+             if (!$oPrivacy->check($aContentEvent['content_id']))
+                 return '';
+             $aRv = $oModule->serviceGetNotificationsPost(array('object_id' => $aContentEvent['content_id']));
+             $aRv['lang_key'] = '_bx_channels_ntfs_txt_subobject_added';
+             $aRv['channel_url'] = $this->serviceGetLink($aContentEvent['cnl_id']);
+             return $aRv;
+         }
+         
+         return '';
     }
 }
 

+ 0 - 24
modules/boonex/channels/classes/BxCnlPageJoinedEntries.php

@@ -1,24 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defdroup    Channels Channels
- * @indroup     UnaModules
- *
- * @{
- */
-
-/**
- * Entries user joined to.
- */
-class BxCnlPageJoinedEntries extends BxBaseModGroupsPageJoinedEntries
-{
-    public function __construct($aObject, $oTemplate = false)
-    {
-        parent::__construct($aObject, $oTemplate);
-    }
-
-}
-
-/** @} */

+ 0 - 24
modules/boonex/channels/classes/BxCnlSearchResult.php

@@ -84,30 +84,6 @@ class BxCnlSearchResult extends BxBaseModGroupsSearchResult
                 }
                 break;
 
-            case 'joined_entries':
-                $oJoinedProfile = BxDolProfile::getInstance((int)$aParams['joined_profile']);
-                if (!$oJoinedProfile) {
-                    $this->isError = true;
-                    break;
-                }
-
-                $bProcessConditionsForPrivateContent = false;
-
-                $this->aCurrent['join']['fans'] = array(
-                    'type' => 'INNER',
-                    'table' => 'bx_cnl_fans',
-                    'mainField' => 'id',
-                    'onField' => 'content',
-                    'joinFields' => array('initiator'),
-                );
-
-                $this->aCurrent['restriction']['fans'] = array('value' => $oJoinedProfile->id(), 'field' => 'initiator', 'operator' => '=', 'table' => 'bx_cnl_fans');
-
-                $this->sBrowseUrl = 'page.php?i=' . $CNF['URI_JOINED_ENTRIES'] . '&profile_id={profile_id}';
-                $this->aCurrent['title'] = _t('_bx_channels_page_title_joined_entries');
-                $this->aCurrent['rss']['link'] = 'modules/?r=channels/rss/' . $sMode . '/' . $oJoinedProfile->id();
-                break;
-
             case 'connections':
                 if ($this->_setConnectionsConditions($aParams)) {
                     $bProcessConditionsForPrivateContent = false;

+ 3 - 81
modules/boonex/channels/install/langs/en.xml

@@ -18,8 +18,6 @@
 	<string name="_bx_channels_form_profile_display_invite"><![CDATA[Invite to Channel]]></string>
 	<string name="_bx_channels_form_entry_input_author"><![CDATA[Author]]></string>
 	<string name="_bx_channels_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
-	<string name="_bx_channels_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
-	<string name="_bx_channels_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
 	<string name="_bx_channels_form_profile_input_sys_allow_view_to"><![CDATA[Privacy]]></string>
 	<string name="_bx_channels_form_profile_input_allow_view_to"><![CDATA[Privacy]]></string>
 	<string name="_bx_channels_form_profile_input_allow_view_to_desc"><![CDATA[Closed - anyone can find the channel and see who's in it, only members can see posts. Secret - only members can find the channel and see posts.]]></string>
@@ -43,8 +41,6 @@
 	<string name="_bx_channels_acl_action_view_profile"><![CDATA[View Channel]]></string>
 	<string name="_bx_channels_acl_action_edit_any_profile"><![CDATA[Edit Any Channel]]></string>
 	
-	<string name="_bx_channels_page_title_sys_joined_entries"><![CDATA[Profile Channels]]></string>
-	<string name="_bx_channels_page_title_joined_entries"><![CDATA[Profile Channels]]></string>
 	<string name="_bx_channels_page_title_sys_create_profile"><![CDATA[Create Channel]]></string>
 	<string name="_bx_channels_page_title_create_profile"><![CDATA[Create Channel]]></string>
 	<string name="_bx_channels_page_title_sys_edit_profile"><![CDATA[Edit Channel]]></string>
@@ -65,8 +61,6 @@
 	<string name="_bx_channels_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
 	<string name="_bx_channels_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_channels_page_title_profile_friends"><![CDATA[Friends]]></string>
-	<string name="_bx_channels_page_title_sys_channel_fans"><![CDATA[Members]]></string>
-	<string name="_bx_channels_page_title_channel_fans"><![CDATA[Members]]></string>
 	<string name="_bx_channels_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_channels_page_title_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_channels_page_title_sys_profile_info"><![CDATA[Channel Info]]></string>
@@ -89,8 +83,6 @@
 	<string name="_bx_channels_page_block_title_entries_of_author"><![CDATA[Channels by {display_name}]]></string>
 	<string name="_bx_channels_page_block_title_favorites_of_author"><![CDATA[Favorite Channels]]></string>
 	<string name="_bx_channels_page_block_title_sys_favorites_of_author"><![CDATA[Favorite Channels]]></string>
-	<string name="_bx_channels_page_block_title_sys_joined_entries"><![CDATA[Joined Channels]]></string>
-	<string name="_bx_channels_page_block_title_joined_entries"><![CDATA[Joined Channels]]></string>
   <string name="_bx_channels_page_block_title_create_profile"><![CDATA[Create Channel]]></string>
 	<string name="_bx_channels_page_block_title_edit_profile"><![CDATA[Edit Channel]]></string>
 	<string name="_bx_channels_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
@@ -103,9 +95,6 @@
 	<string name="_bx_channels_page_block_title_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_channels_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_channels_page_block_title_admins"><![CDATA[Administrators]]></string>
-	<string name="_bx_channels_page_block_title_fans_link"><![CDATA[Members of <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_channels_page_block_title_fans"><![CDATA[Members]]></string>
-	<string name="_bx_channels_page_block_title_system_fans"><![CDATA[Members]]></string>
 	<string name="_bx_channels_page_block_title_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_channels_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
 	<string name="_bx_channels_page_block_title_profile_actions"><![CDATA[Actions]]></string>
@@ -120,6 +109,7 @@
 	<string name="_bx_channels_page_block_title_invite_to_channel"><![CDATA[Invite Members to the Channel]]></string>
 	<string name="_bx_channels_page_block_title_search_form"><![CDATA[Search Form]]></string>
 	<string name="_bx_channels_page_block_title_search_results"><![CDATA[Search Results]]></string>
+  <string name="_bx_channels_page_block_title_search_results_by_hashtag"><![CDATA[Search Results By Hashtag]]></string>
 	<string name="_bx_channels_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
 	<string name="_bx_channels_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
 	<string name="_bx_channels_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Channels (Showcase View)]]></string>
@@ -158,10 +148,6 @@
 	<string name="_bx_channels_menu_item_title_create_profile"><![CDATA[New Channel]]></string>
 	<string name="_bx_channels_menu_item_title_system_view_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_channels_menu_item_title_view_profile_friends"><![CDATA[Friends]]></string>
-	<string name="_bx_channels_menu_item_title_system_view_joined_channels"><![CDATA[Channels]]></string>
-	<string name="_bx_channels_menu_item_title_view_joined_channels"><![CDATA[Channels]]></string>
-	<string name="_bx_channels_menu_item_title_system_view_fans"><![CDATA[Members]]></string>
-	<string name="_bx_channels_menu_item_title_view_fans"><![CDATA[Members]]></string>
 	<string name="_bx_channels_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_channels_menu_item_title_view_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_channels_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
@@ -180,15 +166,6 @@
 	<string name="_bx_channels_menu_item_title_unfriend_cancel_request"><![CDATA[Cancel friend request]]></string>
 	<string name="_bx_channels_menu_item_title_unfriend_reject_request"><![CDATA[Reject friend request]]></string>
 	
-	<string name="_bx_channels_menu_item_title_system_become_fan"><![CDATA[Join Channel]]></string>
-	<string name="_bx_channels_menu_item_title_become_fan"><![CDATA[Join Channel]]></string>
-	<string name="_bx_channels_menu_item_title_become_fan_sent"><![CDATA[Join Channel (requested)]]></string>
-	<string name="_bx_channels_menu_item_title_become_fan_confirm"><![CDATA[Accept Request]]></string>
-	<string name="_bx_channels_menu_item_title_system_leave_channel"><![CDATA[Leave Channel]]></string>
-	<string name="_bx_channels_menu_item_title_leave_channel"><![CDATA[Leave Channel]]></string>
-	<string name="_bx_channels_menu_item_title_leave_channel_cancel_request"><![CDATA[Cancel Request]]></string>
-	<string name="_bx_channels_menu_item_title_leave_channel_reject_request"><![CDATA[Reject Request]]></string>
-	
 	<string name="_bx_channels_menu_item_title_system_subscribe"><![CDATA[Follow]]></string>
 	<string name="_bx_channels_menu_item_title_subscribe"><![CDATA[Follow]]></string>
 	<string name="_bx_channels_menu_item_title_system_unsubscribe"><![CDATA[Unfollow]]></string>
@@ -239,68 +216,13 @@
   <string name="_bx_channels_err_delete_child_presend"><![CDATA[Cannot delete this channel because there are child elements.]]></string>
 	<string name="_bx_channels_txt_account_pending"><![CDATA[This channel is pending approval, please wait until it is activated.]]></string>
 	<string name="_bx_channels_txt_account_suspended"><![CDATA[This channel is suspended.]]></string>
-	<string name="_bx_channels_txt_N_fans"><![CDATA[{0} members]]></string>
 	<string name="_bx_channels_txt_sample_single"><![CDATA[channel]]></string>
 	<string name="_bx_channels_txt_sample_single_with_article"><![CDATA[a channel]]></string>
 	<string name="_bx_channels_txt_sample_comment_single"><![CDATA[comment to channel]]></string>
 	<string name="_bx_channels_txt_sample_vote_single"><![CDATA[vote to channel]]></string>
 	<string name="_bx_channels_txt_to_admins"><![CDATA[To Admins]]></string>
 	<string name="_bx_channels_txt_from_admins"><![CDATA[From Admins]]></string>
-	<string name="_bx_channels_txt_private_channel"><![CDATA[Private channel]]></string>
-	
-	<string name="_bx_channels_alert_action_fan_added"><![CDATA[member joined]]></string>
-	<string name="_bx_channels_txt_ntfs_fan_added"><![CDATA[Channel <b class="bx-ntfs-content-profile">{owner_name}</b> has got a member <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>
-	<string name="_bx_channels_alert_action_join_request"><![CDATA[join request]]></string>
-	<string name="_bx_channels_txt_ntfs_join_request"><![CDATA[Channel <b class="bx-ntfs-content-profile">{owner_name}</b> has a join request from <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>
+
 	<string name="_bx_channels_txt_ntfs_timeline_post_common"><![CDATA[New post <b class="bx-ntfs-content-entry">{subentry_sample}</b> in <b class="bx-ntfs-content-profile">{owner_name}</b> channel timeline]]></string>
-	
-	<string name="_bx_channels_pre_lists_cats"><![CDATA[Channel categories]]></string>
-	<string name="_bx_channels_cat_General"><![CDATA[General]]></string>
-	<string name="_bx_channels_cat_Business"><![CDATA[Business]]></string>
-	<string name="_bx_channels_cat_Interests"><![CDATA[Interests]]></string>
-	<string name="_bx_channels_cat_Causes"><![CDATA[Causes]]></string>
-	<string name="_bx_channels_cat_Fun"><![CDATA[Fun]]></string>
-	<string name="_bx_channels_cat_Uncategorised"><![CDATA[Uncategorised]]></string>
-	
-	<string name="_bx_channels_email_join_request"><![CDATA[Channel join request]]></string>
-	<string name="_bx_channels_email_join_request_subject"><![CDATA[Request to join your channel]]></string>
-	<string name="_bx_channels_email_join_request_body"><![CDATA[{email_header}
-	<p>New request to join <a href="{EntryUrl}">{EntryTitle}</a> channel from <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_join_reject"><![CDATA[Channel join request was rejected]]></string>
-	<string name="_bx_channels_email_join_reject_subject"><![CDATA[Request to join a channel was rejected]]></string>
-	<string name="_bx_channels_email_join_reject_body"><![CDATA[{email_header}
-	<p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> channel was rejected by channel admin.</p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_join_confirm"><![CDATA[Channel join request was confirmed]]></string>
-	<string name="_bx_channels_email_join_confirm_subject"><![CDATA[Your request to join a channel was confirmed]]></string>
-	<string name="_bx_channels_email_join_confirm_body"><![CDATA[{email_header}
-	<p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> channel was confirmed by the channel admin.</p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_fan_remove"><![CDATA[Profile was removed from channel fans]]></string>
-	<string name="_bx_channels_email_fan_remove_subject"><![CDATA[Your profile was removed from the channel]]></string>
-	<string name="_bx_channels_email_fan_remove_body"><![CDATA[{email_header}
-	<p>Your profile was removed from <a href="{EntryUrl}">{EntryTitle}</a> channel by the channel admin.</p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_fan_become_admin"><![CDATA[Channel admin status was granted]]></string>
-	<string name="_bx_channels_email_fan_become_admin_subject"><![CDATA[You are a channel admin now]]></string>
-	<string name="_bx_channels_email_fan_become_admin_body"><![CDATA[{email_header}
-	<p>You are an admin of <a href="{EntryUrl}">{EntryTitle}</a> channel now.</p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_admin_become_fan"><![CDATA[Channel admin status was revoked]]></string>
-	<string name="_bx_channels_email_admin_become_fan_subject"><![CDATA[Your channel admin status was revoked]]></string>
-	<string name="_bx_channels_email_admin_become_fan_body"><![CDATA[{email_header}
-	<p>Your admin status was revoked from <a href="{EntryUrl}">{EntryTitle}</a> channel.</p>
-	{email_footer}]]></string>
-	
-	<string name="_bx_channels_email_invitation"><![CDATA[Invitation to channel]]></string>
-	<string name="_bx_channels_email_invitation_subject"><![CDATA[Invitation to "{EntryTitle}" channel]]></string>
-	<string name="_bx_channels_email_invitation_body"><![CDATA[{email_header}
-	<p><a href="{InviterUrl}">{InviterDisplayName}</a> invited you to <a href="{EntryUrl}">{EntryTitle} channel</a>.</p>
-	{email_footer}]]></string>
+  <string name="_bx_channels_ntfs_txt_subobject_added"><![CDATA[New content <a href="{entry_url}">{entry_caption}</a> added to channel <a href="{channel_url}">{owner_name}</a>]]></string>
 </resources>

+ 4 - 7
modules/boonex/channels/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_channels';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_channels' OR `object` IN('bx_channels_create_profile', 'bx_channels_delete_profile', 'bx_channels_edit_profile', 'bx_channels_edit_profile_cover', 'bx_channels_invite', 'bx_channels_view_profile', 'bx_channels_view_profile_closed', 'bx_channels_profile_info', 'bx_channels_profile_comments', 'bx_channels_home', 'bx_channels_fans', 'bx_channels_joined', 'bx_channels_top', 'bx_channels_search', 'bx_channels_manage', 'bx_channels_administration');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_channels' OR `object` IN('bx_channels_create_profile', 'bx_channels_delete_profile', 'bx_channels_edit_profile', 'bx_channels_edit_profile_cover', 'bx_channels_invite', 'bx_channels_view_profile', 'bx_channels_view_profile_closed', 'bx_channels_profile_info', 'bx_channels_profile_comments', 'bx_channels_home', 'bx_channels_top', 'bx_channels_search', 'bx_channels_manage', 'bx_channels_administration');
 
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_channels';
@@ -49,9 +49,6 @@ DELETE FROM `sys_objects_category` WHERE `object` = 'bx_channels_cats';
 -- SEARCH
 DELETE FROM `sys_objects_search` WHERE `ObjectName` = 'bx_channels';
 
--- CONNECTIONS
-DELETE FROM `sys_objects_connection` WHERE `object` = 'bx_channels_fans';
-
 -- STATS
 DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_channels%';
 
@@ -59,9 +56,9 @@ DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_channels%';
 DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_channels%';
 
 -- GRIDS
-DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation', 'bx_channels_common', 'bx_channels_fans');
-DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation', 'bx_channels_common', 'bx_channels_fans');
-DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation', 'bx_channels_common', 'bx_channels_fans');
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_channels_administration', 'bx_channels_moderation');
 
 -- ALERTS
 SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_channels' LIMIT 1);

+ 21 - 111
modules/boonex/channels/install/sql/enable.sql

@@ -21,15 +21,6 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 
 -- 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_channels_create_profile', 'create-channel-profile', '_bx_channels_page_title_sys_create_profile', '_bx_channels_page_title_create_profile', 'bx_channels', 5, 2147483647, 1, 'page.php?i=create-channel-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_channels_create_profile', 1, 'bx_channels', '_bx_channels_page_block_title_create_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";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 
@@ -37,11 +28,8 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 
 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_channels_view_profile', 1, 'bx_channels', '', '_bx_channels_page_block_title_entry_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 1, 0),
-('bx_channels_view_profile', 2, 'bx_channels', '', '_bx_channels_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
-('bx_channels_view_profile', 3, 'bx_channels', '', '_bx_channels_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 0),
-('bx_channels_view_profile', 3, 'bx_channels', '', '_bx_channels_page_block_title_admins', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:6:\"admins\";}', 0, 0, 1, 1),
-('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
-('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 0);
+('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_search_results_by_hashtag', 0, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:24:\"search_result_by_hashtag\";}', 0, 0, 0, 0),
+('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
 
 -- PAGE: view closed profile 
 
@@ -49,8 +37,7 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 ('bx_channels_view_profile_closed', 'view-channel-profile-closed', '_bx_channels_page_title_sys_view_profile_closed', '_bx_channels_page_title_view_profile', 'bx_channels', 10, 2147483647, 1, 'page.php?i=view-channel-profile', '', '', '', 0, 1, 0, 'BxCnlPageEntry', 'modules/boonex/channels/classes/BxCnlPageEntry.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_channels_view_profile_closed', 2, 'bx_channels', '', '_bx_channels_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
-('bx_channels_view_profile_closed', 3, 'bx_channels', '', '_bx_channels_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 0);
+('bx_channels_view_profile_closed', 2, 'bx_channels', '', '_bx_channels_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0);
 
 -- PAGE: edit profile
 
@@ -93,14 +80,6 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_channels_profile_info', 1, 'bx_channels', '_bx_channels_page_block_title_system_profile_info', '_bx_channels_page_block_title_profile_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:16:\"entity_info_full\";}', 0, 0, 1, 1),
 ('bx_channels_profile_info', 1, 'bx_channels', '', '_bx_channels_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2);
 
--- PAGE: channel 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_channels_fans', 'channel-fans', '_bx_channels_page_title_sys_channel_fans', '_bx_channels_page_title_channel_fans', 'bx_channels', 5, 2147483647, 1, 'page.php?i=channel-fans', '', '', '', 0, 1, 0, 'BxCnlPageEntry', 'modules/boonex/channels/classes/BxCnlPageEntry.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_channels_fans', 1, 'bx_channels', '_bx_channels_page_block_title_system_fans', '_bx_channels_page_block_title_fans_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:10:"fans_table";}', 0, 0, 1, 1);
-
 -- PAGE: view entry comments
 INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_channels_profile_comments', '_bx_channels_page_title_sys_profile_comments', '_bx_channels_page_title_profile_comments', 'bx_channels', 5, 2147483647, 1, 'channel-profile-comments', '', '', '', '', 0, 1, 0, 'BxCnlPageEntry', 'modules/boonex/channels/classes/BxCnlPageEntry.php');
@@ -137,20 +116,11 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 
 -- 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_channels_administration', '_bx_channels_page_title_sys_manage_administration', '_bx_channels_page_title_manage', 'bx_channels', 5, 192, 1, 'channels-administration', 'page.php?i=channels-administration', '', '', '', 0, 1, 0, 'BxCnlPageBrowse', 'modules/boonex/channels/classes/BxCnlPageBrowse.php');
+('bx_channels_administration', '_bx_channels_page_title_sys_manage_administration', '_bx_channels_page_title_manage', 'bx_channels', 5, 128, 1, 'channels-administration', 'page.php?i=channels-administration', '', '', '', 0, 1, 0, 'BxCnlPageBrowse', 'modules/boonex/channels/classes/BxCnlPageBrowse.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_channels_administration', 1, 'bx_channels', '_bx_channels_page_block_title_system_manage_administration', '_bx_channels_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
 
--- PAGE: user's channels
-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_channels_joined', 'joined-channels', '_bx_channels_page_title_sys_joined_entries', '_bx_channels_page_title_joined_entries', 'bx_channels', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxCnlPageJoinedEntries', 'modules/boonex/channels/classes/BxCnlPageJoinedEntries.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_channels_joined', 1, 'bx_channels', '_bx_channels_page_block_title_sys_entries_actions', '_bx_channels_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
-('bx_channels_joined', 1, 'bx_channels', '_bx_channels_page_block_title_sys_entries_of_author', '_bx_channels_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:22:"browse_created_entries";}', 0, 0, 0, 2),
-('bx_channels_joined', 1, 'bx_channels', '_bx_channels_page_block_title_sys_favorites_of_author', '_bx_channels_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_channels";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 3),
-('bx_channels_joined', 1, 'bx_channels', '_bx_channels_page_block_title_sys_joined_entries', '_bx_channels_page_block_title_joined_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_channels";s:6:"method";s:21:"browse_joined_entries";s:6:"params";a:2:{i:0;i:0;i:1;b:1;}}', 0, 0, 1, 4);
 
 -- 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);
@@ -178,12 +148,6 @@ SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name`
 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_channels', 'channels-home', '_bx_channels_menu_item_title_system_entries_home', '_bx_channels_menu_item_title_entries_home', 'page.php?i=channels-home', '', '', 'hashtag col-red2', 'bx_channels_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
 
--- MENU: add to "add content" menu
-
-SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_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_content_links', 'bx_channels', 'create-channel-profile', '_bx_channels_menu_item_title_system_create_profile', '_bx_channels_menu_item_title_create_profile', 'page.php?i=create-channel-profile', '', '', 'hashtag col-red2', '', 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 
@@ -193,7 +157,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_channels_view_actions', 'bx_channels', '_bx_channels_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`, `editable`, `order`) VALUES 
-('bx_channels_view_actions', 'bx_channels', 'profile-fan-add', '_bx_channels_menu_item_title_system_become_fan', '{title_add_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_channels_fans\', \'add\', \'{profile_id}\')', '', 'user-plus', '', 0, 2147483647, 1, 0, 0, 5),
 ('bx_channels_view_actions', 'bx_channels', 'profile-subscribe-add', '_bx_channels_menu_item_title_system_subscribe', '_bx_channels_menu_item_title_subscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'add\', \'{profile_id}\')', '', 'check', '', 0, 2147483647, 1, 0, 1, 20),
 ('bx_channels_view_actions', 'bx_channels', 'profile-actions-more', '_bx_channels_menu_item_title_system_more_actions', '_bx_channels_menu_item_title_more_actions', 'javascript:void(0)', 'bx_menu_popup(''bx_channels_view_actions_more'', this, {}, {profile_id:{profile_id}});', '', 'cog', 'bx_channels_view_actions_more', 1, 2147483647, 1, 0, 1, 9999);
 
@@ -206,7 +169,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_channels_view_actions_more', 'bx_channels', '_bx_channels_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_channels_view_actions_more', 'bx_channels', 'profile-fan-remove', '_bx_channels_menu_item_title_system_leave_channel', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_channels_fans\', \'remove\', \'{profile_id}\')', '', 'user-times', '', 2147483647, 1, 0, 10),
 ('bx_channels_view_actions_more', 'bx_channels', 'profile-subscribe-remove', '_bx_channels_menu_item_title_system_unsubscribe', '_bx_channels_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
 ('bx_channels_view_actions_more', 'bx_channels', 'edit-channel-cover', '_bx_channels_menu_item_title_system_edit_cover', '_bx_channels_menu_item_title_edit_cover', 'page.php?i=edit-channel-cover&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
 ('bx_channels_view_actions_more', 'bx_channels', 'edit-channel-profile', '_bx_channels_menu_item_title_system_edit_profile', '_bx_channels_menu_item_title_edit_profile', 'page.php?i=edit-channel-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 0, 0, 40),
@@ -221,9 +183,6 @@ INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `templat
 INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
 ('bx_channels_my', 'bx_channels', '_bx_channels_menu_set_title_entries_my', 0);
 
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_channels_my', 'bx_channels', 'create-channel-profile', '_bx_channels_menu_item_title_system_create_profile', '_bx_channels_menu_item_title_create_profile', 'page.php?i=create-channel-profile', '', '', 'plus', '', 2147483647, 1, 0, 0);
-
 -- 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 
@@ -249,9 +208,7 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 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_channels_view_submenu', 'bx_channels', 'view-channel-profile', '_bx_channels_menu_item_title_system_view_profile_view', '_bx_channels_menu_item_title_view_profile_view', 'page.php?i=view-channel-profile&id={content_id}', '', '', 'hashtag col-red2', '', 2147483647, 1, 0, 1),
 ('bx_channels_view_submenu', 'bx_channels', 'channel-profile-info', '_bx_channels_menu_item_title_system_view_profile_info', '_bx_channels_menu_item_title_view_profile_info', 'page.php?i=channel-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
-('bx_channels_view_submenu', 'bx_channels', 'channel-profile-comments', '_bx_channels_menu_item_title_system_view_profile_comments', '_bx_channels_menu_item_title_view_profile_comments', 'page.php?i=channel-profile-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 3),
-('bx_channels_view_submenu', 'bx_channels', 'channel-fans', '_bx_channels_menu_item_title_system_view_fans', '_bx_channels_menu_item_title_view_fans', 'page.php?i=channel-fans&profile_id={profile_id}', '', '', 'hashtag col-blue3', '', 2147483647, 1, 0, 4);
-
+('bx_channels_view_submenu', 'bx_channels', 'channel-profile-comments', '_bx_channels_menu_item_title_system_view_profile_comments', '_bx_channels_menu_item_title_view_profile_comments', 'page.php?i=channel-profile-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 3);
 -- MENU: custom menu for snippet meta info
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_channels_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_channels_snippet_meta', 'bx_channels', 15, 0, 1, 'BxCnlMenuSnippetMeta', 'modules/boonex/channels/classes/BxCnlMenuSnippetMeta.php');
@@ -260,16 +217,14 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_channels_snippet_meta', 'bx_channels', '_sys_menu_set_title_snippet_meta', 0);
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
-('bx_channels_snippet_meta', 'bx_channels', 'join', '_sys_menu_item_title_system_sm_join', '_sys_menu_item_title_sm_join', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
-('bx_channels_snippet_meta', 'bx_channels', 'leave', '_sys_menu_item_title_system_sm_leave', '_sys_menu_item_title_sm_leave', '', '', '', '', '', 2147483647, 0, 0, 1, 2),
-('bx_channels_snippet_meta', 'bx_channels', 'subscribe', '_sys_menu_item_title_system_sm_subscribe', '_sys_menu_item_title_sm_subscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
-('bx_channels_snippet_meta', 'bx_channels', 'unsubscribe', '_sys_menu_item_title_system_sm_unsubscribe', '_sys_menu_item_title_sm_unsubscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
-('bx_channels_snippet_meta', 'bx_channels', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
-('bx_channels_snippet_meta', 'bx_channels', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 6),
-('bx_channels_snippet_meta', 'bx_channels', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 7),
-('bx_channels_snippet_meta', 'bx_channels', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 8),
-('bx_channels_snippet_meta', 'bx_channels', 'members', '_sys_menu_item_title_system_sm_members', '_sys_menu_item_title_sm_members', '', '', '', '', '', 2147483647, 1, 0, 1, 9),
-('bx_channels_snippet_meta', 'bx_channels', 'subscribers', '_sys_menu_item_title_system_sm_subscribers', '_sys_menu_item_title_sm_subscribers', '', '', '', '', '', 2147483647, 0, 0, 1, 10);
+('bx_channels_snippet_meta', 'bx_channels', 'subscribe', '_sys_menu_item_title_system_sm_subscribe', '_sys_menu_item_title_sm_subscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 1),
+('bx_channels_snippet_meta', 'bx_channels', 'unsubscribe', '_sys_menu_item_title_system_sm_unsubscribe', '_sys_menu_item_title_sm_unsubscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 2),
+('bx_channels_snippet_meta', 'bx_channels', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
+('bx_channels_snippet_meta', 'bx_channels', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_channels_snippet_meta', 'bx_channels', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_channels_snippet_meta', 'bx_channels', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 6),
+('bx_channels_snippet_meta', 'bx_channels', 'members', '_sys_menu_item_title_system_sm_members', '_sys_menu_item_title_sm_members', '', '', '', '', '', 2147483647, 1, 0, 1, 7),
+('bx_channels_snippet_meta', 'bx_channels', 'subscribers', '_sys_menu_item_title_system_sm_subscribers', '_sys_menu_item_title_sm_subscribers', '', '', '', '', '', 2147483647, 0, 0, 1, 8);
 
 -- 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 
@@ -285,12 +240,8 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- 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_channels', 'channels-administration', '_bx_channels_menu_item_title_system_admt_channels', '_bx_channels_menu_item_title_admt_channels', 'page.php?i=channels-administration', '', '_self', '', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
--- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+('sys_account_dashboard_manage_tools', 'bx_channels', 'channels-administration', '_bx_channels_menu_item_title_system_admt_channels', '_bx_channels_menu_item_title_admt_channels', 'page.php?i=channels-administration', '', '_self', '', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 128, 1, 0, @iManageMenuOrder + 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 
-('trigger_profile_view_submenu', 'bx_channels', 'joined-channels', '_bx_channels_menu_item_title_system_view_joined_channels', '_bx_channels_menu_item_title_view_joined_channels', 'page.php?i=joined-channels&profile_id={profile_id}', '', '', 'hashtag col-red2', '', 2147483647, 1, 0, 0);
 
 -- ACL
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
@@ -391,9 +342,6 @@ SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
 INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
 ('bx_channels', '_bx_channels', @iSearchOrder + 1, 'BxCnlSearchResult', 'modules/boonex/channels/classes/BxCnlSearchResult.php');
 
--- CONNECTIONS
-INSERT INTO `sys_objects_connection` (`object`, `table`, `type`, `override_class_name`, `override_class_file`) VALUES
-('bx_channels_fans', 'bx_cnl_fans', 'mutual', '', '');
 
 -- STATS
 SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
@@ -406,47 +354,23 @@ INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `f
 ('bx_channels_growth', '_bx_channels_chart_growth', 'bx_cnl_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_channels'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
 ('bx_channels_growth_speed', '_bx_channels_chart_growth_speed', 'bx_cnl_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_channels'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
 
--- 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_channels_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, 'BxCnlGridConnections', 'modules/boonex/channels/classes/BxCnlGridConnections.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
-('bx_channels_fans', 'name', '_sys_name', '50%', '', 10),
-('bx_channels_fans', 'actions', '', '50%', '', 20);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
-('bx_channels_fans', 'single', 'accept', '_sys_accept', '', 0, 10),
-('bx_channels_fans', 'single', 'to_admins', '_bx_channels_txt_to_admins', '', 0, 20),
-('bx_channels_fans', 'single', 'from_admins', '_bx_channels_txt_from_admins', '', 0, 30),
-('bx_channels_fans', 'single', 'delete', '', 'remove', 1, 40);
-
 -- 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`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-('bx_channels_administration', 'Sql', 'SELECT `td`.*, `td`.`channel_name` AS `name`, `ta`.`email` AS `account`, `td`.`added` AS `added_ts`, `tp`.`status` AS `status` FROM `bx_cnl_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_channels'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_cnl_data', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'channel_name', '', 'like', 'reports', '', 192, 'BxCnlGridAdministration', 'modules/boonex/channels/classes/BxCnlGridAdministration.php'),
-('bx_channels_common', 'Sql', 'SELECT `td`.*, `td`.`channel_name` AS `name`, `ta`.`email` AS `account`, `td`.`added` AS `added_ts`, `tp`.`status` AS `status` FROM `bx_cnl_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_channels'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_cnl_data', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'channel_name', '', 'like', '', '', 2147483647, 'BxCnlGridCommon', 'modules/boonex/channels/classes/BxCnlGridCommon.php');
+('bx_channels_administration', 'Sql', 'SELECT `td`.*, `td`.`channel_name` AS `name`, `ta`.`email` AS `account`, `td`.`added` AS `added_ts`, `tp`.`status` AS `status` FROM `bx_cnl_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_channels'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_cnl_data', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'channel_name', '', 'like', 'reports', '', 192, 'BxCnlGridAdministration', 'modules/boonex/channels/classes/BxCnlGridAdministration.php');
 
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
 ('bx_channels_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
 ('bx_channels_administration', 'switcher', '_bx_channels_grid_column_title_adm_active', '8%', 0, '', '', 2),
 ('bx_channels_administration', 'reports', '_sys_txt_reports_title', '5%', 0, '', '', 3),
-('bx_channels_administration', 'name', '_bx_channels_grid_column_title_adm_name', '25%', 0, '', '', 4),
+('bx_channels_administration', 'name', '_bx_channels_grid_column_title_adm_name', '45%', 0, '', '', 4),
 ('bx_channels_administration', 'added_ts', '_bx_channels_grid_column_title_adm_added', '20%', 1, '25', '', 5),
-('bx_channels_administration', 'account', '_bx_channels_grid_column_title_adm_account', '20%', 0, '25', '', 6),
-('bx_channels_administration', 'actions', '', '20%', 0, '', '', 7),
-('bx_channels_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_channels_common', 'name', '_bx_channels_grid_column_title_adm_name', '48%', 0, '', '', 2),
-('bx_channels_common', 'added_ts', '_bx_channels_grid_column_title_adm_added', '30%', 1, '25', '', 3),
-('bx_channels_common', 'actions', '', '20%', 0, '', '', 4);
+('bx_channels_administration', 'actions', '', '20%', 0, '', '', 6);
 
 INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
 ('bx_channels_administration', 'bulk', 'delete', '_bx_channels_grid_action_title_adm_delete', '', 0, 1, 2),
 ('bx_channels_administration', 'bulk', 'delete_with_content', '_bx_channels_grid_action_title_adm_delete_with_content', '', 0, 1, 3),
-('bx_channels_administration', 'single', 'settings', '_bx_channels_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_channels_common', 'bulk', 'delete', '_bx_channels_grid_action_title_adm_delete', '', 0, 1, 1),
-('bx_channels_common', 'bulk', 'delete_with_content', '_bx_channels_grid_action_title_adm_delete_with_content', '', 0, 1, 2),
-('bx_channels_common', 'single', 'settings', '_bx_channels_grid_action_title_adm_more_actions', 'cog', 1, 0, 1);
-
+('bx_channels_administration', 'single', 'settings', '_bx_channels_grid_action_title_adm_more_actions', 'cog', 1, 0, 2);
 
 -- ALERTS
 
@@ -458,13 +382,7 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('system', 'save_setting', @iHandler),
 ('bx_timeline', 'post_common', @iHandler),
 ('bx_channels_pics', 'file_deleted', @iHandler),
-('bx_channels_fans', 'connection_added', @iHandler),
-('bx_channels_fans', 'connection_removed', @iHandler),
 ('profile', 'delete', @iHandler),
-('bx_channels', 'fan_added', @iHandler),
-('bx_channels', 'join_invitation', @iHandler),
-('bx_channels', 'join_request', @iHandler),
-('bx_channels', 'join_request_accepted', @iHandler),
 ('bx_channels', 'timeline_view', @iHandler),
 ('bx_channels', 'timeline_post', @iHandler),
 ('bx_channels', 'timeline_delete', @iHandler),
@@ -472,7 +390,9 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_channels', 'timeline_vote', @iHandler),
 ('bx_channels', 'timeline_report', @iHandler),
 ('bx_channels', 'timeline_repost', @iHandler),
-('meta_keyword', 'added', @iHandler);
+('meta_keyword', 'added', @iHandler),
+('meta_keyword', 'add_url', @iHandler),
+('meta_keyword', 'deleted', @iHandler);
 
 
 -- PRIVACY 
@@ -481,16 +401,6 @@ INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `defau
 ('bx_channels_allow_view_to', 'bx_channels', 'view', '_bx_channels_form_profile_input_allow_view_to', '3', '', 'bx_cnl_data', 'id', 'author', 'BxCnlPrivacy', 'modules/boonex/channels/classes/BxCnlPrivacy.php'),
 ('bx_channels_allow_view_notification_to', 'bx_channels', 'view_event', '_bx_channels_form_profile_input_allow_view_notification_to', '3', '', 'bx_notifications_events', 'id', 'object_owner_id', 'BxCnlPrivacyNotifications', 'modules/boonex/channels/classes/BxCnlPrivacyNotifications.php');
 
--- EMAIL TEMPLATES
-
-INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
-('bx_channels', '_bx_channels_email_join_request', 'bx_channels_join_request', '_bx_channels_email_join_request_subject', '_bx_channels_email_join_request_body'),
-('bx_channels', '_bx_channels_email_join_reject', 'bx_channels_join_reject', '_bx_channels_email_join_reject_subject', '_bx_channels_email_join_reject_body'),
-('bx_channels', '_bx_channels_email_join_confirm', 'bx_channels_join_confirm', '_bx_channels_email_join_confirm_subject', '_bx_channels_email_join_confirm_body'),
-('bx_channels', '_bx_channels_email_fan_remove', 'bx_channels_fan_remove', '_bx_channels_email_fan_remove_subject', '_bx_channels_email_fan_remove_body'),
-('bx_channels', '_bx_channels_email_fan_become_admin', 'bx_channels_fan_become_admin', '_bx_channels_email_fan_become_admin_subject', '_bx_channels_email_fan_become_admin_body'),
-('bx_channels', '_bx_channels_email_admin_become_fan', 'bx_channels_admin_become_fan', '_bx_channels_email_admin_become_fan_subject', '_bx_channels_email_admin_become_fan_body'),
-('bx_channels', '_bx_channels_email_invitation', 'bx_channels_invitation', '_bx_channels_email_invitation_subject', '_bx_channels_email_invitation_body');
 
 -- UPLOADERS
 

+ 11 - 27
modules/boonex/channels/install/sql/install.sql

@@ -19,13 +19,22 @@ CREATE TABLE IF NOT EXISTS `bx_cnl_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
-  `join_confirmation` tinyint(4) NOT NULL DEFAULT '1',
   `allow_view_to` varchar(255) DEFAULT '3',
   PRIMARY KEY (`id`),
   UNIQUE INDEX channel_name (`channel_name`),
   FULLTEXT KEY `search_fields` (`channel_name`)
 );
 
+-- TABLE: items
+CREATE TABLE IF NOT EXISTS `bx_cnl_content` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `content_id` int(11) NOT NULL,
+  `cnl_id` int(11) NOT NULL,
+  `author_id` int(11) NOT NULL,
+  `module_name` varchar(19) NOT NULL,
+  PRIMARY KEY (`id`)
+);
+
 -- TABLE: STORAGES & TRANSCODERS
 CREATE TABLE `bx_cnl_pics` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -140,26 +149,6 @@ CREATE TABLE `bx_cnl_meta_mentions` (
   KEY `profile_id` (`profile_id`)
 );
 
--- TABLE: fans
-CREATE TABLE IF NOT EXISTS `bx_cnl_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`)
-);
-
--- TABLE: admins
-CREATE TABLE IF NOT EXISTS `bx_cnl_admins` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `group_profile_id` int(10) unsigned NOT NULL,
-  `fan_id` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `admin` (`group_profile_id`,`fan_id`)
-);
 
 -- TABLE: favorites
 CREATE TABLE `bx_cnl_favorites_track` (
@@ -230,7 +219,6 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_channel', 'bx_channels', 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_bx_channels_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_channel', 'bx_channels', 'channel_name', '', '', 0, 'text', '_bx_channels_form_profile_input_sys_channel_name', '_bx_channels_form_profile_input_channel_name', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_channels_form_profile_input_channel_name_err', 'Xss', '', 1, 0),
 ('bx_channel', 'bx_channels', 'initial_members', '', '', 0, 'custom', '_bx_channels_form_profile_input_sys_initial_members', '_bx_channels_form_profile_input_initial_members', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 1),
-('bx_channel', 'bx_channels', 'join_confirmation', 1, '', 1, 'switcher', '_bx_channels_form_profile_input_sys_join_confirm', '_bx_channels_form_profile_input_join_confirm', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_channel', 'bx_channels', 'cover', 'a:1:{i:0;s:22:"bx_channels_cover_crop";}', 'a:1:{s:22:"bx_channels_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_channels_form_profile_input_sys_cover', '_bx_channels_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_channel', 'bx_channels', 'picture', 'a:1:{i:0;s:24:"bx_channels_picture_crop";}', 'a:1:{s:24:"bx_channels_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_channels_form_profile_input_sys_picture', '_bx_channels_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_channels_form_profile_input_picture_err', '', '', 1, 0);
 
@@ -240,7 +228,6 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_channel_add', 'initial_members', 2147483647, 1, 5),
 ('bx_channel_add', 'picture', 2147483647, 1, 6),
 ('bx_channel_add', 'channel_name', 2147483647, 1, 7),
-('bx_channel_add', 'join_confirmation', 2147483647, 1, 8),
 ('bx_channel_add', 'do_submit', 2147483647, 1, 9),
 
 ('bx_channel_invite', 'initial_members', 2147483647, 1, 1),
@@ -256,10 +243,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_channel_edit', 'cover', 2147483647, 0, 3),
 ('bx_channel_edit', 'picture', 2147483647, 1, 4),
 ('bx_channel_edit', 'channel_name', 2147483647, 1, 5),
-('bx_channel_edit', 'join_confirmation', 2147483647, 1, 6),
 ('bx_channel_edit', 'do_submit', 2147483647, 1, 7),
 
-('bx_channel_edit_cover', 'join_confirmation', 2147483647, 0, 0),
 ('bx_channel_edit_cover', 'delete_confirm', 2147483647, 0, 1),
 ('bx_channel_edit_cover', 'channel_name', 2147483647, 0, 2),
 ('bx_channel_edit_cover', 'picture', 2147483647, 0, 3),
@@ -281,8 +266,7 @@ INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_ac
 ('bx_channels_cmts', '_bx_channels_cmts', 'bx_channels', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
 
 INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
-('bx_channels', 'bx_channels_administration', 'td`.`id', '', ''),
-('bx_channels', 'bx_channels_common', 'td`.`id', '', '');
+('bx_channels', 'bx_channels_administration', 'td`.`id', '', '');
 
 -- SEARCH EXTENDED
 INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES

+ 1 - 1
modules/boonex/channels/install/sql/uninstall.sql

@@ -1,7 +1,7 @@
 
 -- TABLES
 
-DROP TABLE IF EXISTS `bx_cnl_data`, `bx_cnl_pics`, `bx_cnl_pics_resized`, `bx_cnl_cmts`, `bx_cnl_views_track`, `bx_cnl_meta_keywords`, `bx_cnl_meta_mentions`, `bx_cnl_fans`, `bx_cnl_admins`, `bx_cnl_votes`, `bx_cnl_votes_track`, `bx_cnl_reports`, `bx_cnl_reports_track`, `bx_cnl_favorites_track`, `bx_cnl_scores`, `bx_cnl_scores_track`;
+DROP TABLE IF EXISTS `bx_cnl_data`, `bx_cnl_content`, `bx_cnl_pics`, `bx_cnl_pics_resized`, `bx_cnl_cmts`, `bx_cnl_views_track`, `bx_cnl_meta_keywords`, `bx_cnl_meta_mentions`, `bx_cnl_votes`, `bx_cnl_votes_track`, `bx_cnl_reports`, `bx_cnl_reports_track`, `bx_cnl_favorites_track`, `bx_cnl_scores`, `bx_cnl_scores_track`;
 
 -- PROFILES