이미지링크 에디터 컴포넌트에서 게시글에 삽입한 스타일을 그대로 준수하지 못하던 문제 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3142 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-12-03 06:19:03 +00:00
parent 2a66d2d8fe
commit 2435756679

View file

@ -45,9 +45,10 @@
$height = $xml_obj->attrs->height;
$align = $xml_obj->attrs->align;
$alt = $xml_obj->attrs->alt;
$border = $xml_obj->attrs->border;
$border = (int)$xml_obj->attrs->border;
$link_url = $xml_obj->attrs->link_url;
$open_window = $xml_obj->attrs->open_window;
$style = $xml_obj->attrs->style;
if(!$alt) {
$tmp_arr = explode('/',$src);
@ -58,7 +59,6 @@
if(!$alt) $alt = $src;
$attr_output = array();
$style_output = array();
$attr_output = array("src=\"".$src."\"");
if($alt) {
$attr_output[] = "alt=\"".$alt."\"";
@ -68,11 +68,11 @@
if(eregi("\.png$",$src)) $attr_output[] = "class=\"iePngFix\"";
if($width) $style_output[] = "width:".$width."px";
if($height) $style_output[] = "height:".$height."px";
//if(!$align) $style_output[] = "display:block";
if($border) $style_output[] = "border:".$border."px";
$code = sprintf("<img %s style=\"%s\" />", implode(" ",$attr_output), implode(";",$style_output));
if($width) $attr_output[] = 'width="'.$width.'"';
if($height) $attr_output[] = 'height="'.$height.'"';
if($border) $attr_output[] = 'border="'.$border.'"';
$code = sprintf("<img %s style=\"%s\" />", implode(" ",$attr_output), $style);
if($link_url) {
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);