10 require_once(
'ChVideosCmtsAlbums.php');
26 parent::__construct(
'ch_videos_album_view');
28 $this->iProfileId =
$oModule->_iProfileId;
33 $this->oTemplate =
$oModule->_oTemplate;
38 $GLOBALS[
'oTopMenu']->setCustomSubHeader(
_t(
'_sys_album_x',
$aInfo[
'Caption']));
43 if (
empty($this->sBrowseCode)) {
44 $sClassName = $this->oConfig->getClassPrefix() .
'Search';
45 ch_import(
'Search', $this->oModule->_aModule);
46 $oSearch =
new $sClassName(
'album');
47 $aParams = array(
'album' => $this->aInfo[
'Uri'],
'owner' => $this->aInfo[
'Owner']);
49 'enable_center' =>
false,
50 'per_page' => $this->oConfig->getGlParam(
'number_view_album'),
52 $aHtml = $oSearch->getBrowseBlock($aParams, $aCustom);
54 if ($oSearch->aCurrent[
'paginate'][
'totalNum']) {
55 if ($oSearch->aCurrent[
'paginate'][
'totalNum'] > $oSearch->aCurrent[
'paginate'][
'perPage']) {
56 $sLink = $this->oConfig->getBaseUri() .
'browse/album/' . $this->aInfo[
'Uri'] .
'/owner/' .
getUsername($this->aInfo[
'Owner']);
58 'page_url' => $sLink .
'&page={page}&per_page={per_page}',
59 'count' => $oSearch->aCurrent[
'paginate'][
'totalNum'],
60 'per_page' => $oSearch->aCurrent[
'paginate'][
'perPage'],
61 'page' => $oSearch->aCurrent[
'paginate'][
'page'],
62 'on_change_per_page' =>
'document.location=\'' . CH_WSB_URL_ROOT . $sLink .
'&page=1&per_page=\' + this.value;'
64 $sPaginate = $oPaginate->getPaginate();
67 $aHtml[
'code'] =
MsgBox(
_t(
'_Empty'));
68 return DesignBoxContent(
_t(
'_' . $this->oConfig->getMainPrefix() .
'_browse_by_album', $this->aInfo[
'Caption']), $aHtml[
'code'] . $sPaginate, 1);
75 return $this->oModule->getBlockActionsAlbum($this->aInfo);
80 $aOwner = array(
'medProfId' => $this->aInfo[
'Owner'],
'NickName' =>
getNickName($this->aInfo[
'Owner']));
81 return $this->oTemplate->getFileAuthor($aOwner);
86 return $this->oTemplate->getAlbumInfo($this->aInfo);
91 $this->oTemplate->addCss(
'cmts.css');
93 $oCmtsView =
new ChVideosCmtsAlbums($this->oConfig->getMainPrefix() .
'_albums', $this->aInfo[
'ID']);
94 if(!$oCmtsView->isEnabled())
97 return $oCmtsView->getCommentsFirst();