diff --git a/modules/editor/components/image_link/image_link.class.php b/modules/editor/components/image_link/image_link.class.php
index 27bc066a2..963bdb5bf 100644
--- a/modules/editor/components/image_link/image_link.class.php
+++ b/modules/editor/components/image_link/image_link.class.php
@@ -41,28 +41,42 @@
**/
function transHTML($xml_obj) {
$src = $xml_obj->attrs->src;
- $style = $xml_obj->attrs->style;
$width = $xml_obj->attrs->width;
$height = $xml_obj->attrs->height;
$align = $xml_obj->attrs->align;
+ $alt = $xml_obj->attrs->alt;
$border = $xml_obj->attrs->border;
+ $link_url = $xml_obj->attrs->link_url;
+ $open_window = $xml_obj->attrs->open_window;
- $tmp_arr = explode('/',$src);
- $alt = array_pop($tmp_arr);
+ if(!$alt) {
+ $tmp_arr = explode('/',$src);
+ $alt = array_pop($tmp_arr);
+ }
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
if(!$alt) $alt = $src;
- $output = array();
- $output = array("src=\"".$src."\"");
- if($alt) $output[] = "alt=\"".$alt."\"";
- if($alt) $output[] = "title=\"".$alt."\"";
- if($width) $output[] = "width=\"".$width."\"";
- if($height) $output[] = "height=\"".$height."\"";
- if($align) $output[] = "align=\"".$align."\"";
- if($border) $output[] = "border=\"".$border."\"";
- if($style) $output[] = "style=\"".$style."\"";
- return "";
+ $attr_output = array();
+ $style_output = array();
+ $attr_output = array("src=\"".$src."\"");
+ if($alt) {
+ $attr_output[] = "alt=\"".$alt."\"";
+ $attr_output[] = "title=\"".$alt."\"";
+ }
+ if($align) $attr_output[] = "align=\"".$align."\"";
+
+ 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("
", implode(" ",$attr_output), implode(";",$style_output));
+
+ if($link_url) {
+ if($open_window =='Y') $code = sprintf('%s', $link_url, $code);
+ else $code = sprintf('%s', $link_url, $code);
+ }
+ return $code;
}
}
diff --git a/modules/editor/components/image_link/lang/en.lang.php b/modules/editor/components/image_link/lang/en.lang.php
index 61f348452..ecc125a8f 100644
--- a/modules/editor/components/image_link/lang/en.lang.php
+++ b/modules/editor/components/image_link/lang/en.lang.php
@@ -14,6 +14,8 @@
$lang->image_align_middle = "Center";
$lang->image_align_right = "Right of Article";
$lang->image_border = "Border Thickness";
+ $lang->urllink_url = "URL";
+ $lang->about_url_link_open_window = "Make the link to open as a new window";
$lang->cmd_get_scale = "Get Image Size";
?>
diff --git a/modules/editor/components/image_link/lang/jp.lang.php b/modules/editor/components/image_link/lang/jp.lang.php
index cfe60220c..9aee062dd 100644
--- a/modules/editor/components/image_link/lang/jp.lang.php
+++ b/modules/editor/components/image_link/lang/jp.lang.php
@@ -14,6 +14,8 @@
$lang->image_align_middle = "中央揃え";
$lang->image_align_right = "右揃え";
$lang->image_border = "ボーダー";
+ $lang->urllink_url = "URL";
+ $lang->about_url_link_open_window = "チェックするとリンクをクリックした時に、新しいウィンドウで開きます。";
$lang->cmd_get_scale = "サイズ表示";
?>
diff --git a/modules/editor/components/image_link/lang/ko.lang.php b/modules/editor/components/image_link/lang/ko.lang.php
index 14e25d203..d8f9bfbbe 100644
--- a/modules/editor/components/image_link/lang/ko.lang.php
+++ b/modules/editor/components/image_link/lang/ko.lang.php
@@ -15,5 +15,8 @@
$lang->image_align_right = "글의 우측으로";
$lang->image_border = "경계선 두께";
+ $lang->urllink_open_window = "새창열기";
+ $lang->about_url_link_open_window = "선택하시면 링크 선택시 새창으로 열립니다";
+
$lang->cmd_get_scale = "크기 구하기";
?>
diff --git a/modules/editor/components/image_link/lang/zh-CN.lang.php b/modules/editor/components/image_link/lang/zh-CN.lang.php
index 2a06e0512..72163ad03 100644
--- a/modules/editor/components/image_link/lang/zh-CN.lang.php
+++ b/modules/editor/components/image_link/lang/zh-CN.lang.php
@@ -14,6 +14,8 @@
$lang->image_align_middle = "居中";
$lang->image_align_right = "内容右侧";
$lang->image_border = "边框粗细";
+ $lang->urllink_url = "URL";
+ $lang->about_url_link_open_window = "将在新窗口中打开链接。";
$lang->cmd_get_scale = "获得图片大小";
?>
diff --git a/modules/editor/components/image_link/tpl/popup.html b/modules/editor/components/image_link/tpl/popup.html
index 3ea64c262..b0f190e4e 100644
--- a/modules/editor/components/image_link/tpl/popup.html
+++ b/modules/editor/components/image_link/tpl/popup.html
@@ -21,12 +21,20 @@