Просмотр исходного кода

#716 Connect modules: option with default privacy

Alex Trofimov 9 лет назад
Родитель
Сommit
600331b30e

+ 2 - 1
modules/boonex/dolphin_connect/classes/BxDolConModule.php

@@ -137,7 +137,8 @@ class BxDolConModule extends BxBaseModConnectModule
         $aProfileFields['name'] = $aProfileInfo['NickName'];
         $aProfileFields['fullname'] = $sFullname;
         $aProfileFields['picture'] = $aProfileInfo['picture'];
-        
+        $aProfileFields['allow_view_to'] = getParam('bx_dolcon_privacy');
+            
         return $aProfileFields;
     }
 

+ 1 - 0
modules/boonex/dolphin_connect/install/sql/enable.sql

@@ -37,6 +37,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_dolcon_url', '', @iCategId, '_bx_dolcon_option_app_url', 'digit', '', '', 30, ''),
 ('bx_dolcon_redirect_page', 'dashboard', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
 ('bx_dolcon_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:9:"bx_dolcon";s:6:"method";s:20:"get_profiles_modules";}'),
+('bx_dolcon_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:9:"bx_dolcon";s:6:"method";s:18:"get_privacy_groups";}'),
 ('bx_dolcon_auto_friends', 'on', @iCategId, '_bx_dolcon_option_auto_friends', 'checkbox', '', '', 60, ''),
 ('bx_dolcon_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
 ('bx_dolcon_approve', '', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, ''),

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1645,6 +1645,7 @@ If it is not enabled then please consider implement this optimization, since it
     <string name="_sys_connect_option_module"><![CDATA[Module to create profile in]]></string>
     <string name="_sys_connect_option_confirm_email"><![CDATA[Always confirm emails when joined using this module]]></string>
     <string name="_sys_connect_option_approve"><![CDATA[Always approve profiles when joined using this module]]></string>
+    <string name="_sys_connect_option_privacy"><![CDATA[Default privacy for created profiles]]></string>
 
 	<string name="_sys_currency"><![CDATA[{0}{1}]]></string>
 	<string name="_sys_designbox_0"><![CDATA[Content]]></string>

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

@@ -14,7 +14,6 @@
     <string name="_bx_facebook_option_app_secret"><![CDATA[Facebook App Secret]]></string>
     <string name="_bx_facebook_option_auto_friends"><![CDATA[Auto-friend members if they are already friends on Facebook]]></string>
     <string name="_bx_facebook_option_fetch_extended_info"><![CDATA[Fetch extended profile info (facebook app review is required)]]></string>
-    <string name="_bx_facebook_option_privacy"><![CDATA[Default privacy for created profiles]]></string>
 
 	<string name="_bx_facebook_conect_et_password_generated"><![CDATA[Facebook connect temporary password]]></string>
 	<string name="_bx_facebook_conect_et_password_generated_subject"><![CDATA[Temporary password]]></string>

+ 1 - 1
modules/boonex/facebook_connect/install/sql/enable.sql

@@ -36,7 +36,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_facebook_connect_secret', '', @iCategId, '_bx_facebook_option_app_secret', 'digit', '', '', 20, ''),
 ('bx_facebook_connect_redirect_page', 'dashboard', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 30, 'join,settings,dashboard,index'),
 ('bx_facebook_connect_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 40, 'a:2:{s:6:"module";s:11:"bx_facebook";s:6:"method";s:20:"get_profiles_modules";}'),
-('bx_facebook_connect_privacy', '3', @iCategId, '_bx_facebook_option_privacy', 'select', '', '', 44, 'a:2:{s:6:"module";s:11:"bx_facebook";s:6:"method";s:18:"get_privacy_groups";}'),
+('bx_facebook_connect_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 44, 'a:2:{s:6:"module";s:11:"bx_facebook";s:6:"method";s:18:"get_privacy_groups";}'),
 ('bx_facebook_connect_auto_friends', 'on', @iCategId, '_bx_facebook_option_auto_friends', 'checkbox', '', '', 50, ''),
 ('bx_facebook_connect_extended_info', '', @iCategId, '_bx_facebook_option_fetch_extended_info', 'checkbox', '', '', 60, ''),
 ('bx_facebook_connect_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),

+ 1 - 0
modules/boonex/google_connect/classes/BxGoogleConModule.php

@@ -131,6 +131,7 @@ class BxGoogleConModule extends BxBaseModConnectModule
         $aProfileFields['fullname'] = $aProfileInfo['name'];
         $aProfileFields['email'] = isset($aProfileInfo['email']) ? $aProfileInfo['email'] : '';
         $aProfileFields['picture'] = isset($aProfileInfo['picture']) ? $aProfileInfo['picture'] : '';
+        $aProfileFields['allow_view_to'] = getParam('bx_googlecon_privacy');
         
         return $aProfileFields;
     }

+ 1 - 0
modules/boonex/google_connect/install/sql/enable.sql

@@ -36,6 +36,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_googlecon_secret', '', @iCategId, '_bx_googlecon_option_app_secret', 'digit', '', '', 20, ''),
 ('bx_googlecon_redirect_page', 'dashboard', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
 ('bx_googlecon_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:12:"bx_googlecon";s:6:"method";s:20:"get_profiles_modules";}'),
+('bx_googlecon_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:12:"bx_googlecon";s:6:"method";s:18:"get_privacy_groups";}'),
 ('bx_googlecon_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
 ('bx_googlecon_approve', '', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, '');
 

+ 1 - 0
modules/boonex/linkedin_connect/classes/BxLinkedinModule.php

@@ -131,6 +131,7 @@ class BxLinkedinModule extends BxBaseModConnectModule
         $aProfileFields['fullname'] = $aProfileInfo['firstName'] . ' ' . (isset($aProfileInfo['lastName']) ? $aProfileInfo['lastName'] : '');
         $aProfileFields['email'] = isset($aProfileInfo['emailAddress']) ? $aProfileInfo['emailAddress'] : '';
         $aProfileFields['picture'] = isset($aProfileInfo['pictureUrl']) ? $aProfileInfo['pictureUrl'] : '';
+        $aProfileFields['allow_view_to'] = getParam('bx_linkedin_privacy');
         
         return $aProfileFields;
     }

+ 1 - 0
modules/boonex/linkedin_connect/install/sql/enable.sql

@@ -36,6 +36,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_linkedin_secret', '', @iCategId, '_bx_linkedin_option_app_secret', 'digit', '', '', 20, ''),
 ('bx_linkedin_redirect_page', 'dashboard', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
 ('bx_linkedin_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:11:"bx_linkedin";s:6:"method";s:20:"get_profiles_modules";}'),
+('bx_linkedin_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:11:"bx_linkedin";s:6:"method";s:18:"get_privacy_groups";}'),
 ('bx_linkedin_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
 ('bx_linkedin_approve', '', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, '');
 

+ 1 - 2
modules/boonex/russian/data/langs/bx_facebook/ru.xml

@@ -14,7 +14,6 @@
     <string name="_bx_facebook_option_app_secret"><![CDATA[Facebook App Secret]]></string>
     <string name="_bx_facebook_option_auto_friends"><![CDATA[Автоматически делать друзьями тех, что уже друг на Facebook'е]]></string>
     <string name="_bx_facebook_option_fetch_extended_info"><![CDATA[Получить расширенную информацию о профиле (приложение должно быть одобрено Facebook'ом)]]></string>
-    <string name="_bx_facebook_option_privacy"><![CDATA[Настройки конфиденциальности для созданных профилей]]></string>
 
 	<string name="_bx_facebook_conect_et_password_generated"><![CDATA[Facebook-соединение: временный пароль]]></string>
 	<string name="_bx_facebook_conect_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
@@ -22,4 +21,4 @@
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
 {email_footer}]]></string>
-</resources>
+</resources>

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

@@ -1643,6 +1643,7 @@
     <string name="_sys_connect_option_module"><![CDATA[Модуль в котором создавать профили]]></string>
     <string name="_sys_connect_option_confirm_email"><![CDATA[Всегда подтверждать емейл, когда заходят через это соединение]]></string>
     <string name="_sys_connect_option_approve"><![CDATA[Всегда одобрять профиль, когда заходят через это соединение]]></string>
+    <string name="_sys_connect_option_privacy"><![CDATA[Настройки конфиденциальности для созданных профилей]]></string>
 
 	<string name="_sys_currency"><![CDATA[{0}{1}]]></string>
 	<string name="_sys_designbox_0"><![CDATA[Содержимое]]></string>

+ 1 - 0
modules/boonex/twitter_connect/classes/BxTwitterModule.php

@@ -113,6 +113,7 @@ class BxTwitterModule extends BxBaseModConnectModule
         $aProfileFields['fullname'] = $aProfileInfo['name'];
         $aProfileFields['email'] = isset($aProfileInfo['email']) ? $aProfileInfo['email'] : '';
         $aProfileFields['picture'] = isset($aProfileInfo['profile_image_url']) ? str_replace('_normal', '', $aProfileInfo['profile_image_url']) : '';
+        $aProfileFields['allow_view_to'] = getParam('bx_twitter_privacy');
         
         return $aProfileFields;
     }

+ 1 - 0
modules/boonex/twitter_connect/install/sql/enable.sql

@@ -36,6 +36,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_twitter_secret', '', @iCategId, '_bx_twitter_option_app_secret', 'digit', '', '', 20, ''),
 ('bx_twitter_redirect_page', 'dashboard', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
 ('bx_twitter_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:10:"bx_twitter";s:6:"method";s:20:"get_profiles_modules";}'),
+('bx_twitter_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:10:"bx_twitter";s:6:"method";s:18:"get_privacy_groups";}'),
 ('bx_twitter_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
 ('bx_twitter_approve', '', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, '');