'Icon', 'thumb' => 'Thumb', 'ava' => 'Avatar', 'ava-big' => 'Picture' ); $sTemplate = 'profile_unit.html'; $sTemplateSize = 'thumb'; $aTemplateVars = array(); if(!empty($aParams['template'])) { if(is_string($aParams['template'])) $sTemplate = 'profile_' . $aParams['template'] . '.html'; else if(is_array($aParams['template'])) { if(!empty($aParams['template']['name'])) $sTemplate = 'profile_' . $aParams['template']['name'] . '.html'; if(!empty($aParams['template']['size'])) $sTemplateSize = $aParams['template']['size']; if(!empty($aParams['template']['vars'])) $aTemplateVars = $aParams['template']['vars']; } } if(empty($sTemplateSize) || !isset($aSize2Method[$sTemplateSize])) $sTemplateSize = 'thumb'; if(empty($aTemplateVars) || !is_array($aTemplateVars)) $aTemplateVars = array(); return BxDolTemplate::getInstance()->parseHtmlByName($sTemplate, array_merge(array( 'size' => $sTemplateSize, 'thumb_url' => $this->{'get' . $aSize2Method[$sTemplateSize]}(), 'title' => $this->getDisplayName() ), $aTemplateVars)); } /** * Get profile unit for API calls */ public function getUnitAPI($iProfileId = 0, $aParams = []) { return []; } /** * Get badges */ public function getBadges() { return ""; } /** * Check whether a profile has real image uploaded by user. */ public function hasImage() { return false; } /** * Get picture url */ public function getPicture() { return BxDolTemplate::getInstance()->getImageUrl('account.svg'); } /** * Get big (2x) avatar url */ public function getAvatarBig() { return BxDolTemplate::getInstance()->getImageUrl('account.svg'); } /** * Get profile avatar */ public function getAvatar() { return BxDolTemplate::getInstance()->getImageUrl('account.svg'); } /** * Get profile cover */ public function getCover() { return BxDolTemplate::getInstance()->getImageUrl('cover.svg'); } /** * Get profile thumb */ public function getThumb() { return BxDolTemplate::getInstance()->getImageUrl('account.svg'); } /** * Get profile icon */ public function getIcon() { return BxDolTemplate::getInstance()->getImageUrl('account.svg'); } /** * Get module icon */ public function getIconModule($iProfileId = 0) { return 'user'; } /** * Get profile edit url */ public function getEditUrl() { return ''; } /** * @see iBxDolProfile::checkAllowedProfileView */ public function checkAllowedProfileView($iProfileId = 0) { return CHECK_ACTION_RESULT_ALLOWED; } /** * @see iBxDolProfile::checkAllowedProfileContact */ public function checkAllowedProfileContact($iProfileId = 0) { return _t('_sys_txt_access_denied'); } /** * @see iBxDolProfile::checkAllowedPostInProfile */ public function checkAllowedPostInProfile($iProfileId = 0) { return _t('_sys_txt_access_denied'); } /** * Check if profile is active */ public function isActive($iProfileId = false) { return true; } /** * Is profile online */ public function isOnline($iProfileId = false) { return false; } public function getStatus($iProfileId = false) { return 'active'; } public function getModule($iProfileId = false) { return 'system'; } } /** @} */