14 parent::__construct(
'ch_store_view', $oMain,
$aDataEntry);
19 $sContent = $this->
_blockInfo ($this->aDataEntry, $this->_oTemplate->blockFields($this->aDataEntry));
20 return array(
$sContent, array(), array(),
false);
25 $sContent = $this->_oTemplate->blockDesc ($this->aDataEntry);
26 return array(
$sContent, array(), array(),
false);
31 return $this->
_blockPhoto ($this->_oDb->getMediaIds($this->aDataEntry[
'id'],
'images'), $this->aDataEntry[
'author_id']);
36 return $this->
_blockVideo ($this->_oDb->getMediaIds($this->aDataEntry[
'id'],
'videos'), $this->aDataEntry[
'author_id']);
41 return $this->_oTemplate->blockFiles ($this->aDataEntry);
51 $sContent =
$o->getBigVoting ($this->_oMain->isAllowedRate($this->aDataEntry));
52 return array(
$sContent, array(), array(),
false);
58 $o =
new ChStoreCmts (
'ch_store', (
int)$this->aDataEntry[
'id']);
59 if (!
$o->isEnabled())
return '';
60 return $o->getCommentsFirst ();
67 if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
71 $aSubscribeButton =
$oSubscription->getButton($this->_oMain->_iProfileId,
'ch_store',
'', (
int)$this->aDataEntry[
'id']);
75 'BaseUri' => $this->_oMain->_oConfig->getBaseUri(),
76 'iViewer' => $this->_oMain->_iProfileId,
77 'ownerID' => (
int)$this->aDataEntry[
'author_id'],
78 'ID' => (
int)$this->aDataEntry[
'id'],
79 'URI' => (
int)$this->aDataEntry[
'uri'],
80 'ScriptSubscribe' => $aSubscribeButton[
'script'],
81 'TitleSubscribe' => $aSubscribeButton[
'title'],
82 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ?
_t(
'_ch_store_action_title_edit') :
'',
83 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ?
_t(
'_ch_store_action_title_delete') :
'',
84 'TitleShare' => $this->_oMain->isAllowedShare($this->aDataEntry) ?
_t(
'_ch_store_action_title_share') :
'',
85 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ?
_t(
'_ch_store_action_title_broadcast') :
'',
86 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? ($this->aDataEntry[
'featured'] ?
_t(
'_ch_store_action_remove_from_featured') :
_t(
'_ch_store_action_add_to_featured')) :
'',
87 'TitleActivate' => method_exists($this->_oMain,
'isAllowedActivate') && $this->_oMain->isAllowedActivate($this->aDataEntry) ?
_t(
'_ch_store_admin_activate') :
'',
95 $aInfo[
'repostScript'] =
ChWsbService::call(
'wall',
'get_repost_js_click', array($this->_oMain->_iProfileId,
'ch_store',
'add', (
int)$this->aDataEntry[
'id']));
99 if(
empty($sCodeActions))
102 return $sCode . $sCodeActions;