@@ -277,6 +277,12 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
bx_alert('profile', 'profile_name', $iProfileId, 0, array('info' => $aInfo, 'display_name' => &$sDisplayName));
return $sDisplayName;
}
+
+ public function getSettings($iProfileId = 0)
+ {
+ $aInfo = $this->getInfo($iProfileId);
+ return BxDolService::call($aInfo['type'], 'profile_settings', array($aInfo['content_id']));
+ }
/**
* Get profile url
@@ -508,7 +508,25 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
-
+ public function serviceProfileSettings ($iContentId)
+ if (!$iContentId)
+ return false;
+ $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+ if (!$aContentInfo)
+ if (isset($aContentInfo['settings']))
+ return json_decode($aContentInfo['settings']);
+ public function serviceProfileSettingsSet ($iContentId, $oValue)
+ $CNF = $this->_oConfig->CNF;
+ $this->_oDb->updateEntriesBy(['settings' => json_encode($oValue)], [$CNF['FIELD_ID'] => $iContentId]);
public function serviceProfileCreateUrl ($bAbsolute = true)
{
$CNF = $this->_oConfig->CNF;
@@ -31,6 +31,7 @@ CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
`allow_post_to` varchar(16) NOT NULL DEFAULT '5',
`allow_contact_to` varchar(16) NOT NULL DEFAULT '3',
`status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
+ `settings` text NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `search_fields` (`org_name`,`org_desc`)
);
@@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS `bx_persons_data` (
`allow_view_to` varchar(16) NOT NULL DEFAULT '3',
FULLTEXT KEY `search_fields` (`fullname`,`description`)
@@ -964,6 +964,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
'Repost' => '',
'Delete' => '',
'GetEditForm' => '',
+ 'GetLiveUpdate' => ''
));
@@ -495,6 +495,7 @@ class BxBasePage extends BxDolPage
'display_name' => $o->getDisplayName(),
'url' => bx_api_get_relative_url($o->getUrl()),
'avatar' => $o->getAvatar(),
+ 'settings' => $o->getSettings(),
'info' => $o->getInfo(),
'notifications' => 0,
'cart' => 0,
@@ -1085,6 +1085,23 @@ class BxBaseServiceProfiles extends BxDol
return BxDolContentFilter::getInstance()->isEnabled();
+ public function serviceUpdateSettings($iProfileId = false, $sSettings)
+ $oProfile = BxDolProfile::getInstance($iProfileId);
+ if(!$oProfile)
+ return '';
+ $sModule = $oProfile->getModule();
+ $sMethod = 'profile_settings_set';
+ echo $sModule.BxDolRequest::serviceExists($sModule, $sMethod).$sMethod;
+ if(!BxDolRequest::serviceExists($sModule, $sMethod))
+ return 'aaa';
+ echo $sMethod;
+ BxDolService::call($sModule, $sMethod, array($oProfile->getContentId(), json_decode( $sSettings)));
protected function _getIcon ($sIcon)
return BxTemplFunctions::getInstance()->getIcon($sIcon);
@@ -79,7 +79,8 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
'BrowseSubscribedMe' => 'BxBaseServiceProfiles',
'BrowseSubscriptions' => 'BxBaseServiceProfiles',
'BrowseMembers' => 'BxBaseServiceProfiles',
+ 'UpdateSettings' => 'BxBaseServiceProfiles',
'GetChartGrowth' => 'BxBaseChartServices',
'GetChartStats' => 'BxBaseChartServices',