示例#1
0
 function getBlockCode_ActionList()
 {
     $sCode = null;
     $sMainPrefix = $this->oConfig->getMainPrefix();
     bx_import('BxDolSubscription');
     $oSubscription = BxDolSubscription::getInstance();
     $aButton = $oSubscription->getButton($this->iProfileId, $sMainPrefix, '', (int) $this->aFileInfo['medID']);
     bx_import('BxDolAlbums');
     $sProfileAlbumUri = BxDolAlbums::getAbumUri($this->oConfig->getGlParam('profile_album_name'), $this->iProfileId);
     $aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'featured' => (int) $this->aFileInfo['Featured'], 'featuredCpt' => '', 'approvedCpt' => '', 'approvedAct' => '', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'fileKey' => $this->aFileInfo['Hash'], 'fileExt' => $this->aFileInfo['medExt'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'Tags' => bx_php_string_apos($this->aFileInfo['medTags']), 'TitleAvatar' => $this->aFileInfo['medProfId'] == $this->iProfileId && 'sys_avatar' == getParam('sys_member_info_thumb') ? _t('_' . $sMainPrefix . '_set_as_avatar') : '', 'SetAvatarCpt' => $this->aFileInfo['medProfId'] == $this->iProfileId && $sProfileAlbumUri == $this->aFileInfo['albumUri'] && 'bx_photos_thumb' == getParam('sys_member_info_thumb') ? _t('_' . $sMainPrefix . '_set_as_avatar') : '', 'sbs_' . $sMainPrefix . '_title' => $aButton['title'], 'sbs_' . $sMainPrefix . '_script' => $aButton['script'], 'shareCpt' => $this->oModule->isAllowedShare($this->aFileInfo) ? _t('_Share') : '', 'cropCpt' => $this->oModule->isAllowedEdit($this->aFileInfo) && $this->aFileInfo['medProfId'] == $this->iProfileId ? _t('_bx_photos_crop_action') : '');
     if (isAdmin($this->iProfileId)) {
         $sMsg = $aReplacement['featured'] > 0 ? 'un' : '';
         $aReplacement['featuredCpt'] = _t('_' . $sMainPrefix . '_action_' . $sMsg . 'feature');
     }
     if ($this->oModule->isAllowedApprove($this->aFileInfo)) {
         $sMsg = '';
         $iAppr = 1;
         if ($this->aFileInfo['Approved'] == 'approved') {
             $sMsg = 'de';
             $iAppr = 0;
         }
         $aReplacement['approvedCpt'] = _t('_' . $sMainPrefix . '_admin_' . $sMsg . 'activate');
         $aReplacement['approvedAct'] = $iAppr;
     }
     $sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $sMainPrefix);
     if (!is_null($sActionsList)) {
         $sCode = $oSubscription->getData() . $sActionsList;
     }
     return $sCode;
 }
示例#2
0
 function getBlockCode_ActionList()
 {
     $sCode = null;
     bx_import('BxDolSubscription');
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->iProfileId, $this->oConfig->getMainPrefix(), '', (int) $this->aFileInfo['medID']);
     $aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'fileKey' => $this->aFileInfo['Hash'], 'fileExt' => $this->aFileInfo['medExt'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'Tags' => bx_php_string_apos($this->aFileInfo['medTags']), 'TitleSetAsAvatar' => $this->aFileInfo['medProfId'] == $this->iProfileId ? _t('_' . $this->oConfig->getMainPrefix() . '_set_as_avatar') : '', 'sbs_' . $this->oConfig->getMainPrefix() . '_title' => $aButton['title'], 'sbs_' . $this->oConfig->getMainPrefix() . '_script' => $aButton['script']);
     $sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->oConfig->getMainPrefix());
     if (!is_null($sActionsList)) {
         $sCode = $oSubscription->getData() . $sActionsList;
     }
     return $sCode;
 }
 protected function getMarkersForPhp($a)
 {
     $a = $this->getMarkers($a);
     $aMarkers = array();
     foreach ($a as $sKey => $mixedVal) {
         $aMarkers['%' . strtoupper($sKey) . '%'] = bx_php_string_apos($mixedVal);
     }
     return $aMarkers;
 }