git-svn-id: http://xe-core.googlecode.com/svn/trunk@725 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-27 10:25:21 +00:00
parent 5309a20e13
commit 1f0bbce146
4 changed files with 5 additions and 37 deletions

View file

@ -769,35 +769,5 @@
return PluginHandler::execute($plugin, $vars);
}
/**
* @biref 플러그인 코드를 실제 코드로 변경 (레이아웃용)
**/
function transPluginCode($matches) {
$oXmlParser = new XmlParser();
$xml_doc = $oXmlParser->parse(trim($matches[0]));
if($xml_doc->img) $vars = $xml_doc->img->attrs;
else $vars = $xml_doc->attrs;
if(!$vars->plugin) return "";
// 플러그인의 이름을 구함
$plugin = $vars->plugin;
unset($vars->plugin);
// className, style attribute를 구해 놓음
unset($vars->module_srl);
unset($vars->src);
// 코드 생성
$buff = "";
foreach($vars as $key => $val) {
$buff .= sprintf('$%s->%s = "%s";', $plugin, $key, $val);
}
$code = sprintf('<?php %s print PluginHandler::execute("%s", $%s); ?>', $buff, $plugin, $plugin);
return $code;
}
}
?>

View file

@ -28,9 +28,6 @@
// 요청방식에 따라 출력을 별도로
if(Context::getResponseMethod()!="XMLRPC") {
// 각 플러그인, 에디터 컴포넌트의 코드 변경
$oContext = &Context::getInstance();
$content = $oContext->transContent($content);
Context::set('content', $content);
// 레이아웃을 컴파일
@ -38,6 +35,10 @@
$oTemplate = new TemplateHandler();
$zbxe_final_content = $oTemplate->compile($oModule->getLayoutPath(), $oModule->getLayoutFile());
// 각 플러그인, 에디터 컴포넌트의 코드 변경
$oContext = &Context::getInstance();
$zbxe_final_content= $oContext->transContent($zbxe_final_content);
// 최종 결과를 common_layout에 넣어버림
Context::set('zbxe_final_content', $zbxe_final_content);
$output = $oTemplate->compile('./common/tpl', 'common_layout');

View file

@ -75,10 +75,6 @@
$buff = FileHandler::readFile($tpl_file);
if(!$buff) return;
// 플러그인 변경
$oContext = &Context::getInstance();
$buff = preg_replace_callback('!<img([^\>]*)plugin=([^\>]*?)\>!is', array($oContext,'transPluginCode'), $buff);
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 제로보드의 root경로부터 시작하도록 변경
$buff = preg_replace_callback('!img([^>]*)src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);

View file

@ -2,6 +2,7 @@
border:3px solid #DDDDDD;
padding:6px;
width:190px;
margin-bottom:10px;
}
.login_info_default_normal .top_box {