페이지 위젯에 박스 위젯 추가. 각 위젯마다 배경을 지정할 수 있도록 하고 IE에서 메모리 누수 현상이 발생하던 부분을 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2983 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-11-16 10:47:50 +00:00
parent 23ac5b8f54
commit 9124d18a91
31 changed files with 1397 additions and 1001 deletions

View file

@ -836,7 +836,8 @@
**/
function transContent($content) {
// 위젯 코드 변경
$content = preg_replace_callback('!<img([^\>]*)widget=([^\>]*?)\>!is', array($this,'transWidget'), $content);
$oWidgetController = &getController('widget');
$content = $oWidgetController->transWidgetCode($content, false);
// 메타 파일 변경
$content = preg_replace_callback('!<\!\-\-Meta:([^\-]*?)\-\->!is', array($this,'transMeta'), $content);
@ -902,7 +903,7 @@
$buff = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', array($this, _fixQuotation), $buff);
$buff = str_replace("&","&amp;",$buff);
// 위젯에서 생성된 코드 (img, div태그내에 editor_widget코드 존재)의 parameter를 추출
// 에디터 컴포넌트에서 생성된 코드
$oXmlParser = new XmlParser();
$xml_doc = $oXmlParser->parse($buff);
if($xml_doc->div) $xml_doc = $xml_doc->div;
@ -921,38 +922,6 @@
return $oComponent->transHTML($xml_doc);
}
/**
* @brief 위젯 코드를 실제 php코드로 변경
**/
function transWidget($matches, $include_info = false) {
// IE에서는 태그의 특성중에서 " 를 빼어 버리는 경우가 있기에 정규표현식으로 추가해줌
$buff = $matches[0];
$buff = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', array($this, _fixQuotation), $buff);
$buff = str_replace("&","&amp;",$buff);
$oXmlParser = new XmlParser();
$xml_doc = $oXmlParser->parse(trim($buff));
if($xml_doc->img) $vars = $xml_doc->img->attrs;
else $vars = $xml_doc->attrs;
if(!$vars->widget) return "";
// 캐시 체크
$widget_sequence = $vars->widget_sequence;
$widget_cache = $vars->widget_cache;
if($widget_cache && $widget_sequence && !$include_info) {
$output = WidgetHandler::getCache($widget_sequence, $widget_cache);
if($output) return $output;
}
// 위젯의 이름을 구함
$widget = $vars->widget;
unset($vars->widget);
return WidgetHandler::execute($widget, $vars, $include_info);
}
/**
* @brief gzip encoding 여부 체크
**/