module.'/themes/'.$this->theme_name; else if($type=='absolute') $result = $g['url_root'].'/modules/'.$this->module.'/themes/'.$this->theme_name; return $result; } // get html & replace-parse public function getHtml($fileName) { global $g,$TMPL; $theme_path = $this->getThemePath('relative'); $file = sprintf($theme_path.'/_html/%s.html', $fileName); $fh_skin = fopen($file, 'r'); $skin = @fread($fh_skin, filesize($file)); fclose($fh_skin); //return $skin; return $this->getParseHtml($skin); } public function getParseHtml($skin) { global $TMPL; // $skin = preg_replace_callback('/{\$lng->(.+?)}/i', create_function('$matches', 'global $LNG; return $LNG[$matches[1]];'), $skin); $skin = preg_replace_callback('/{\$([a-zA-Z0-9_]+)}/', create_function('$matches', 'global $TMPL; return (isset($TMPL[$matches[1]])?$TMPL[$matches[1]]:"");'), $skin); return $skin; } } ?>