35 $filesize = $stat[
'size'];
36 $fp = fopen(
$tpl,
'r');
37 $source = ($filesize > 0) ? fread($fp, $filesize) :
'';
55 static $cache = array();
57 $tpl_info =
$xoops->getTplInfo(
'block:'.$tpl_name);
58 $tpl_name = $tpl_info[
'tpl_name'];
60 $file = $tpl_info[
'file'];
64 $theme_set =
$xoops->getConfig(
'theme_set') ?
$xoops->getConfig(
'theme_set') :
'default';
65 if (!file_exists($file_path =
$xoops->path(
"themes/{$theme_set}/modules/{$dirname}/blocks/{$file}"))) {
66 $file_path =
$xoops->path(
"modules/{$dirname}/templates/blocks/{$file}");
68 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