RomanL 8 سال پیش
والد
کامیت
e36fe01820

+ 25 - 9
modules/boonex/anon_follow/classes/BxAnonFollowGridSubscribedMe.php

@@ -22,7 +22,7 @@ class BxAnonFollowGridSubscribedMe extends BxDolGridSubscribedMe
         $CNF = $this->_oModule->_oConfig->CNF;
         $CNF = $this->_oModule->_oConfig->CNF;
         
         
         $this->addMarkers(array(
         $this->addMarkers(array(
-            'join_connections2' => 'INNER JOIN `' . $CNF['TABLE_ENTRIES'] . '` AS `c2` ON `c`.`' . $CNF['FIELD_INITIATOR'] . '` = `c2`.`' . $CNF['FIELD_INITIATOR'] . '` AND `c`.`' . $CNF['FIELD_CONTENT'] . '` = `c2`.`' . $CNF['FIELD_CONTENT'] . '` '
+            'join_connections2' => 'LEFT JOIN `' . $CNF['TABLE_ENTRIES'] . '` AS `c2` ON `c`.`' . $CNF['FIELD_INITIATOR'] . '` = `c2`.`' . $CNF['FIELD_INITIATOR'] . '` AND `c`.`' . $CNF['FIELD_CONTENT'] . '` = `c2`.`' . $CNF['FIELD_CONTENT'] . '` '
         ));
         ));
     }
     }
     
     
@@ -40,10 +40,9 @@ class BxAnonFollowGridSubscribedMe extends BxDolGridSubscribedMe
         $sTitle = '';
         $sTitle = '';
         foreach($aShowFields as $aField){
         foreach($aShowFields as $aField){
             $sValue = "";
             $sValue = "";
-            if (isset($aProfileData[$aField]))
-            {
+            if (isset($aProfileData[$aField])){
                 if (isset($aFields[$aField]) && $aFields[$aField]['type'] == 'select' && substr_count($aFields[$aField]['values'], '#!')){
                 if (isset($aFields[$aField]) && $aFields[$aField]['type'] == 'select' && substr_count($aFields[$aField]['values'], '#!')){
-                    $aValuesList = BxDolForm::getDataItems(str_replace('#!', '', 'mylist'));
+                    $aValuesList = BxDolForm::getDataItems(str_replace('#!', '', $aFields[$aField]['values']));
                     if (isset($aValuesList[$aProfileData[$aField]])){
                     if (isset($aValuesList[$aProfileData[$aField]])){
                         $sValue = $aValuesList[$aProfileData[$aField]];
                         $sValue = $aValuesList[$aProfileData[$aField]];
                     }
                     }
@@ -56,16 +55,33 @@ class BxAnonFollowGridSubscribedMe extends BxDolGridSubscribedMe
                 $aTitle[] = $sValue;
                 $aTitle[] = $sValue;
         }
         }
         $sTitle = implode(getParam('bx_anon_follow_fields_separator'), $aTitle);
         $sTitle = implode(getParam('bx_anon_follow_fields_separator'), $aTitle);
-        if ($sTitle == '')
-        {
-            $sTitle = _t('_bx_anon_follow_txt_grid_title_default');
+        if ($aRow['anonimus'] == ''){
+            $sTitle = $this->_oModule->_oTemplate->parseHtmlByName('profile_link.html', array('href' => $oProfile->getUrl(), 'content' =>  $oProfile->getDisplayName() . getParam('bx_anon_follow_fields_separator') . $sTitle)); 
+        } 
+        else{
+            $sTitle = _t('_bx_anon_follow_txt_grid_title_default') . $sTitle;
         }
         }
+        
         return parent::_getCellDefault($sTitle, $sKey, $aField, $aRow);
         return parent::_getCellDefault($sTitle, $sKey, $aField, $aRow);
     }
     }
     
     
-    protected function _getCellActions($mixedValue, $sKey, $aField, $aRow)
+    protected function _getActionSubscribe ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
+    {
+        $iViewerId = bx_get_logged_profile_id();
+        if(!isLogged() || $iViewerId == $aRow['id'] || $this->_oConnection->isConnected($iViewerId, $aRow['id']) || $aRow['anonimus'] != '')
+            return '';
+
+        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
+    }
+    
+    protected function _getRowHead ()
+    {
+        return "";
+    }
+    
+    protected function _getFilterControls ()
     {
     {
-        return parent::_getCellDefault('', $sKey, $aField, $aRow);
+        return "";
     }
     }
 }
 }
 
 

