mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1270 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
54442e2e18
commit
6de340fef5
5 changed files with 42 additions and 21 deletions
|
|
@ -191,6 +191,7 @@
|
||||||
* @brief 지정된 언어파일 로드
|
* @brief 지정된 언어파일 로드
|
||||||
**/
|
**/
|
||||||
function loadLang($path) {
|
function loadLang($path) {
|
||||||
|
return;
|
||||||
$oContext = &Context::getInstance();
|
$oContext = &Context::getInstance();
|
||||||
$oContext->_loadLang($path);
|
$oContext->_loadLang($path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
// 기타 로그 작성
|
// 기타 로그 작성
|
||||||
if(__DEBUG__==3) {
|
if(__DEBUG__==3) {
|
||||||
$buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
|
$buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
|
||||||
$buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec\n", $GLOBALS['__template_elapsed__']);
|
$buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
|
||||||
$buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
|
$buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
|
||||||
$buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']);
|
$buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,14 @@
|
||||||
* @brief TemplateHandler의 기생성된 객체를 return
|
* @brief TemplateHandler의 기생성된 객체를 return
|
||||||
**/
|
**/
|
||||||
function &getInstance() {
|
function &getInstance() {
|
||||||
if(!$GLOBALS['__TemplateHandler__']) $GLOBALS['__TemplateHandler__'] = new TemplateHandler();
|
if(__DEBUG__==3) {
|
||||||
|
if(!isset($GLOBALS['__TemplateHandlerCalled__'])) $GLOBALS['__TemplateHandlerCalled__']=1;
|
||||||
|
else $GLOBALS['__TemplateHandlerCalled__']++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$GLOBALS['__TemplateHandler__']) {
|
||||||
|
$GLOBALS['__TemplateHandler__'] = new TemplateHandler();
|
||||||
|
}
|
||||||
return $GLOBALS['__TemplateHandler__'];
|
return $GLOBALS['__TemplateHandler__'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,6 +85,9 @@
|
||||||
$buff = FileHandler::readFile($tpl_file);
|
$buff = FileHandler::readFile($tpl_file);
|
||||||
if(!$buff) return;
|
if(!$buff) return;
|
||||||
|
|
||||||
|
// include 변경 <!--#include($path, $filename)-->
|
||||||
|
$buff = preg_replace_callback('!<\!--#include\(([^\)]*?)\)-->!is', array($this, '_compileIncludeToCode'), $buff);
|
||||||
|
|
||||||
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 제로보드의 root경로부터 시작하도록 변경
|
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 제로보드의 root경로부터 시작하도록 변경
|
||||||
$buff = preg_replace_callback('!img([^>]*)src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);
|
$buff = preg_replace_callback('!img([^>]*)src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);
|
||||||
|
|
||||||
|
|
@ -90,9 +100,6 @@
|
||||||
// <!--@, --> 의 변경
|
// <!--@, --> 의 변경
|
||||||
$buff = preg_replace_callback('!<\!--@(.*?)-->!is', array($this, '_compileFuncToCode'), $buff);
|
$buff = preg_replace_callback('!<\!--@(.*?)-->!is', array($this, '_compileFuncToCode'), $buff);
|
||||||
|
|
||||||
// include 변경 <!--#include($path, $filename)-->
|
|
||||||
$buff = preg_replace_callback('!<\!--#include\(([^\)]*?)\)-->!is', array($this, '_compileIncludeToCode'), $buff);
|
|
||||||
|
|
||||||
// import xml filter/ css/ js/ 언어파일 <!--%filename-->
|
// import xml filter/ css/ js/ 언어파일 <!--%filename-->
|
||||||
$buff = preg_replace_callback('!<\!--%import\(\"([^\"]*?)\"\)-->!is', array($this, '_compileImportCode'), $buff);
|
$buff = preg_replace_callback('!<\!--%import\(\"([^\"]*?)\"\)-->!is', array($this, '_compileImportCode'), $buff);
|
||||||
|
|
||||||
|
|
@ -194,30 +201,43 @@
|
||||||
if(substr($arg,0,2)=='./') $arg = substr($arg,2);
|
if(substr($arg,0,2)=='./') $arg = substr($arg,2);
|
||||||
|
|
||||||
// 1단계로 해당 tpl 내의 파일을 체크
|
// 1단계로 해당 tpl 내의 파일을 체크
|
||||||
$filename = sprintf("%s/%s", dirname($this->tpl_file), $arg);
|
$source_filename = sprintf("%s/%s", dirname($this->tpl_file), $arg);
|
||||||
|
|
||||||
// 2단계로 root로부터 경로를 체크
|
// 2단계로 root로부터 경로를 체크
|
||||||
if(!file_exists($filename)) $filename = './'.$arg;
|
if(!file_exists($source_filename)) $source_filename = './'.$arg;
|
||||||
if(!file_exists($filename)) return;
|
if(!file_exists($source_filename)) return;
|
||||||
|
|
||||||
// path, filename으로 분리
|
// path, filename으로 분리
|
||||||
$tmp_arr = explode('/', $filename);
|
$tmp_arr = explode('/', $source_filename);
|
||||||
$filename = array_pop($tmp_arr);
|
$filename = array_pop($tmp_arr);
|
||||||
$path = implode('/', $tmp_arr).'/';
|
$path = implode('/', $tmp_arr).'/';
|
||||||
|
|
||||||
|
// 원본 파일을 읽음
|
||||||
|
$include_buff = FileHandler::readFile($source_filename);
|
||||||
|
|
||||||
// include 시도
|
// include 시도
|
||||||
$output = sprintf(
|
$output = sprintf(
|
||||||
'<?php%s'.
|
'<?php%s'.
|
||||||
'$oTemplate = &TemplateHandler::getInstance();%s'.
|
'if(filectime("%s")<%d) { %s ?>'.
|
||||||
'print $oTemplate->compile(\'%s\',\'%s\');%s'.
|
'%s%s'.
|
||||||
'?>%s',
|
'<?php } else { '.
|
||||||
"\n",
|
'$oTemplate = &TemplateHandler::getInstance();%s'.
|
||||||
"\n",
|
'print $oTemplate->compile(\'%s\',\'%s\');%s'.
|
||||||
$path,
|
' } ?>%s',
|
||||||
$filename,
|
|
||||||
"\n",
|
"\n",
|
||||||
"\n"
|
|
||||||
|
$source_filename, time(), "\n",
|
||||||
|
|
||||||
|
$include_buff, "\n",
|
||||||
|
|
||||||
|
"\n",
|
||||||
|
|
||||||
|
$path, $filename, "\n",
|
||||||
|
|
||||||
|
"\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ function XmlJsFilterExecuteFilter(filter, value) {
|
||||||
return regx.test(value);
|
return regx.test(value);
|
||||||
break;
|
break;
|
||||||
case "alpha_number" :
|
case "alpha_number" :
|
||||||
var regx = /^[a-zA-Z0-9]*$/;
|
var regx = /^[a-zA-Z0-9\_]*$/;
|
||||||
return regx.test(value);
|
return regx.test(value);
|
||||||
break;
|
break;
|
||||||
case "number" :
|
case "number" :
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
$lang->skin_maker_homepage = '홈페이지';
|
$lang->skin_maker_homepage = '홈페이지';
|
||||||
|
|
||||||
// 주절 주절..
|
// 주절 주절..
|
||||||
$lang->about_mid = '모듈이름은 http://주소/?mid=모듈이름 처럼 직접 호출할 수 있는 값입니다. (영문+숫자만 가능)';
|
$lang->about_mid = '모듈이름은 http://주소/?mid=모듈이름 처럼 직접 호출할 수 있는 값입니다. (영문+숫자+_ 만 가능)';
|
||||||
$lang->about_category = '분류를 통한 관리를 할 수 있도록 합니다. 모듈 분류의 관리는 <a href=\"./?module=admin&act=dispCategory&mo=module\">모듈관리 > 모듈카테고리</a>에서 하실 수 있습니다.';
|
$lang->about_category = '분류를 통한 관리를 할 수 있도록 합니다. 모듈 분류의 관리는 <a href=\"./?module=admin&act=dispCategory&mo=module\">모듈관리 > 모듈카테고리</a>에서 하실 수 있습니다.';
|
||||||
$lang->about_browser_title = '브라우저의 제목에 나타나는 값입니다. RSS/Trackback에서도 사용됩니다.';
|
$lang->about_browser_title = '브라우저의 제목에 나타나는 값입니다. RSS/Trackback에서도 사용됩니다.';
|
||||||
$lang->about_description= '관리용으로 사용되는 설명입니다';
|
$lang->about_description= '관리용으로 사용되는 설명입니다';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue