Răsfoiți Sursa

Ticket #3728 - Profiles: Add 'People you may know' block: Usage in Persons and Organizations.

AntonLV 4 ani în urmă
părinte
comite
347bfd6c63

+ 9 - 2
modules/boonex/organizations/classes/BxOrgsSearchResult.php

@@ -128,9 +128,16 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
                 }
                 break;
 
-			case 'acl':
+            case 'familiar':
+                if($this->_setFamiliarConnectionsConditions($aParams)) {
+                    $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_familiar');
+                    unset($this->aCurrent['rss']);
+                }
+                break;
+
+            case 'acl':
                 if ($this->_setAclConditions($aParams)) {
-					$this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
+                    $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
                     unset($this->aCurrent['rss']);
                 }
                 break;

+ 6 - 3
modules/boonex/organizations/install/langs/en.xml

@@ -140,6 +140,7 @@
 	<string name="_bx_orgs_page_title_browse_recent"><![CDATA[New Organizations]]></string>
 	<string name="_bx_orgs_page_title_browse_connections"><![CDATA[{0} connections]]></string>
 	<string name="_bx_orgs_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+        <string name="_bx_orgs_page_title_browse_familiar"><![CDATA[Organizations You May Know]]></string>
 	<string name="_bx_orgs_page_title_browse_favorites"><![CDATA[{0} favorites]]></string>
 	<string name="_bx_orgs_page_title_browse_by_acl"><![CDATA[{0} Organizations]]></string>
 	<string name="_bx_orgs_page_title_browse_by_cmts"><![CDATA[Organizations' Comments]]></string>
@@ -208,8 +209,8 @@
     <string name="_bx_orgs_page_block_title_fans_link"><![CDATA[Members of <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_orgs_page_block_title_fans"><![CDATA[Members]]></string>
     <string name="_bx_orgs_page_block_title_system_fans"><![CDATA[Members]]></string>
-	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Location]]></string>
-	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Location]]></string>
+    <string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>
     <string name="_bx_orgs_page_block_title_system_profile_subscribed_me"><![CDATA[Followers]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscribed_me"><![CDATA[Followers]]></string>
@@ -218,7 +219,7 @@
     <string name="_bx_orgs_page_block_title_system_profile_related_me"><![CDATA[Relationships with Me]]></string>
     <string name="_bx_orgs_page_block_title_profile_related_me"><![CDATA[Relationships with Me]]></string>
     <string name="_bx_orgs_page_block_title_profile_comments"><![CDATA[Comments]]></string>
-	<string name="_bx_orgs_page_block_title_entry_reports"><![CDATA[Reports]]></string>
+    <string name="_bx_orgs_page_block_title_entry_reports"><![CDATA[Reports]]></string>
     <string name="_bx_orgs_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
     <string name="_bx_orgs_page_block_title_profile_actions"><![CDATA[Actions]]></string>
     <string name="_bx_orgs_page_block_title_featured_profiles"><![CDATA[Featured Organizations]]></string>
@@ -231,6 +232,8 @@
     <string name="_bx_orgs_page_block_title_multicats"><![CDATA[Organizations Categories]]></string>
     <string name="_bx_orgs_page_block_title_active_profiles"><![CDATA[Active Organizations]]></string>
     <string name="_bx_orgs_page_block_title_online_profiles"><![CDATA[Online Organizations]]></string>
+    <string name="_bx_orgs_page_block_title_sys_familiar_profiles"><![CDATA[Familiar Organizations]]></string>
+    <string name="_bx_orgs_page_block_title_familiar_profiles"><![CDATA[Organizations You May Know]]></string>
     <string name="_bx_orgs_page_block_title_categories"><![CDATA[Organization categories]]></string>
     <string name="_bx_orgs_page_block_title_invite_to_organization"><![CDATA[Invite Members to the Organization]]></string>
     <string name="_bx_orgs_page_block_title_search_form"><![CDATA[Search Form]]></string>

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

@@ -258,7 +258,8 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_featured_entries_view_showcase', '_bx_orgs_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_recommended_entries_view_showcase', '_bx_orgs_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3),
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_entries_view_showcase', '_bx_orgs_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4),
-('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_profiles', '_bx_orgs_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5);
+('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_profiles', '_bx_orgs_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:12:\"unit_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_familiar_profiles', '_bx_orgs_page_block_title_familiar_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:24:\"browse_familiar_profiles\";s:6:\"params\";a:4:{s:10:\"connection\";s:20:\"sys_profiles_friends\";s:9:\"unit_view\";s:4:\"unit\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 6);
 
 -- MENU
 

+ 10 - 3
modules/boonex/persons/classes/BxPersonsSearchResult.php

@@ -93,9 +93,16 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
                 }
                 break;
 
-			case 'acl':
+            case 'familiar':
+                if($this->_setFamiliarConnectionsConditions($aParams)) {
+                    $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_familiar');
+                    unset($this->aCurrent['rss']);
+                }
+                break;
+
+            case 'acl':
                 if ($this->_setAclConditions($aParams)) {
-					$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
+                    $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
                     unset($this->aCurrent['rss']);
                 }
                 break;
@@ -139,7 +146,7 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
                 $this->sBrowseUrl = 'page.php?i=persons-active';
                 break;
 
-			case 'online':
+            case 'online':
                 $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
                 $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_online');
                 $this->aCurrent['restriction']['online']['value'] = time() - 60 * (int)getParam('sys_account_online_time');

+ 5 - 2
modules/boonex/persons/install/langs/en.xml

@@ -110,6 +110,7 @@
 	<string name="_bx_persons_page_title_browse_recent"><![CDATA[New People]]></string>
 	<string name="_bx_persons_page_title_browse_connections"><![CDATA[{0} connections]]></string>
 	<string name="_bx_persons_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+        <string name="_bx_persons_page_title_browse_familiar"><![CDATA[People You May Know]]></string>
 	<string name="_bx_persons_page_title_browse_favorites"><![CDATA[{0} favorites]]></string>
 	<string name="_bx_persons_page_title_browse_by_acl"><![CDATA[{0} People]]></string>
 	<string name="_bx_persons_page_title_browse_by_cmts"><![CDATA[People's Comments]]></string>
@@ -170,11 +171,11 @@
     <string name="_bx_persons_page_block_title_system_profile_related_me"><![CDATA[Relationships with Me]]></string>
     <string name="_bx_persons_page_block_title_profile_related_me"><![CDATA[Relationships with Me]]></string>
     <string name="_bx_persons_page_block_title_profile_comments"><![CDATA[Comments]]></string>
-	<string name="_bx_persons_page_block_title_entry_reports"><![CDATA[Reports]]></string>
+    <string name="_bx_persons_page_block_title_entry_reports"><![CDATA[Reports]]></string>
     <string name="_bx_persons_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
     <string name="_bx_persons_page_block_title_featured_profiles"><![CDATA[Featured People]]></string>
     <string name="_bx_persons_page_block_title_profile_actions"><![CDATA[Actions]]></string>
-	<string name="_bx_persons_page_block_title_profile_calendar"><![CDATA[Calendar]]></string>
+    <string name="_bx_persons_page_block_title_profile_calendar"><![CDATA[Calendar]]></string>
     <string name="_bx_persons_page_block_title_latest_profiles"><![CDATA[New People]]></string>
     <string name="_bx_persons_page_block_title_system_manage"><![CDATA[Manage Own People]]></string>
     <string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Manage All People]]></string>
@@ -182,6 +183,8 @@
     <string name="_bx_persons_page_block_title_sys_active_profiles"><![CDATA[Active People]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Active People]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Online People]]></string>
