• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BxDolTemplate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: BxDolFilesUploader

 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'));
 }
开发者ID:noormcs,项目名称:studoro,代码行数:19,代码来源:BxDolFilesUploader.php


示例17: __construct

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


示例18: addCssJs

 public function addCssJs()
 {
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->addCss('metatags.css');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:5,代码来源:BxBaseServiceMetatags.php


示例19: actionFolder

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


示例20: pathinfo

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BxTemplFormView类代码示例发布时间:2022-05-23
下一篇:
PHP BxDolTags类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap