Go to the documentation of this file.
19 parent::__construct($iOwnerId);
23 $sSearchUnitTmpl = $this->
getHtml(
'ps_search_unit.html');
24 $aIds = $this->_oDb->getMembersIds($iGroupId);
27 foreach($aIds
as $aId)
30 'member_id' => $aId[
'id'],
39 'form_attrs' => array(
40 'id' =>
'ps-search-member-form',
41 'name' =>
'ps-search-member-form',
42 'action' => CH_WSB_URL_ROOT .
'member_privacy.php',
52 'caption' =>
_t(
"_ps_fcpt_keyword"),
56 'params' => array(3,64),
57 'error' =>
_t(
'_ps_ferr_incorrect_length'),
64 'value' =>
_t(
"_ps_btncpt_search"),
66 'onclick' =>
'javascript: ps_ad_search()'
75 'ps-add-members-add' =>
_t(
'_ps_btncpt_add')
80 'wnd_action' =>
'add',
81 'ch_if:search_form' => array(
84 'form' =>
$oForm->getCode(),
87 'js_site_url' => CH_WSB_URL_ROOT,
89 'control' => $sControl,
90 'loading' =>
LoadingBox(
'ps-add-members-loading')
97 'ps-del-members-delete' =>
_t(
'_ps_btncpt_delete')
102 'wnd_action' =>
'del',
103 'ch_if:search_form' => array(
104 'condition' =>
false,
107 'js_site_url' => CH_WSB_URL_ROOT,
109 'control' => $sControl,
110 'loading' =>
LoadingBox(
'ps-add-members-loading')
115 $aActions = $this->_oDb->getActions($this->_iOwnerId);
116 $aValues = $this->
_getSelectItems(array(
'type' =>
'extendable',
'owner_id' => $this->_iOwnerId));
119 'form_attrs' => array(
120 'id' =>
'ps-default-values-form',
121 'name' =>
'ps-default-values-form',
122 'action' => CH_WSB_URL_ROOT .
'member_privacy.php',
124 'enctype' =>
'multipart/form-data'
131 foreach($aActions
as $aAction) {
132 if($sModuleUri != $aAction[
'module_uri']) {
133 if(!
empty($sModuleUri))
134 $aForm[
'inputs'][$sModuleUri .
'_end'] = array(
135 'type' =>
'block_end'
137 $aForm[
'inputs'][$aAction[
'module_uri'] .
'_begin'] = array(
138 'type' =>
'block_header',
140 'collapsable' =>
true,
141 'collapsed' => $bCollapsed
144 $sModuleUri = $aAction[
'module_uri'];
148 $sName =
'ps-default-values_' . $aAction[
'action_id'];
152 'caption' =>
_t($aAction[
'action_title']),
153 'value' => !
empty($aAction[
'default_value']) ? $aAction[
'default_value'] : $aAction[
'action_default_value'],
154 'values' => $aValues,
157 'params' => array(1,4),
158 'error' =>
_t(
'_ps_ferr_incorrect_select'),
162 $aForm[
'inputs'][$sModuleUri .
'_end'] = array(
163 'type' =>
'block_end'
165 $aForm[
'inputs'][
'owner_id'] = array(
167 'name' =>
'owner_id',
168 'value' => $this->_iOwnerId,
170 $aForm[
'inputs'][
'ps-default-values-save'] = array(
172 'name' =>
'ps-default-values-save',
173 'value' =>
_t(
"_ps_btncpt_save")
185 $sValue = $this->_oDb->getDefaultGroup($this->_iOwnerId);
186 $aValues = $this->
_getSelectItems(array(
'type' =>
'extendable',
'owner_id' => $this->_iOwnerId));
189 'form_attrs' => array(
190 'id' =>
'ps-default-group-form',
191 'name' =>
'ps-default-group-form',
192 'action' => CH_WSB_URL_ROOT .
'member_privacy.php',
194 'enctype' =>
'multipart/form-data'
197 'ps-default-group-ids' => array(
199 'name' =>
'ps-default-group-ids',
200 'caption' =>
_t(
"_ps_fcpt_groups"),
201 'info' =>
_t(
"_ps_fnote_default_group"),
203 'values' => $aValues,
206 'params' => array(1,4),
207 'error' =>
_t(
'_ps_ferr_incorrect_select'),
210 'ps-default-group-save' => array(
212 'name' =>
'ps-default-group-save',
213 'value' =>
_t(
"_ps_btncpt_save")
227 $sExtendedTxt =
_t(
"_ps_cpt_extended");
231 $aGroups = $this->_oDb->getGroupsBy(array(
'type' =>
'owner',
'owner_id' => $this->_iOwnerId));
232 foreach($aGroups
as $aGroup) {
233 if(!
empty($aGroup[
'parent_id'])) {
234 $aParentGroup = $this->_oDb->getGroupsBy(array(
'type' =>
'id',
'id' => $aGroup[
'parent_id']));
236 $sTitle = ((int)$aParentGroup[
'owner_id'] == 0 ?
_t(
'_ps_group_' . $aParentGroup[
'id'] .
'_title') : $aParentGroup[
'title']);
237 $sExtend =
' ' . $sExtendedTxt .
' ';
238 $sExtend .= !
empty($aParentGroup[
'home_url']) ?
'<a href="' . CH_WSB_URL_ROOT . $aParentGroup[
'home_url'] .
'" target="_blank">' .
$sTitle .
'</a>' :
$sTitle;
241 'group_id' => $aGroup[
'id'],
242 'group_title' => $aGroup[
'title'],
243 'group_members' => $aGroup[
'members_count'],
244 'ch_if:extended' => array(
245 'condition' => !
empty($aGroup[
'parent_id']),
247 'group_extended' => $sExtend,
250 'add_img_url' => $sAddImgUrl,
251 'add_img_title' => $sAddImgTxt,
252 'delete_img_url' => $sDeleteImgUrl,
253 'delete_img_title' => $sDeleteImgTxt
258 'ps-my-groups-delete' =>
_t(
'_ps_btncpt_delete')
263 'ch_repeat:groups' => !
empty($aContent) ? $aContent :
MsgBox(
_t(
'_Empty')),
264 'control' => $sControl
272 $aValues = array_merge(array(
'0' =>
_t(
'_ps_cpt_none')), $this->
_getSelectItems(array(
'type' =>
'extendable',
'owner_id' => $this->_iOwnerId)));
275 'form_attrs' => array(
276 'id' =>
'ps-create-group-form',
277 'name' =>
'ps-create-group-form',
278 'action' => CH_WSB_URL_ROOT .
'member_privacy.php',
280 'enctype' =>
'multipart/form-data'
284 'table' =>
'sys_privacy_groups',
286 'submit_name' =>
'create'
292 'name' =>
'owner_id',
293 'value' => $this->_iOwnerId,
301 'caption' =>
_t(
"_ps_fcpt_title"),
305 'params' => array(3,64),
306 'error' =>
_t(
'_ps_ferr_incorrect_length'),
312 'parent_id' => array(
314 'name' =>
'parent_id',
315 'caption' =>
_t(
"_ps_fcpt_extends"),
317 'values' => $aValues,
320 'params' => array(1,4),
321 'error' =>
_t(
'_ps_ferr_incorrect_select'),
330 'value' =>
_t(
"_ps_btncpt_create"),
337 if(
$oForm->isSubmittedAndValid()) {
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
getBlockCode_DefaultGroup()
MsgBox($sText, $iTimer=0)
getBlockCode_CreateGroup()
ch_import($sClassName, $aModule=array())
parseHtmlByContent($sContent, $aVariables, $mixedKeyWrapperHtml=null)
_getSelectItems($aParams)
get_member_thumbnail($ID, $float, $bGenProfLink=false, $sForceSex='visitor', $aOnline=array())
_t($key, $arg0="", $arg1="", $arg2="")
getHtml($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
PopupBox($sName, $sTitle, $sContent, $aActions=array())
static showAdminActionsPanel($sWrapperId, $aButtons, $sCheckboxName='entry', $bSelectAll=true, $bSelectAllChecked=false, $sCustomHtml='')
getBlockCode_DefaultValues()
getBlockCode_AddMembers()
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
Attr AllowedRel this is empty
getBlockCode_GetMembers($iGroupId)
getBlockCode_DeleteMembers()
parseHtmlByName($sName, $aVariables, $mixedKeyWrapperHtml=null, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)