8 require_once(CH_DIRECTORY_PATH_CLASSES .
'ChWsbConfig.php');
46 $this->_bJsMode =
false;
48 $this->_sAlertSystemName =
$sName;
49 $this->_sCommentSystemName =
$sName;
50 $this->_sVotingSystemName =
$sName;
52 $this->_aRepostDefaults = array(
53 'show_do_repost_as_button' =>
false,
54 'show_do_repost_as_button_small' =>
false,
55 'show_do_repost_icon' =>
false,
56 'show_do_repost_label' =>
true,
57 'show_counter' =>
true
60 $this->_sCommonPostPrefix =
'wall_common_';
61 $this->_aPrefixes = array(
63 'language' =>
'_wall',
65 'common_post' => $this->_sCommonPostPrefix
68 $this->_sAnimationEffect =
'fade';
69 $this->_iAnimationSpeed =
'slow';
72 $this->_aHideEventsTimeline = array();
73 $this->_aHideEventsOutline = array();
74 $this->_aHideUploadersTimeline = array();
75 $this->_aHandlers = array();
77 $this->_aJsClasses = array(
78 'post' =>
'ChWallPost',
79 'repost' =>
'ChWallRepost',
80 'view' =>
'ChWallView',
81 'outline' =>
'ChWallOutline'
84 $this->_aJsObjects = array(
85 'post' =>
'oWallPost',
86 'repost' =>
'oWallRepost',
87 'view' =>
'oWallView',
88 'outline' =>
'oWallOutline',
89 'voting' =>
'oWallVoting',
92 $sHtmlPrefix = str_replace(
'_',
'-',
$sName);
93 $this->_aHtmlIds = array(
95 'loading' => $sHtmlPrefix .
'-post-loading',
98 'main' => $sHtmlPrefix .
'-repost-',
99 'counter' => $sHtmlPrefix .
'-repost-counter-',
100 'by_popup' => $sHtmlPrefix .
'-repost-by-',
109 $this->_bAllowDelete = $this->_oDb->getParam(
'wall_enable_delete') ==
'on';
110 $this->_iPerPageProfileTl = (int)$this->_oDb->getParam(
'wall_events_per_page_profile_tl');
111 $this->_iPerPageAccountTl = (int)$this->_oDb->getParam(
'wall_events_per_page_account_tl');
112 $this->_iPerPageIndexTl = (int)$this->_oDb->getParam(
'wall_events_per_page_index_tl');
113 $this->_iPerPageIndexOl = (int)$this->_oDb->getParam(
'wall_events_per_page_index_ol');
114 $this->_iCharsDisplayMax = (int)$this->_oDb->getParam(
'wall_events_chars_display_max');
115 $this->_iRssLength = (int)$this->_oDb->getParam(
'wall_rss_length');
117 $sHideUploadersTimeline = $this->_oDb->getParam(
'wall_uploaders_hide_timeline');
118 if(!
empty($sHideUploadersTimeline))
119 $this->_aHideUploadersTimeline = explode(
',', $sHideUploadersTimeline);
121 $sHideEventsTimeline = $this->_oDb->getParam(
'wall_events_hide_timeline');
122 if(!
empty($sHideEventsTimeline))
123 $this->_aHideEventsTimeline = explode(
',', $sHideEventsTimeline);
125 $sHideEventsOutline = $this->_oDb->getParam(
'wall_events_hide_outline');
126 if(!
empty($sHideEventsOutline))
127 $this->_aHideEventsOutline = explode(
',', $sHideEventsOutline);
129 $aHandlers = $this->_oDb->getHandlers();
130 foreach($aHandlers
as $aHandler)
131 $this->_aHandlers[$aHandler[
'alert_unit'] .
'_' . $aHandler[
'alert_action']] = $aHandler;
139 return $this->_sAlertSystemName;
164 $iResult = $this->_iPerPageIndexTl;
167 $iResult = $this->_iPerPageIndexOl;
198 return isset($this->_aPrefixes[
$sType]) ? $this->_aPrefixes[
$sType] :
'';
202 return $this->_aJsClasses[
$sType];
206 return $this->_aJsObjects[
$sType];
241 return isset($this->_aHtmlIds[
$sType]) ? $this->_aHtmlIds[
$sType] : array();
243 return isset($this->_aHtmlIds[
$sType][$sKey]) ? $this->_aHtmlIds[
$sType][$sKey] :
'';
250 return $this->_aHandlers[$sKey];
254 return isset($this->_aHandlers[$sKey]);
258 $this->_bJsMode = $bJsMode;
275 $sHandler = $aEvent[
'type'] .
'_' . $aEvent[
'action'];
280 if(
empty($aHandler[
'module_uri']) ||
empty($aHandler[
'module_class']) ||
empty($aHandler[
'module_method']))
287 $aDescriptor = array(
290 'object_id' => $iObjectId
297 return strcmp(
$sType,
'comment') === 0 && strcmp(
$sAction,
'add') === 0;
307 if((
int)$aHandler[
'groupable'] == 0 ||
empty($aHandler[
'group_by']))
320 return strtolower(str_replace(
'ch_',
'',
$sName));