36 $filesize = $stat[
'size'];
37 $fp = fopen(
$tpl,
'r');
38 $source = ($filesize > 0) ? fread($fp, $filesize) :
'';
56 static $cache = array();
58 $tpl_info =
$xoops->getTplInfo(
'module:'.$tpl_name);
59 $tpl_name = $tpl_info[
'tpl_name'];
61 $file = $tpl_info[
'file'];
63 if (isset($cache[$tpl_name])) {
64 return $cache[$tpl_name];
67 $theme_set =
$xoops->getConfig(
'theme_set') ?
$xoops->getConfig(
'theme_set') :
'default';
68 if (!file_exists($file_path =
$xoops->path(
"themes/{$theme_set}/modules/{$dirname}/{$file}"))) {
69 $file_path =
$xoops->path(
"modules/{$dirname}/templates/{$file}");
71 return $cache[$tpl_name] = $file_path;
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
fetch($name, &$source, &$mtime)
if($file===false||$dir===false||!strstr($file, $dir)) if(empty($file)||strpos($file, '.php')!==false) $mtime