그누보드 5.1.0 테마 지원버전
This commit is contained in:
@ -2993,4 +2993,39 @@ function get_device_change_url()
|
||||
|
||||
return $href;
|
||||
}
|
||||
|
||||
// 스킨 path
|
||||
function get_skin_path($dir, $skin)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if(preg_match('#^theme/(.+)$#', $skin, $match)) { // 테마에 포함된 스킨이라면
|
||||
$theme_path = '';
|
||||
$cf_theme = trim($config['cf_theme']);
|
||||
|
||||
$theme_path = G5_PATH.'/'.G5_THEME_DIR.'/'.$cf_theme;
|
||||
if(G5_IS_MOBILE) {
|
||||
$skin_path = $theme_path.'/'.G5_MOBILE_DIR.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||
if(!is_dir($skin_path))
|
||||
$skin_path = $theme_path.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||
} else {
|
||||
$skin_path = $theme_path.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||
}
|
||||
} else {
|
||||
if(G5_IS_MOBILE)
|
||||
$skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$skin;
|
||||
else
|
||||
$skin_path = G5_SKIN_PATH.'/'.$dir.'/'.$skin;
|
||||
}
|
||||
|
||||
return $skin_path;
|
||||
}
|
||||
|
||||
// 스킨 url
|
||||
function get_skin_url($dir, $skin)
|
||||
{
|
||||
$skin_path = get_skin_path($dir, $skin);
|
||||
|
||||
return str_replace(G5_PATH, G5_URL, $skin_path);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user