/** * Get logo URL. * @return string */ function getMainLogoUrl() { $iFileId = (int) getParam('sys_site_logo'); if (!$iFileId) { return false; } $oStorage = BxDolTranscoder::getObjectInstance('sys_custom_images'); $sFileUrl = $oStorage->getFileUrl($iFileId); if (!$sFileUrl) { return false; } if (getParam('sys_site_logo_width') > 0) { $sFileUrl = bx_append_url_params($sFileUrl, array('x' => getParam('sys_site_logo_width'))); } if (getParam('sys_site_logo_height') > 0) { $sFileUrl = bx_append_url_params($sFileUrl, array('y' => getParam('sys_site_logo_height'))); } return $sFileUrl; }
/** * Add all available meta tags to the head section * @return number of successfully added metas */ public function metaAdd($iId, $mixedImage = false) { $i = 0; foreach ($this->_aMetas as $sMeta) { $sFunc = $sMeta . 'AddMeta'; $i += $this->{$sFunc}($iId); } if ($mixedImage && is_array($mixedImage)) { if (!empty($mixedImage['object'])) { $o = BxDolStorage::getObjectInstance($mixedImage['object']); } elseif (!empty($mixedImage['transcoder'])) { $o = BxDolTranscoder::getObjectInstance($mixedImage['transcoder']); } $mixedImage = $o ? $o->getFileUrlById($mixedImage['id']) : false; } if ($mixedImage) { BxDolTemplate::getInstance()->addPageMetaImage($mixedImage); } return $i; }
protected function _entitySocialSharing($iId, $iIdForTimeline, $iIdThumb, $sTitle, $sObjectStorage, $sObjectTranscoder, $sObjectVote, $sUriViewEntry) { $sUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=' . $sUriViewEntry . '&id=' . $iId); $aCustomParams = false; if ($iIdThumb) { if ($sObjectTranscoder) { $o = BxDolTranscoder::getObjectInstance($sObjectTranscoder); } else { $o = BxDolStorage::getObjectInstance($sObjectStorage); } if ($sImgUrl = $o->getFileUrlById($iIdThumb)) { $aCustomParams = array('img_url' => $sImgUrl, 'img_url_encoded' => rawurlencode($sImgUrl)); } } //TODO: Rebuild using menus engine when it will be ready for such elements like Vote, Share, etc. $sVotes = ''; $oVotes = BxDolVote::getObjectInstance($sObjectVote, $iId); if ($oVotes) { $sVotes = $oVotes->getElementBlock(array('show_do_vote_as_button' => true)); } $sShare = ''; if (BxDolRequest::serviceExists('bx_timeline', 'get_share_element_block')) { $sShare = BxDolService::call('bx_timeline', 'get_share_element_block', array(bx_get_logged_profile_id(), $this->_aModule['name'], 'added', $iIdForTimeline, array('show_do_share_as_button' => true))); } $sSocial = BxTemplSocialSharing::getInstance()->getCode($iId, $this->_aModule['name'], BX_DOL_URL_ROOT . $sUrl, $sTitle, $aCustomParams); return $this->_oTemplate->parseHtmlByName('entry-share.html', array('vote' => $sVotes, 'share' => $sShare, 'social' => $sSocial)); //TODO: Rebuild using menus engine when it will be ready for such elements like Vote, Share, etc. }