当前位置: 首页>>代码示例>>PHP>>正文


PHP BxDolTemplate类代码示例

本文整理汇总了PHP中BxDolTemplate的典型用法代码示例。如果您正苦于以下问题:PHP BxDolTemplate类的具体用法?PHP BxDolTemplate怎么用?PHP BxDolTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BxDolTemplate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _action

 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;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:35,代码来源:BxDolCacheUtilities.php

示例2: serviceLoginForm

 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;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxBaseServiceLogin.php

示例3: serviceLoginForm

 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;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxBaseServiceLogin.php

示例4: __construct

 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'));
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:BxCnvFormEntry.php

示例5: bx_storage_download_error_occured

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}();
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:storage.php

示例6: init

 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);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseLiveUpdates.php

示例7: __construct

 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();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseFunctions.php

示例8: __construct

 public function __construct($aOptions, $oTemplate)
 {
     parent::__construct($aOptions);
     if ($oTemplate) {
         $this->_oTemplate = $oTemplate;
     } else {
         $this->_oTemplate = BxDolTemplate::getInstance();
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxBasePrivacy.php

示例9: getPage

 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();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:10,代码来源:BxBaseModConnectTemplate.php

示例10: getPageMainCode

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')));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:10,代码来源:splash.php

示例11: BxDolModuleTemplate

 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/');
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:11,代码来源:BxDolModuleTemplate.php

示例12: __construct

 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');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:11,代码来源:BxBaseCaptchaReCAPTCHA.php

示例13: __construct

 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/');
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:12,代码来源:BxTemplConfig.php

示例14: __construct

 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/');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:13,代码来源:BxTemplConfig.php

示例15: response

 /**
  * 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;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:19,代码来源:BxDolSearch.php


注:本文中的BxDolTemplate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。