mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@617 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
085eac5258
commit
052f5bd2b3
9 changed files with 38 additions and 23 deletions
|
|
@ -706,7 +706,8 @@
|
|||
**/
|
||||
function transContent($content) {
|
||||
// 에디터 컴포넌트를 찾아서 결과 코드로 변환
|
||||
$content = preg_replace_callback('!<(div|img)([^\>]*)editor_component=([^\>]*?)>!is', array($this,'_transEditorComponent'), $content);
|
||||
$content = preg_replace_callback('!<div([^\>]*)editor_component=([^\>]*?)>([^\>]*?)\<\/div\>!is', array($this,'_transEditorComponent'), $content);
|
||||
$content = preg_replace_callback('!<img([^\>]*)editor_component=([^\>]*?)\>!is', array($this,'_transEditorComponent'), $content);
|
||||
|
||||
// <br> 코드 변환
|
||||
$content = preg_replace('/<br([^>\/]*)(\/>|>)/i','<br$1 />', $content);
|
||||
|
|
@ -729,6 +730,7 @@
|
|||
// 플러그인에서 생성된 코드 (img, div태그내에 plugin코드 존재)의 parameter를 추출
|
||||
$oXmlParser = new XmlParser();
|
||||
$xml_doc = $oXmlParser->parse($buff);
|
||||
if($xml_doc->div) $xml_doc = $xml_doc->div;
|
||||
|
||||
// plugin attribute가 없으면 return
|
||||
$editor_component = $xml_doc->attrs->editor_component;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
$oPlugin = PluginHandler::getObject($plugin);
|
||||
|
||||
// 플러그인 실행
|
||||
$output = $oPlugin->proc($args);
|
||||
print $output;
|
||||
//$output = $oPlugin->proc($args);
|
||||
//print $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
|
||||
return sprintf("<div><script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\",%s);</script></div><div>", $src, $width, $height, $auto_start);
|
||||
return sprintf("<div><script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\",%s);</script></div>", $src, $width, $height, $auto_start);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ function getMultimedia() {
|
|||
|
||||
xGetElementById("multimedia_url").value = url;
|
||||
xGetElementById("multimedia_caption").value = caption;
|
||||
xGetElementById("multimedia_width").value = width;
|
||||
xGetElementById("multimedia_height").value = height;
|
||||
xGetElementById("multimedia_width").value = width-6;
|
||||
xGetElementById("multimedia_height").value = height-6;
|
||||
if(auto_start=="true") xGetElementById("multimedia_auto_start").checked = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
|
||||
$body_code = sprintf('<div style="width:%dpx;height:%dpx;"><iframe src="%s?module=editor&act=procCall&method=displayMap&component=naver_map&width=%s&height=%s&x=%s&y=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $width, $height);
|
||||
$body_code = sprintf('<div style="width:%dpx;height:%dpx;"><iframe src="%s?module=editor&act=procCall&method=displayMap&component=naver_map&width=%s&height=%s&x=%s&y=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $width, $height);
|
||||
return $body_code;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
$border_thickness = $xml_obj->attrs->border_thickness;
|
||||
$border_color = $xml_obj->attrs->border_color;
|
||||
$bg_color = $xml_obj->attrs->bg_color;
|
||||
$body = $xml_obj->body;
|
||||
|
||||
$output = "";
|
||||
$style = sprintf('margin:%spx;padding:%spx;background-color:#%s;', $margin, $padding, $bg_color);
|
||||
|
|
@ -97,10 +98,9 @@
|
|||
$output .= sprintf('<div id="folder_open_%s" style="margin:%s;display:block;"><a class="%s" href="#" onclick="zbxe_folder_open(\'%s\');return false;">%s</a></div>', $folder_id, $folder_margin, $class, $folder_id, $folder_opener);
|
||||
$output .= sprintf('<div id="folder_close_%s" style="margin:%s;display:none;"><a class="%s" href="#" onclick="zbxe_folder_close(\'%s\');return false;">%s</a></div>', $folder_id, $folder_margin, $class, $folder_id, $folder_closer);
|
||||
|
||||
$output .= sprintf('<div style="%s" id="folder_%s">', $style, $folder_id);
|
||||
debugPrint($output);
|
||||
$output .= sprintf('<div style="%s" id="folder_%s">%s</div>', $style, $folder_id,$body);
|
||||
} else {
|
||||
$output .= sprintf('<div style="%s">', $style);
|
||||
$output .= sprintf('<div style="%s">%s</div>', $style, $body);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,22 @@
|
|||
function transHTML($xml_obj) {
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$make_thumbnail = $xml_obj->attrs->make_thumbnail;
|
||||
$body = $xml_obj->body;
|
||||
$image_list = explode("\n",$body);
|
||||
|
||||
$output = sprintf('<div style="width:%s;height:%s">%s</div>', $width, $height, $body);
|
||||
return $output;
|
||||
Context::set("slide_show_width", $width);
|
||||
Context::set("slide_show_height", $height);
|
||||
Context::set("slide_show_images", $image_list);
|
||||
Context::set("slide_show_srl", rand(111111,999999));
|
||||
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'slide_show.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
require_once("./classes/template/TemplateHandler.class.php");
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
<!--%import("slide_show.js")-->
|
||||
<!--%import("slide_show.css")-->
|
||||
<script type='text/javascript'>
|
||||
var _tmp_srl = {$srl};
|
||||
var _tmp_srl = {$slide_show_srl};
|
||||
z_gallery_opacity[_tmp_srl] = 0.3;
|
||||
z_gallery_highlight_speed[_tmp_srl] = 50; // ms
|
||||
z_gallery_highlight_opacity[_tmp_srl] = 0.1;
|
||||
|
||||
{foreach from=$file_list item=obj}
|
||||
{if $obj->thumbnail_url}
|
||||
z_add_gallery(_tmp_srl,'{$obj->thumbnail_url}','{$obj->download_url}');
|
||||
{/if}
|
||||
{/foreach}
|
||||
<!--@foreach($slide_show_images as $image)-->
|
||||
z_add_gallery(_tmp_srl,'{$image}','{$image}');
|
||||
<!--@end-->
|
||||
</script>
|
||||
|
||||
<div style="border:1px solid #DDDDDD;">
|
||||
<div id='zone_gallery_{$srl}' style='width:auto;background-Color:#FFFFFF;padding:10px 10px 10px 10px;text-align:center;'>
|
||||
<div style="border:1px solid #DDDDDD;width:{$slide_show_width}px;">
|
||||
<div id='zone_gallery_{$slide_show_srl}' style='width:{$slide_show_width}px;background-Color:#FFFFFF;padding:10px 10px 10px 10px;text-align:center;'>
|
||||
<span style="color:#000000;font-size:8pt;">loading...</span>
|
||||
</div>
|
||||
|
||||
<div id='zone_thumbnail_{$srl}' style='width:auto;background-Color:#FFFFFF;padding:10px 10px 10px 10px;text-align:center;'></div>
|
||||
<div id='zone_thumbnail_{$slide_show_srl}' style='width:{$slide_show_width}px;background-Color:#FFFFFF;padding:10px 10px 10px 10px;text-align:center;'></div>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ function z_start_gallery() {
|
|||
_obj_thumbnail[srl][idx].srl = srl;
|
||||
_obj_thumbnail[srl][idx].idx = idx;
|
||||
_obj_thumbnail[srl][idx].style.cursor = 'pointer';
|
||||
_obj_thumbnail[srl][idx].style.width = '60px';
|
||||
_obj_thumbnail[srl][idx].style.height= '60px';
|
||||
if(idx == _gallery_idx[srl]) {
|
||||
_obj_thumbnail[srl][idx].style.opacity = 1;
|
||||
_obj_thumbnail[srl][idx].style.filter = "alpha(opacity=100)";
|
||||
|
|
@ -114,8 +116,8 @@ function z_show_gallery(srl, idx) {
|
|||
obj_gallery.style.cursor = 'pointer';
|
||||
|
||||
obj_gallery.start_opacity = 0;
|
||||
obj_gallery.style.width = obj['gallery'].width;
|
||||
obj_gallery.style.height = obj['gallery'].height;
|
||||
obj_gallery.style.width = obj['gallery'].width+"px";
|
||||
obj_gallery.style.height = obj['gallery'].height+"px";
|
||||
obj_gallery.style.opacity = 0;
|
||||
obj_gallery.style.filter = "alpha(opacity=0)";
|
||||
obj_gallery.start_opacity = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue