protected function _action($sCache, $sMode = 'clear') { $sFuncCacheObject = $sMode == 'clear' ? '_clearObject' : '_getSizeObject'; $sFuncCacheFile = $sMode == 'clear' ? '_clearFile' : '_getSizeFile'; $mixedResult = false; switch ($sCache) { case 'db': if (getParam('sys_db_cache_enable') != 'on') { break; } $oCacheDb = BxDolDb::getInstance()->getDbCacheObject(); $mixedResult = $this->{$sFuncCacheObject}($oCacheDb, 'db_'); break; case 'template': if (getParam('sys_template_cache_enable') != 'on') { break; } $oCacheTemplates = BxDolTemplate::getInstance()->getTemplatesCacheObject(); $mixedResult = $this->{$sFuncCacheObject}($oCacheTemplates, BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache)); break; case 'css': if (getParam('sys_template_cache_css_enable') != 'on') { break; } $mixedResult = $this->{$sFuncCacheFile}(BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache), BX_DIRECTORY_PATH_CACHE_PUBLIC); break; case 'js': if (getParam('sys_template_cache_js_enable') != 'on') { break; } $mixedResult = $this->{$sFuncCacheFile}(BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache), BX_DIRECTORY_PATH_CACHE_PUBLIC); break; } return $mixedResult; }
public function serviceLoginForm($sParams = '', $sForceRelocate = '') { if (isLogged()) { return false; } // get all auth types $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`'); // define additional auth types if ($aAuthTypes) { $aAddInputEl[''] = _t('_Basic'); // procces all additional menu's items foreach ($aAuthTypes as $iKey => $aItems) { $aAddInputEl[$aItems['Link']] = _t($aItems['Title']); } $aAuthTypes = array('type' => 'select', 'caption' => _t('_Auth type'), 'values' => $aAddInputEl, 'value' => '', 'attrs' => array('onchange' => 'if (this.value) { location.href = "' . BX_DOL_URL_ROOT . '" + this.value }')); } else { $aAuthTypes = array('type' => 'hidden'); } $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login'); $sCustomHtmlBefore = ''; $sCustomHtmlAfter = ''; bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes)); if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) { $oForm->aInputs['relocate']['value'] = $sForceRelocate; } elseif ('homepage' == $sForceRelocate) { $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT; } $sFormCode = $oForm->getCode(); $sJoinText = ''; if (strpos($sParams, 'no_join_text') === false) { $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div>' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>'; } BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js')); return $sCustomHtmlBefore . $sFormCode . $sCustomHtmlAfter . $sJoinText; }
public function serviceLoginForm($sParams = '', $sForceRelocate = '') { if (isLogged()) { return false; } // get all auth types $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`'); $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login'); $sCustomHtmlBefore = ''; $sCustomHtmlAfter = ''; bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes)); if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) { $oForm->aInputs['relocate']['value'] = $sForceRelocate; } elseif ('homepage' == $sForceRelocate) { $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT; } $sFormCode = $oForm->getCode(); $sJoinText = ''; if (strpos($sParams, 'no_join_text') === false) { $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div class="bx-def-font-align-center">' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>'; } BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js')); $sAuth = $this->serviceMemberAuthCode($aAuthTypes); return $sCustomHtmlBefore . $sAuth . $sFormCode . $sCustomHtmlAfter . $sJoinText; }
public function __construct($aInfo, $oTemplate = false) { $this->MODULE = 'bx_convos'; parent::__construct($aInfo, $oTemplate); $oTemplate = BxDolTemplate::getInstance(); $oTemplate->addJs(array('jquery-ui/jquery-ui.custom.min.js', 'jquery.form.min.js')); $oTemplate->addJsTranslation(array('_bx_cnv_draft_saving_error', '_bx_cnv_draft_saved_success')); }
function bx_storage_download_error_occured($sMethod = 'displayPageNotFound') { require_once BX_DIRECTORY_PATH_INC . "design.inc.php"; bx_import('BxDolLanguages'); bx_import('BxDolTemplate'); $oTemplate = BxDolTemplate::getInstance(); $oTemplate->{$sMethod}(); }
public function init($aParams = array()) { $aParams = array_merge(array('sActionsUrl' => BX_DOL_URL_ROOT . 'live_updates.php', 'sObjName' => $this->_sJsObject, 'iInterval' => $this->_iInterval, 'aSystemsActive' => $this->_aSystemsActive, 'bServerRequesting' => !empty($this->_aSystems)), $aParams); $sContent = "var " . $this->_sJsObject . " = new " . $this->_sJsClass . "(" . json_encode($aParams) . ");"; $oTemplate = BxDolTemplate::getInstance(); $oTemplate->addJs(array('BxDolLiveUpdates.js')); return $oTemplate->_wrapInTagJsCode($sContent); }
protected function __construct($oTemplate) { if (isset($GLOBALS['bxDolClasses'][get_class($this)])) { trigger_error('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR); } parent::__construct(); $this->_oTemplate = $oTemplate ? $oTemplate : BxDolTemplate::getInstance(); }
public function __construct($aOptions, $oTemplate) { parent::__construct($aOptions); if ($oTemplate) { $this->_oTemplate = $oTemplate; } else { $this->_oTemplate = BxDolTemplate::getInstance(); } }
function getPage($sPageCaption, $sPageContent) { $oTemplate = BxDolTemplate::getInstance(); $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT); if ($sPageCaption) { $oTemplate->setPageTitle($sPageCaption); } $oTemplate->setPageContent('page_main_code', $sPageContent); $oTemplate->getPageCode(); }
function getPageMainCode() { $oTemplate = BxDolTemplate::getInstance(); $bEnabled = getParam('sys_site_cover_enabled'); if (!$bEnabled) { $oTemplate->displayPageNotFound(); } $oTemplate->addJs(array('skrollr/skrollr.min.js')); return $oTemplate->parseHtmlByContent(getParam('sys_site_cover_code'), array('join_link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account'), 'login_form' => BxDolService::call('system', 'login_form', array(), 'TemplServiceLogin'))); }
function BxDolModuleTemplate(&$oConfig, &$oDb, $sRootPath = BX_DIRECTORY_PATH_ROOT, $sRootUrl = BX_DOL_URL_ROOT) { parent::BxDolTemplate($sRootPath, $sRootUrl); $this->_oDb =& $oDb; $this->_oConfig =& $oConfig; $sClassPrefix = $oConfig->getClassPrefix(); $sHomePath = $oConfig->getHomePath(); $sHomeUrl = $oConfig->getHomeUrl(); $this->addLocation($sClassPrefix, $sHomePath, $sHomeUrl); $this->addLocationJs($sClassPrefix, $sHomePath . 'js/', $sHomeUrl . 'js/'); }
public function __construct($aObject, $oTemplate) { parent::__construct($aObject); if ($oTemplate) { $this->_oTemplate = $oTemplate; } else { $this->_oTemplate = BxDolTemplate::getInstance(); } $this->_sKeyPublic = getParam('sys_recaptcha_key_public'); $this->_sKeyPrivate = getParam('sys_recaptcha_key_private'); }
function __construct() { parent::__construct(); bx_import('BxDolTemplate'); $sCode = BxDolTemplate::getInstance()->getCode(); $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/'; bx_import('BxDolConfig'); $oSysConfig = BxDolConfig::getInstance(); $oSysConfig->set('url_static', 'images', $sStaticImages); $oSysConfig->set('url_static', 'icons', $sStaticImages . 'icons/'); $oSysConfig->set('path_static', 'css', BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $sCode . '/css/'); }
function __construct() { parent::__construct(); $this->_aConfig['aLessConfig'] = array_merge($this->_aConfig['aLessConfig'], array('bx-font-family' => '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'bx-color-page' => '#b9e2f6', 'bx-color-block' => '#fff', 'bx-color-box' => '#daf8ff', 'bx-color-sec' => '#fff', 'bx-color-hl' => 'rgba(202, 242, 252, 0.2)', 'bx-color-active' => 'rgba(202, 242, 252, 0.4)', 'bx-border-color' => '#00a0ce')); bx_import('BxDolTemplate'); $sCode = BxDolTemplate::getInstance()->getCode(); $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/'; bx_import('BxDolConfig'); $oSysConfig = BxDolConfig::getInstance(); $oSysConfig->set('url_static', 'images', $sStaticImages); $oSysConfig->set('url_static', 'icons', $sStaticImages . 'icons/'); $oSysConfig->set('path_static', 'css', BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $sCode . '/css/'); }
/** * create units for all classes and calling their processing methods */ public function response() { bx_import('BxDolTemplate'); $sCode = ''; foreach ($this->aChoice as $sKey => $aValue) { if (!class_exists($aValue['class'])) { $sClassPath = str_replace('{tmpl}', BxDolTemplate::getInstance()->getCode(), $aValue['file']); require_once BX_DIRECTORY_PATH_ROOT . $sClassPath; } $oEx = new $aValue['class'](); $oEx->setId($aValue['id']); $oEx->setLiveSearch($this->_bLiveSearch); $sCode .= $oEx->processing(); } return $sCode; }
function __construct($sUploadTypeNC = 'Common') { parent::__construct(); $this->sTempFilename = ''; $this->sUploadTypeNC = $sUploadTypeNC; $this->sUploadTypeLC = strtolower($this->sUploadTypeNC); $this->_iOwnerId = $this->_getAuthorId(); $this->_sJsPostObject = 'o' . $this->sUploadTypeNC . 'Upload'; $this->sSendFileInfoFormCaption = ''; $GLOBALS['oSysTemplate']->addJsTranslation(array('_bx_' . $this->sUploadTypeLC . 's_val_title_err', '_bx_' . $this->sUploadTypeLC . 's_val_descr_err')); //--- Get Extras ---// $this->_aExtras = array(); if (!empty($_POST)) { $this->_aExtras = $this->_getExtraParams($_POST); } $this->iMaxFilesize = min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size'))); //max allowed from php.ini }
function BxDolFilesUploader($sUploadTypeNC = 'Common') { parent::BxDolTemplate(); $this->sTempFilename = ''; $this->sUploadTypeNC = $sUploadTypeNC; $this->sUploadTypeLC = strtolower($this->sUploadTypeNC); $this->_iOwnerId = $this->_getAuthorId(); $this->_sJsPostObject = 'o' . $this->sUploadTypeNC . 'Upload'; $this->sSendFileInfoFormCaption = ''; $GLOBALS['oSysTemplate']->addJsTranslation(array('_bx_' . $this->sUploadTypeLC . 's_val_title_err', '_bx_' . $this->sUploadTypeLC . 's_val_descr_err')); //--- Get Extras ---// $this->_aExtras = array(); if (!empty($_POST)) { $this->_aExtras = $this->_getExtraParams($_POST); } $this->iMaxFilesize = min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size'))); //max allowed from php.ini $this->sMultiUploaderParams = array('accept_file' => '', 'multi' => 'true', 'auto' => 'true', 'accept_format' => '*.*', 'accept_format_desc' => 'All Files', 'file_size_limit' => $this->iMaxFilesize, 'file_upload_limit' => '10', 'file_queue_limit' => '5', 'button_image_url' => $GLOBALS['oSysTemplate']->getImageUrl('button_sprite.png')); }
function parseSystemKey($sKey, $mixedKeyWrapperHtml = null, $bProcessInjection = true) { $sRet = ''; switch ($sKey) { case 'version': $sRet = bx_get_ver(); break; case 'page_breadcrumb': $sRet = $this->getPageBreadcrumb(); break; case 'dol_images': $sRet = $this->_processJsImages(); break; case 'dol_lang': $sRet = $this->_processJsTranslations(); break; case 'dol_options': $sRet = $this->_processJsOptions(); break; case 'menu_top': $sRet = BxTemplStudioMenuTop::getInstance()->getCode(); break; case 'copyright': $sRet = _t('_copyright', date('Y')) . getVersionComment(); break; default: $sRet = parent::parseSystemKey($sKey, $mixedKeyWrapperHtml, false); } return $this->processInjection($this->getPageNameIndex(), $sKey, $sRet); }
/** * Constructor */ public function __construct($aParams, $oTemplate = null) { parent::__construct(); if ($oTemplate) { $this->_oTemplate = $oTemplate; } else { $this->_oTemplate = BxDolTemplate::getInstance(); } if (isset($aParams['count'])) { trigger_error('Paginate "count" is deprecated - use "num" instead: ' . get_class($this), E_USER_ERROR); } //--- Main settings ---// $this->_iStart = isset($aParams['start']) && (int) $aParams['start'] > 0 ? (int) $aParams['start'] : 0; $this->_iNum = isset($aParams['num']) ? (int) $aParams['num'] : 0; $this->_iPerPage = isset($aParams['per_page']) && (int) $aParams['per_page'] > 0 ? (int) $aParams['per_page'] : BX_DOL_PAGINATE_PER_PAGE_DEFAULT; $this->_bInfo = isset($aParams['info']) ? (bool) $aParams['info'] : true; $this->_sButtonsClass = isset($aParams['buttons_class']) ? $aParams['buttons_class'] : ''; $this->_sViewAllUrl = isset($aParams['view_all_url']) ? $aParams['view_all_url'] : false; $this->_sViewAllCaption = isset($aParams['view_all_caption']) ? $aParams['view_all_caption'] : _t('_sys_paginate_view_all'); $this->_sPaginateClass = isset($aParams['paginate_class']) ? $aParams['paginate_class'] : ''; // page url $this->_sPageUrl = isset($aParams['page_url']) ? $aParams['page_url'] : BX_DOL_URL_ROOT; // on click (js mode) $this->_sOnChangePage = isset($aParams['on_change_page']) ? $aParams['on_change_page'] : ''; }
public function addCssJs() { $oTemplate = BxDolTemplate::getInstance(); $oTemplate->addCss('metatags.css'); }
/** * Display convos in folder */ public function actionFolder($iFolderId) { $oTemplate = BxDolTemplate::getInstance(); $aFolder = $this->_oDb->getFolder((int) $iFolderId); $oPage = BxDolPage::getObjectInstance('bx_convos_home'); if (!$aFolder || !$oPage) { $this->_oTemplate->displayPageNotFound(); exit; } // add replaceable markers $oPage->addMarkers(array('folder_id' => (int) $iFolderId, 'folder' => _t($aFolder['name']))); $s = $oPage->getCode(); $this->_oTemplate = BxDolTemplate::getInstance(); $this->_oTemplate->setPageNameIndex(BX_PAGE_DEFAULT); $this->_oTemplate->setPageContent('page_main_code', $s); $this->_oTemplate->getPageCode(); }
* * @defgroup TridentCore Samples * @{ */ /** * @page samples * @section comments Comments */ /** * Please refer to the following file for custom class and SQL dump data for this example: * @see BxCmtsMy.php */ $aPathInfo = pathinfo(__FILE__); require_once $aPathInfo['dirname'] . '/../inc/header.inc.php'; require_once BX_DIRECTORY_PATH_INC . "design.inc.php"; $oTemplate = BxDolTemplate::getInstance(); $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT); $oTemplate->setPageHeader('Comments'); $oTemplate->setPageContent('page_main_code', PageCompMainCode()); $oTemplate->getPageCode(); /** * page code function */ function PageCompMainCode() { $iObjectId = 1; bx_import('BxDolCmts'); $oCmts = BxDolCmts::getObjectInstance('sample', $iObjectId); if (!$oCmts->isEnabled()) { return ''; }
/** * Parse system keys. * * @param string $sKey key * @return string value associated with the key. */ function parseSystemKey($sKey, $mixedKeyWrapperHtml = null) { global $site; global $_page; global $oFunctions; global $oTemplConfig; global $logged; $aKeyWrappers = $this->_getKeyWrappers($mixedKeyWrapperHtml); $sRet = ''; switch ($sKey) { case 'page_charset': $sRet = 'UTF-8'; break; case 'page_keywords': if (!empty($GLOBALS[$this->_sPrefix . 'PageKeywords']) && is_array($GLOBALS[$this->_sPrefix . 'PageKeywords'])) { $sRet = '<meta name="keywords" content="' . bx_html_attribute(implode(',', $GLOBALS[$this->_sPrefix . 'PageKeywords'])) . '" />'; } break; case 'page_description': if (!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) { $sRet = '<meta name="description" content="' . bx_html_attribute($GLOBALS[$this->_sPrefix . 'PageDescription']) . '" />'; } break; case 'page_header': if (!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) { $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle']; } else { if (isset($_page['header'])) { $sRet = $_page['header']; } } //$sRet = process_line_output($sRet); break; case 'page_header_text': if (!empty($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle'])) { $sRet = $GLOBALS[$this->_sPrefix . 'PageMainBoxTitle']; } else { if (isset($_page['header_text'])) { $sRet = $_page['header_text']; } } //$sRet = process_line_output($sRet); break; case 'main_div_width': if (!empty($GLOBALS[$this->_sPrefix . 'PageWidth'])) { $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageWidth']); } break; case 'main_logo': $sRet = $GLOBALS['oFunctions']->genSiteLogo(); break; case 'main_splash': $sRet = $GLOBALS['oFunctions']->genSiteSplash(); break; case 'top_menu': $sRet = $GLOBALS['oTopMenu']->getCode(); break; case 'top_menu_breadcrumb': $sRet = !empty($GLOBALS['oTopMenu']->sBreadCrumb) ? $GLOBALS['oTopMenu']->sBreadCrumb : $GLOBALS['oTopMenu']->genBreadcrumb(); break; case 'extra_top_menu': $iProfileId = getLoggedId(); if ($iProfileId && getParam('ext_nav_menu_enabled')) { bx_import('BxTemplMemberMenu'); $oMemberMenu = new BxTemplMemberMenu(); $sRet = $oMemberMenu->genMemberMenu($iProfileId); } break; case 'bottom_links': $sRet = $oFunctions->genSiteBottomMenu(); break; case 'switch_skin_block': $sRet = getParam("enable_template") ? templates_select_txt() : ''; break; case 'dol_images': $sRet = $this->_processJsImages(); break; case 'dol_lang': $sRet = $this->_processJsTranslations(); break; case 'dol_options': $sRet = $this->_processJsOptions(); break; case 'bottom_text': $sRet = _t('_bottom_text', date('Y')); break; case 'copyright': $sRet = _t('_copyright', date('Y')) . getVersionComment(); break; case 'flush_header': //TODO: add some variable to disable it if needed //flush(); break; case 'extra_js': $sRet = empty($_page['extra_js']) ? '' : $_page['extra_js']; break; case 'is_profile_page': $sRet = defined('BX_PROFILE_PAGE') ? 'true' : 'false'; break; default: $sRet = ($sTemplAdd = $oFunctions->TemplPageAddComponent($sKey)) !== false ? $sTemplAdd : $aKeyWrappers['left'] . $sKey . $aKeyWrappers['right']; } $sRet = BxDolTemplate::processInjection($_page['name_index'], $sKey, $sRet); return $sRet; }
function displayMsg($s, $bTranslate = false) { $sTitle = $bTranslate ? _t($s) : $s; $oTemplate = BxDolTemplate::getInstance(); $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT); $oTemplate->setPageHeader($sTitle); $oTemplate->setPageContent('page_main_code', DesignBoxContent($sTitle, MsgBox($sTitle), BX_DB_PADDING_DEF)); $oTemplate->getPageCode(); exit; }
/** * Parse system keys. * * @param string $sKey key * @return string value associated with the key. */ function parseSystemKey($sKey, $mixedKeyWrapperHtml = null) { global $logged; $aKeyWrappers = $this->_getKeyWrappers($mixedKeyWrapperHtml); $sRet = ''; switch ($sKey) { case 'version': $sRet = $GLOBALS['site']['ver']; break; case 'current_version': $sRet = $GLOBALS['site']['ver'] . '.' . $GLOBALS['site']['build']; break; case 'page_charset': $sRet = 'UTF-8'; break; case 'page_keywords': if (!empty($GLOBALS[$this->_sPrefix . 'PageKeywords']) && is_array($GLOBALS[$this->_sPrefix . 'PageKeywords'])) { $sRet = '<meta name="keywords" content="' . process_line_output(implode(',', $GLOBALS[$this->_sPrefix . 'PageKeywords'])) . '" />'; } break; case 'page_description': if (!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) { $sRet = '<meta name="description" content="' . process_line_output($GLOBALS[$this->_sPrefix . 'PageDescription']) . '" />'; } break; case 'page_header': if (!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) { $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle']; } else { if (isset($GLOBALS['_page']['header'])) { $sRet = $GLOBALS['_page']['header']; } } $sRet = process_line_output($sRet); break; case 'page_header_text': if (!empty($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle'])) { $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle']); } else { if (isset($GLOBALS['_page']['header_text'])) { $sRet = $GLOBALS['_page']['header_text']; } } $sRet = process_line_output($sRet); break; case 'main_div_width': if (!empty($GLOBALS[$this->_sPrefix . 'PageWidth'])) { $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageWidth']); } break; case 'top_menu': $sRet = BxDolAdminMenu::getTopMenu(); break; case 'main_menu': $sRet = BxDolAdminMenu::getMainMenu(); break; case 'dol_images': $sRet = $this->_processJsImages(); break; case 'dol_lang': $sRet = $this->_processJsTranslations(); break; case 'dol_options': $sRet = $this->_processJsOptions(); break; case 'promo_code': if (defined('BX_PROMO_CODE')) { $sRet = BX_PROMO_CODE; } else { $sRet = ' '; } break; case 'copyright': $sRet = _t('_copyright', date('Y')) . getVersionComment(); break; } $sRet = BxDolTemplate::processInjection($GLOBALS['_page']['name_index'], $sKey, $sRet); return $sRet; }
/** * Add keywords meta info to the head section * @param $iId content id */ protected function locationsAddMeta($iId) { $aLocation = $this->locationGet($iId); if (!empty($aLocation['lat']) && !empty($aLocation['lng']) && !empty($aLocation['country'])) { BxDolTemplate::getInstance()->addPageMetaLocation($aLocation['lat'], $aLocation['lng'], $aLocation['country']); } }
/** * Perform email confirmation */ public function confirmEmail($sKey) { // check if key exists $oKey = BxDolKey::getInstance(); if (!$oKey || !$oKey->isKeyExists($sKey)) { return MsgBox(_t("_sys_txt_confirm_email_error_occured")); } // check if key data exists $aData = $oKey->getKeyData($sKey); if (!isset($aData['account_id'])) { return MsgBox(_t("_sys_txt_confirm_email_error_occured")); } // check if account exists $oAccount = BxDolAccount::getInstance($aData['account_id']); if (!$oAccount) { return MsgBox(_t("_sys_txt_confirm_email_error_occured")); } // remove key $oKey->removeKey($sKey); // confirm email if (!$oAccount->updateEmailConfirmed(true)) { return MsgBox(_t("_sys_txt_confirm_email_error_occured")); } // login to user's account automatically bx_login($aData['account_id']); // redirect with success message $oTemplate = BxDolTemplate::getInstance(); $oTemplate->setPageNameIndex(BX_PAGE_TRANSITION); $oTemplate->setPageHeader(_t('_sys_txt_confirm_email_success')); $oTemplate->setPageContent('page_main_code', MsgBox(_t('_sys_txt_confirm_email_success'))); $oTemplate->setPageContent('url_relocate', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-info')); BxDolTemplate::getInstance()->getPageCode(); exit; }
<?php /** * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ * CC-BY License - http://creativecommons.org/licenses/by/3.0/ * * @defgroup DolphinCore Dolphin Core * @{ */ require_once './inc/header.inc.php'; $sObject = bx_process_input(bx_get('object')); $mixedId = bx_process_input(bx_get('id')); $iUserId = bx_process_input(bx_get('member'), BX_DATA_INT); bx_import('BxDolRss'); $oRss = BxDolRss::getObjectInstance($sObject); if ($oRss && ($s = $oRss->getFeed($mixedId, $iUserId))) { header('Content-type: text/xml; charset=utf-8'); echo $s; } else { bx_import('BxDolLanguages'); bx_import('BxDolTemplate'); BxDolTemplate::getInstance()->displayPageNotFound(); } /** @} */
function addJsTranslation($mixedKey) { BxDolTemplate::getInstance()->addJsTranslation($mixedKey); }
/** * Constructor * $sSystem - comments system name * $iId - obect id to be commented */ function __construct($sSystem, $iId, $iInit = true, $oTemplate = false) { parent::__construct(); $this->_aSystems = $this->getSystems(); if (!isset($this->_aSystems[$sSystem])) { return; } $this->_sSystem = $sSystem; $this->_aSystem = $this->_aSystems[$sSystem]; $this->_aSystem['table_images'] = 'sys_cmts_images'; $this->_aSystem['table_images2entries'] = 'sys_cmts_images2entries'; $this->_aSystem['table_ids'] = 'sys_cmts_ids'; $this->_aSystem['is_browse_filter'] = (int) $this->_bBrowseFilter; $this->_iDpMaxLevel = (int) $this->_aSystem['number_of_levels']; $this->_sDisplayType = $this->_iDpMaxLevel == 0 ? BX_CMT_DISPLAY_FLAT : BX_CMT_DISPLAY_THREADED; $this->_sDpSessionKey = 'bx_' . $this->_sSystem . '_dp_'; $this->_sBrowseType = $this->_aSystem['browse_type']; $this->_sBrowseFilter = BX_CMT_FILTER_ALL; $this->_sBpSessionKeyType = 'bx_' . $this->_sSystem . '_bpt_'; $this->_sBpSessionKeyFilter = 'bx_' . $this->_sSystem . '_bpf_'; $this->_aOrder = array('by' => BX_CMT_ORDER_BY_DATE, 'way' => BX_CMT_ORDER_WAY_ASC); list($mixedUserDp, $mixedUserBpType, $mixedUserBpFilter) = $this->_getUserChoice(); if (!empty($mixedUserDp)) { $this->_sDisplayType = $mixedUserDp; } if (!empty($mixedUserBpType)) { $this->_sBrowseType = $mixedUserBpType; } if (!empty($mixedUserBpFilter)) { $this->_sBrowseFilter = $mixedUserBpFilter; } $this->_sViewUrl = BX_DOL_URL_ROOT . 'cmts.php'; $this->_sBaseUrl = BxDolPermalinks::getInstance()->permalink($this->_aSystem['base_url']); if (get_mb_substr($this->_sBaseUrl, 0, 4) != 'http') { $this->_sBaseUrl = BX_DOL_URL_ROOT . $this->_sBaseUrl; } $this->_sListAnchor = "cmts-anchor-%s-%d"; $this->_oQuery = new BxDolCmtsQuery($this); $this->_sFormObject = 'sys_comment'; $this->_sFormDisplayPost = 'sys_comment_post'; $this->_sFormDisplayEdit = 'sys_comment_edit'; $this->_sConnObjFriends = 'sys_profiles_friends'; $this->_sConnObjSubscriptions = 'sys_profiles_subscriptions'; $this->_sMenuObjManage = 'sys_cmts_item_manage'; $this->_sMenuObjActions = 'sys_cmts_item_actions'; $this->_sMetatagsObj = 'sys_cmts'; if ($iInit) { $this->init($iId); } if ($oTemplate) { $this->_oTemplate = $oTemplate; } else { $this->_oTemplate = BxDolTemplate::getInstance(); } }