function getCode() { if (!empty($this->_sOwner)) { $aOwner = $this->_oWall->_oDb->getUser($this->_sOwner, 'username'); if ((int) $aOwner['id'] == 0) { return MsgBox(_t('_wall_msg_page_not_found')); } } return parent::getCode(); }
function profilePage($iUserId, $sCss) { global $p_arr; $oProfile = new BxBaseProfileGenerator($iUserId); $oPPV = new BxTemplProfileView($oProfile, $site, $dir); $oProfile->oCmtsView->getExtraCss(); $oProfile->oCmtsView->getExtraJs(); $oProfile->oVotingView->getExtraJs(); $p_arr = $oProfile->_aProfile; return $this->parseHtmlByName('profile_page.html', array('page_main_css' => $sCss, 'page_main_code' => $oPPV->getCode())); }
$oProfile = new BxBaseProfileGenerator($profileID); $oProfile->oCmtsView->getExtraCss(); $oProfile->oCmtsView->getExtraJs(); $oProfile->oVotingView->getExtraJs(); $oSysTemplate->addJs('view_edit.js'); $_ni = 5; $_page['name_index'] = $_ni; $_page['css_name'] = array('profile_view.css', 'profile_view_tablet.css', 'profile_view_phone.css'); $p_arr = $oProfile->_aProfile; $sUserInfo = $oFunctions->getUserInfo($p_arr['ID']); if (!empty($sUserInfo)) { $sUserInfo = ': ' . htmlspecialchars_adv($sUserInfo); } $_page['header'] = process_line_output(getNickName($p_arr['ID'])) . $sUserInfo; $oPPV = new BxTemplProfileView($oProfile, $site, $dir); $_page_cont[$_ni]['page_main_code'] = $oPPV->getCode(); $_page_cont[$_ni]['custom_block'] = ''; $_page_cont[$_ni]['page_main_css'] = ''; // add profile customizer if (BxDolInstallerUtils::isModuleInstalled("profile_customize")) { $_page_cont[$_ni]['custom_block'] = '<div id="profile_customize_page" style="display: none;">' . BxDolService::call('profile_customize', 'get_customize_block', array()) . '</div>'; $_page_cont[$_ni]['page_main_css'] = '<style type="text/css">' . BxDolService::call('profile_customize', 'get_profile_style', array($profileID)) . '</style>'; } // Submenu actions $iId = $profileID; $iMemberId = $memberID; $sTxtProfileAccountPage = _t('_sys_am_profile_account_page'); $sTxtProfileMessage = _t('_sys_am_profile_message'); $sTxtFriendAdd = _t('_sys_am_profile_friend_add'); $sTxtFriendAccept = _t('_sys_am_profile_friend_accept'); $sTxtFriendCancel = _t('_sys_am_profile_friend_cancel');