本文整理汇总了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;
}