當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。