+ 89 - 0
modules/boonex/anon_follow/classes/BxAnonFollowGridSubscriptions.php

@@ -0,0 +1,89 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    AnonymousFollow Anonymous Follow
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxAnonFollowGridSubscriptions extends BxDolGridSubscriptions
+{
+    protected $MODULE;
+    protected $_oModule;
+    
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_anon_follow';
+        $this->_oModule = BxDolModule::getInstance($this->MODULE);
+        parent::__construct ($aOptions, $oTemplate);
+        $CNF = $this->_oModule->_oConfig->CNF;
+        
+        $this->addMarkers(array(
+            'join_connections2' => 'LEFT JOIN `' . $CNF['TABLE_ENTRIES'] . '` AS `c2` ON `c`.`' . $CNF['FIELD_INITIATOR'] . '` = `c2`.`' . $CNF['FIELD_INITIATOR'] . '` AND `c`.`' . $CNF['FIELD_CONTENT'] . '` = `c2`.`' . $CNF['FIELD_CONTENT'] . '` '
+        ));
+    }
+    
+    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
+    {
+        $mixedValue = strip_tags(htmlspecialchars_decode($mixedValue));
+        $aTitle = array();
+        $oProfile = BxDolProfile::getInstance($aRow['id']);
+        $aProfile = $oProfile->getInfo();
+        $oModule = BxDolModule::getInstance($aProfile['type']);
+        $aFields = $oModule->serviceGetSearchableFieldsExtended();
+        $aProfileData = $oModule->serviceGetContentInfoById($aProfile['content_id']);
+        $sShowFields = $aProfile['type'] == 'bx_persons' ? getParam('bx_anon_follow_persons_fields') : getParam('bx_anon_follow_orgs_fields');
+        $aShowFields = explode(',', $sShowFields);
+        $sTitle = '';
+        foreach($aShowFields as $aField){
+            $sValue = "";
+            if (isset($aProfileData[$aField])){
+                if (isset($aFields[$aField]) && $aFields[$aField]['type'] == 'select' && substr_count($aFields[$aField]['values'], '#!')){
+                    $aValuesList = BxDolForm::getDataItems(str_replace('#!', '', $aFields[$aField]['values']));
+                    if (isset($aValuesList[$aProfileData[$aField]])){
+                        $sValue = $aValuesList[$aProfileData[$aField]];
+                    }
+                }
+                else{
+                    $sValue = $aProfileData[$aField];
+                }
+            }
+            if (trim($sValue) != '')
+                $aTitle[] = $sValue;
+        }
+        $sTitle = implode(getParam('bx_anon_follow_fields_separator'), $aTitle);
+        if ($aRow['anonimus'] == ''){
+            $sTitle = $this->_oModule->_oTemplate->parseHtmlByName('profile_link.html', array('href' => $oProfile->getUrl(), 'content' => $oProfile->getDisplayName() . getParam('bx_anon_follow_fields_separator') . $sTitle)); 
+        } 
+        else{
+            $sTitle = _t('_bx_anon_follow_txt_grid_title_default') . $sTitle;
+        }
+        
+        return parent::_getCellDefault($sTitle, $sKey, $aField, $aRow);
+    }
+    
+    protected function _getActionSubscribe ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
+    {
+        $iViewerId = bx_get_logged_profile_id();
+        if(!isLogged() || $iViewerId == $aRow['id'] || $this->_oConnection->isConnected($iViewerId, $aRow['id']) || $aRow['anonimus'] != '')
+            return '';
+
+        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
+    }
+    
+    protected function _getRowHead ()
+    {
+        return "";
+    }
+    
+    protected function _getFilterControls ()
+    {
+        return "";
+    }
+    
+}
+
+/** @} */

+ 64 - 14
modules/boonex/anon_follow/classes/BxAnonFollowModule.php

@@ -22,7 +22,7 @@ class BxAnonFollowModule extends BxDolModule
     
     
     /**
     /**
      * @page service Service Calls
      * @page service Service Calls
-     * @section bx_anon_follow Mass mailer
+     * @section bx_anon_follow Anonymous Follow
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsubsection bx_anon_follow-get_profile_fields get_profile_fields
      * @subsubsection bx_anon_follow-get_profile_fields get_profile_fields
      * 
      * 
@@ -42,7 +42,7 @@ class BxAnonFollowModule extends BxDolModule
     {
     {
         $aResult = array();
         $aResult = array();
         $oModule = BxDolModule::getInstance($sModule);
         $oModule = BxDolModule::getInstance($sModule);
-        $aFields = $oModule->serviceGetSearchableFieldsExtended();
+        $aFields = BxDolRequest::serviceExists($sModule, 'get_searchable_fields_extended') ? BxDolService::call($sModule, 'get_searchable_fields_extended') : array();
         foreach($aFields as $sKey => $aField){
         foreach($aFields as $sKey => $aField){
             if ($aField['type'] == 'text' || $aField['type'] == 'select')
             if ($aField['type'] == 'text' || $aField['type'] == 'select')
             $aResult[$sKey] = _t($aField['caption']);
             $aResult[$sKey] = _t($aField['caption']);
@@ -52,7 +52,7 @@ class BxAnonFollowModule extends BxDolModule
     
     
     /**
     /**
      * @page service Service Calls
      * @page service Service Calls
-     * @section bx_anon_follow Mass mailer
+     * @section bx_anon_follow Anonymous Follow
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsubsection bx_anon_follow-check_is_subscribed check_is_subscribed
      * @subsubsection bx_anon_follow-check_is_subscribed check_is_subscribed
      * 
      * 
@@ -78,7 +78,7 @@ class BxAnonFollowModule extends BxDolModule
     
     
     /**
     /**
      * @page service Service Calls
      * @page service Service Calls
-     * @section bx_anon_follow Mass mailer
+     * @section bx_anon_follow Anonymous Follow
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsubsection bx_anon_follow-subscribed_me_table subscribed_me_table
      * @subsubsection bx_anon_follow-subscribed_me_table subscribed_me_table
      * 
      * 
@@ -89,25 +89,71 @@ class BxAnonFollowModule extends BxDolModule
      * @param $aParams an array with search params.
      * @param $aParams an array with search params.
      * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
      * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
      * 
      * 
-     * @see BxAnonFollowModule::SubscribedMeTable
+     * @see BxAnonFollowModule::serviceSubscribedMeTable
      */
      */
     /** 
     /** 
      * @ref bx_anon_follow-subscribed_me_table "subscribed_me_table"
      * @ref bx_anon_follow-subscribed_me_table "subscribed_me_table"
      */
      */
     public function serviceSubscribedMeTable ($iProfileId = 0)
     public function serviceSubscribedMeTable ($iProfileId = 0)
     {
     {
+       
         if(!$iProfileId && bx_get('profile_id') !== false)
         if(!$iProfileId && bx_get('profile_id') !== false)
             $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
             $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
 
 
         $aProfile = BxDolProfile::getInstance($iProfileId)->getInfo();
         $aProfile = BxDolProfile::getInstance($iProfileId)->getInfo();
+       
         if(empty($aProfile) || !is_array($aProfile))
         if(empty($aProfile) || !is_array($aProfile))
             return false;
             return false;
 
 
-        $CNF = &BxDolModule::getInstance($aProfile['type'])->_oConfig->CNF;
-        if(getParam($CNF['PARAM_PUBLIC_SBSD']) != 'on' && $aProfile['id'] != bx_get_logged_profile_id())
+        $oGrid = BxDolGrid::getObjectInstance('bx_anon_follow_grid_subscribed_me');
+
+        if(!$oGrid)
+            return false;
+       
+        $oGrid->setProfileId($iProfileId);
+        $sContent = $oGrid->getCode();
+        if(empty($sContent))
             return false;
             return false;
 
 
-        $oGrid = BxDolGrid::getObjectInstance('bx_anon_follow_subscribed_me');
+        
+        $iCount = BxDolService::call('system', 'get_connected_initiators_num', array('sys_profiles_subscriptions', $aProfile['id']), 'TemplServiceConnections');
+        return $this->_oTemplate->parseHtmlByName('connections_list.html', array(
+            'name' => 'subscribers',
+            'content' => $sContent,
+            'count_info' => _t('_bx_anon_follow_txt_followers_count_info', $iCount),
+        ));
+    }
+    
+    /**
+     * @page service Service Calls
+     * @section bx_anon_follow Anonymous Follow
+     * @subsection bx_anon_follow-page_blocks Page Blocks
+     * @subsubsection bx_anon_follow-subscriptions_table subscriptions_table
+     * 
+     * @code bx_srv('bx_anon_follow', 'subscriptions_table', [...]); @endcode
+     * 
+     * Get grid with subscriptions list
+     *
+     * @param $aParams an array with search params.
+     * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxAnonFollowModule::serviceSubscriptionsTable
+     */
+    /** 
+     * @ref bx_anon_follow-subscriptions_table "subscriptions_table"
+     */
+    public function serviceSubscriptionsTable ($iProfileId = 0)
+    {
+        
+        if(!$iProfileId && bx_get('profile_id') !== false)
+            $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+        $aProfile = BxDolProfile::getInstance($iProfileId)->getInfo();
+        
+        if(empty($aProfile) || !is_array($aProfile))
+            return false;
+
+        $oGrid = BxDolGrid::getObjectInstance('bx_anon_follow_grid_subscriptions');
 
 
         if(!$oGrid)
         if(!$oGrid)
             return false;
             return false;
@@ -117,15 +163,18 @@ class BxAnonFollowModule extends BxDolModule
         if(empty($sContent))
         if(empty($sContent))
             return false;
             return false;
 
 
+        
+        $iCount = BxDolService::call('system', 'get_connected_content_num', array('sys_profiles_subscriptions', $aProfile['id']), 'TemplServiceConnections');
         return $this->_oTemplate->parseHtmlByName('connections_list.html', array(
         return $this->_oTemplate->parseHtmlByName('connections_list.html', array(
             'name' => 'subscribers',
             'name' => 'subscribers',
-            'content' => $sContent
+            'content' => $sContent,
+            'count_info' => _t('_bx_anon_follow_txt_following_count_info', $iCount),
         ));
         ));
     }
     }
     
     
     /**
     /**
      * @page service Service Calls
      * @page service Service Calls
-     * @section bx_anon_follow Mass mailer
+     * @section bx_anon_follow Anonymous Follow
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsection bx_anon_follow-page_blocks Page Blocks
      * @subsubsection bx_anon_follow-include_js include_js
      * @subsubsection bx_anon_follow-include_js include_js
      * 
      * 
@@ -149,15 +198,16 @@ class BxAnonFollowModule extends BxDolModule
     
     
     public function checkIsSubscribed($iProfileId)
     public function checkIsSubscribed($iProfileId)
     {
     {
-        $bRv = false;
         $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
         $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
         if(!$oConnection){
         if(!$oConnection){
-            $bRv = false;
+            return false;
+        }
+		if($iProfileId == bx_get_logged_profile_id()){
+            return true;
         }
         }
         if($oConnection->isConnected(bx_get_logged_profile_id(), $iProfileId)){
         if($oConnection->isConnected(bx_get_logged_profile_id(), $iProfileId)){
-            $bRv = true;
+            return true;
         }
         }
-        return $bRv;
     }
     }
 }
 }
 
 

+ 5 - 1
modules/boonex/anon_follow/install/langs/en.xml

@@ -3,6 +3,8 @@
 	<string name="_bx_anon_follow"><![CDATA[Anonymous Follow]]></string>
 	<string name="_bx_anon_follow"><![CDATA[Anonymous Follow]]></string>
   <string name="_bx_anon_follow_page_block_title_sys_anon_follow"><![CDATA[Followers]]></string>
   <string name="_bx_anon_follow_page_block_title_sys_anon_follow"><![CDATA[Followers]]></string>
   <string name="_bx_anon_follow_page_block_title_anon_follow"><![CDATA[Followers]]></string>
   <string name="_bx_anon_follow_page_block_title_anon_follow"><![CDATA[Followers]]></string>
+   <string name="_bx_anon_follow_page_block_title_sys_anon_follow_subscriptions"><![CDATA[Following]]></string>
+  <string name="_bx_anon_follow_page_block_title_anon_follow_subscriptions"><![CDATA[Following]]></string>
   <string name="_bx_anon_follow_menu_item_title_system_follow"><![CDATA[Follow anonymously]]></string>
   <string name="_bx_anon_follow_menu_item_title_system_follow"><![CDATA[Follow anonymously]]></string>
   <string name="_bx_anon_follow_menu_item_title_follow"><![CDATA[Follow anonymously]]></string>
   <string name="_bx_anon_follow_menu_item_title_follow"><![CDATA[Follow anonymously]]></string>
   <string name="_bx_anon_follow_persons_fields"><![CDATA[Persons filelds]]></string>
   <string name="_bx_anon_follow_persons_fields"><![CDATA[Persons filelds]]></string>
@@ -10,5 +12,7 @@
   <string name="_bx_anon_follow_fields_separator"><![CDATA[Filelds separator]]></string>
   <string name="_bx_anon_follow_fields_separator"><![CDATA[Filelds separator]]></string>
   
   
   <string name="_bx_anon_follow_txt_button"><![CDATA[Follow anonimus]]></string>
   <string name="_bx_anon_follow_txt_button"><![CDATA[Follow anonimus]]></string>
-  <string name="_bx_anon_follow_txt_grid_title_default"><![CDATA[Follow anonimus]]></string>
+  <string name="_bx_anon_follow_txt_grid_title_default"><![CDATA[Anonimus ]]></string>
+  <string name="_bx_anon_follow_txt_followers_count_info"><![CDATA[Followers count - {0}]]></string>
+  <string name="_bx_anon_follow_txt_following_count_info"><![CDATA[Following count - {0}]]></string>
 </resources>
 </resources>

+ 3 - 3
modules/boonex/anon_follow/install/sql/disable.sql

@@ -14,9 +14,9 @@ DELETE FROM `sys_pages_blocks` WHERE `module` = @sName;
 DELETE FROM `sys_menu_items` WHERE `module` = @sName;
 DELETE FROM `sys_menu_items` WHERE `module` = @sName;
 
 
 -- GRIDS
 -- GRIDS
-DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_anon_follow_subscribed_me');
-DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_anon_follow_subscribed_me');
-DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_anon_follow_subscribed_me');
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_anon_follow_grid_subscribed_me', 'bx_anon_follow_grid_subscriptions');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_anon_follow_grid_subscribed_me', 'bx_anon_follow_grid_subscriptions');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_anon_follow_grid_subscribed_me', 'bx_anon_follow_grid_subscriptions');
 
 
 -- INJECTION
 -- INJECTION
 DELETE FROM `sys_injections` WHERE `name`= @sName;
 DELETE FROM `sys_injections` WHERE `name`= @sName;

+ 12 - 5
modules/boonex/anon_follow/install/sql/enable.sql

@@ -18,7 +18,8 @@ INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `e
 
 
 -- PAGES
 -- PAGES
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
-('', 2, @sName, '_bx_anon_follow_page_block_title_sys_anon_follow', '_bx_anon_follow_page_block_title_anon_follow', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:14:"bx_anon_follow";s:6:"method";s:19:"subscribed_me_table";}', 0, 1, 1, 0);
+('', 2, @sName, '_bx_anon_follow_page_block_title_sys_anon_follow', '_bx_anon_follow_page_block_title_anon_follow', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:14:"bx_anon_follow";s:6:"method";s:19:"subscribed_me_table";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}}', 0, 1, 1, 0),
+('', 2, @sName, '_bx_anon_follow_page_block_title_sys_anon_follow_subscriptions', '_bx_anon_follow_page_block_title_anon_follow_subscriptions', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:14:"bx_anon_follow";s:6:"method";s:19:"subscriptions_table";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}}', 0, 1, 1, 0);
 
 
 -- MENU: add menu item to profiles modules actions menu (trigger* menu sets are processed separately upon modules enable/disable)
 -- MENU: add menu item to profiles modules actions menu (trigger* menu sets are processed separately upon modules enable/disable)
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visibility_custom`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visibility_custom`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
@@ -27,14 +28,20 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 
 
 -- GRID: connections
 -- 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
 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_anon_follow_subscribed_me', 'Sql', 'SELECT `p`.`id`, `c`.`added` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections} {join_connections2}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxAnonFollowGridSubscribedMe', 'modules/boonex/anon_follow/classes/BxAnonFollowGridSubscribedMe.php');
+('bx_anon_follow_grid_subscribed_me', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c2`.`id` AS `anonimus` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections} {join_connections2}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxAnonFollowGridSubscribedMe', 'modules/boonex/anon_follow/classes/BxAnonFollowGridSubscribedMe.php'),
+('bx_anon_follow_grid_subscriptions', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c2`.`id` AS `anonimus` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections} {join_connections2}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxAnonFollowGridSubscriptions', 'modules/boonex/anon_follow/classes/BxAnonFollowGridSubscriptions.php');
 
 
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
-('bx_anon_follow_subscribed_me', 'name', '_sys_name', '70%', '', 1),
-('bx_anon_follow_subscribed_me', 'actions', '', '30%', '', 2);
+('bx_anon_follow_grid_subscribed_me', 'name', '_sys_name', '70%', '', 1),
+('bx_anon_follow_grid_subscribed_me', 'actions', '', '30%', '', 2),
+('bx_anon_follow_grid_subscriptions', 'name', '_sys_name', '70%', '', 1),
+('bx_anon_follow_grid_subscriptions', 'actions', '', '30%', '', 2);
+
 
 
 INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
 INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
-('bx_anon_follow_subscribed_me', 'single', 'subscribe', '_sys_subscribe', 'check', 0, 1);
+('bx_anon_follow_grid_subscribed_me', 'single', 'subscribe', '_sys_subscribe', 'check', 0, 1),
+('bx_anon_follow_grid_subscriptions', 'single', 'subscribe', '_sys_subscribe', 'check', 0, 1),
+('bx_anon_follow_grid_subscriptions', 'single', 'delete', '', 'remove', 1, 2);
 
 
 -- ALERTS
 -- ALERTS
 INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
 INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 

+ 2 - 1
modules/boonex/anon_follow/template/connections_list.html

@@ -1,2 +1,3 @@
 <a class="bx-anchor-invisible" name="__name__"></a>
 <a class="bx-anchor-invisible" name="__name__"></a>
-__content__
+<strong>__count_info__</strong><br>
+__content__

+ 1 - 0
modules/boonex/anon_follow/template/profile_link.html

@@ -0,0 +1 @@
+<a href="__href__"  target="_blank">__content__</a>