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


PHP Phpfox_Template::_sStaticThemeFolder方法代码示例

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


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

示例1: testStyle

 /**
  * Test a style by attempting to load and display it for the user.
  * This is used when a user is trying to demo a style.
  *
  * @param int $iId ID of the style.
  * @return bool TRUE if style can be loaded, FALSE if not.
  */
 public function testStyle($iId = null)
 {
     $sWhere = '';
     if ($iId === null) {
         $sWhere = 't.is_default = 1 AND s.is_default = 1';
     } else {
         $sWhere = 's.style_id = ' . (int) $iId;
     }
     $aTheme = Phpfox_Database::instance()->select('s.style_id, s.parent_id AS style_parent_id, s.folder AS style_folder_name, t.folder AS theme_folder_name, t.parent_id AS theme_parent_id')->from(Phpfox::getT('theme_style'), 's')->join(Phpfox::getT('theme'), 't', 't.theme_id = s.theme_id')->where($sWhere)->execute('getRow');
     if (!isset($aTheme['style_id'])) {
         return false;
     }
     $this->_sThemeFolder = $aTheme['theme_folder_name'];
     $this->_sStyleFolder = $aTheme['style_folder_name'];
     if ($aTheme['style_parent_id'] > 0) {
         $aStyleExtend = Phpfox_Database::instance()->select('folder AS parent_style_folder')->from(Phpfox::getT('theme_style'))->where('style_id = ' . $aTheme['style_parent_id'])->execute('getRow');
         if (isset($aStyleExtend['parent_style_folder'])) {
             $aTheme['parent_style_folder'] = $aStyleExtend['parent_style_folder'];
         }
     }
     if ($aTheme['theme_parent_id'] > 0) {
         $aThemeExtend = Phpfox_Database::instance()->select('folder AS parent_theme_folder')->from(Phpfox::getT('theme'))->where('theme_id = ' . $aTheme['theme_parent_id'])->execute('getRow');
         if (isset($aThemeExtend['parent_theme_folder'])) {
             $aTheme['parent_theme_folder'] = $aThemeExtend['parent_theme_folder'];
         }
     }
     $this->_aTheme = $aTheme;
     $this->_bIsTestMode = true;
     self::$_sStaticThemeFolder = $this->_sThemeFolder;
     return true;
 }
开发者ID:auzunov,项目名称:phpfox,代码行数:38,代码来源:template.class.php


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