+    <string name="_bx_persons_page_block_title_sys_familiar_profiles"><![CDATA[Familiar People]]></string>
+    <string name="_bx_persons_page_block_title_familiar_profiles"><![CDATA[People You May Know]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Search Form]]></string>
     <string name="_bx_persons_page_block_title_search_results"><![CDATA[Search Results]]></string>
     <string name="_bx_persons_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>

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

@@ -200,7 +200,8 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_featured_entries_view_showcase', '_bx_persons_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 1),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_recommended_entries_view_showcase', '_bx_persons_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_entries_view_showcase', '_bx_persons_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3),
-('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_profiles', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4);
+('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_profiles', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:12:\"unit_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_familiar_profiles', '_bx_persons_page_block_title_familiar_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:24:\"browse_familiar_profiles\";s:6:\"params\";a:4:{s:10:\"connection\";s:20:\"sys_profiles_friends\";s:9:\"unit_view\";s:4:\"unit\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5);
 
 -- MENU
 

+ 5 - 2
modules/boonex/russian/data/langs/bx_organizations/ru.xml

@@ -138,6 +138,7 @@
 	<string name="_bx_orgs_page_title_browse_recent"><![CDATA[Новые организации]]></string>
 	<string name="_bx_orgs_page_title_browse_connections"><![CDATA[{0} связей]]></string>
 	<string name="_bx_orgs_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+        <string name="_bx_orgs_page_title_browse_familiar"><![CDATA[Организации, которых Вы можете знать]]></string>
 	<string name="_bx_orgs_page_title_browse_favorites"><![CDATA[{0} избранных]]></string>
 	<string name="_bx_orgs_page_title_browse_by_acl"><![CDATA[Организации уровня {0}]]></string>
 	<string name="_bx_orgs_page_title_browse_by_cmts"><![CDATA[Организации - Комментарии]]></string>
@@ -206,8 +207,8 @@
     <string name="_bx_orgs_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_orgs_page_block_title_fans"><![CDATA[Участники]]></string>
     <string name="_bx_orgs_page_block_title_system_fans"><![CDATA[Участники]]></string>
-	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Расположение]]></string>
-	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Подписки]]></string>
+    <string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Расположение]]></string>
+    <string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_orgs_page_block_title_system_profile_subscribed_me"><![CDATA[Подписчики]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscribed_me"><![CDATA[Подписчики]]></string>
@@ -226,6 +227,8 @@
     <string name="_bx_orgs_page_block_title_sys_active_profiles"><![CDATA[Активные организации]]></string>
     <string name="_bx_orgs_page_block_title_active_profiles"><![CDATA[Активные организации]]></string>
     <string name="_bx_orgs_page_block_title_online_profiles"><![CDATA[Онлайн организации]]></string>
+    <string name="_bx_orgs_page_block_title_sys_familiar_profiles"><![CDATA[Знакомые организации]]></string>
+    <string name="_bx_orgs_page_block_title_familiar_profiles"><![CDATA[Организации, которые Вы можете знать]]></string>
     <string name="_bx_orgs_page_block_title_categories"><![CDATA[Категории организаций]]></string>
     <string name="_bx_orgs_page_block_title_invite_to_organization"><![CDATA[Пригласить участников в организацию]]></string>
     <string name="_bx_orgs_page_block_title_search_form"><![CDATA[Форма поиска]]></string>

+ 3 - 0
modules/boonex/russian/data/langs/bx_persons/ru.xml

@@ -99,6 +99,7 @@
 	<string name="_bx_persons_page_title_browse_recent"><![CDATA[Новые пользователи]]></string>
 	<string name="_bx_persons_page_title_browse_connections"><![CDATA[{0} связей]]></string>
 	<string name="_bx_persons_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+        <string name="_bx_persons_page_title_browse_familiar"><![CDATA[Пользователи, которых Вы можете знать]]></string>
 	<string name="_bx_persons_page_title_browse_favorites"><![CDATA[{0} избранных]]></string>
 	<string name="_bx_persons_page_title_browse_by_acl"><![CDATA[Пользователи уровня {0}]]></string>
 	<string name="_bx_persons_page_title_browse_by_cmts"><![CDATA[Пользователи - Комментарии]]></string>
@@ -169,6 +170,8 @@
     <string name="_bx_persons_page_block_title_sys_active_profiles"><![CDATA[Активные пользователи]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Активные пользователи]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Онлайн пользователи]]></string>
+    <string name="_bx_persons_page_block_title_sys_familiar_profiles"><![CDATA[Знакомые пользователи]]></string>
+    <string name="_bx_persons_page_block_title_familiar_profiles"><![CDATA[Пользователи, которых Вы можете знать]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
     <string name="_bx_persons_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
     <string name="_bx_persons_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>