diff --git a/bbs/view_image.php b/bbs/view_image.php
new file mode 100644
index 000000000..bcc110031
--- /dev/null
+++ b/bbs/view_image.php
@@ -0,0 +1,89 @@
+';
+} else {
+ alert_close('파일이 존재하지 않습니다.');
+}
+?>
+
+
+
+
=$img?>
+
+
+
+
\ No newline at end of file
diff --git a/lib/common.lib.php b/lib/common.lib.php
index f07710a6c..3b70f9303 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -1047,10 +1047,13 @@ function view_file_link($file, $width, $height, $content='')
else
$attr = '';
- if (preg_match("/\.({$config['cf_image_extension']})$/i", $file))
- // 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
- // 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
- return "
";
+ if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
+ $img = '';
+ $img .= '
';
+ $img .= '';
+
+ return $img;
+ }
}
diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php
index 7daa2bf92..fd52ba4aa 100644
--- a/skin/board/basic/view.skin.php
+++ b/skin/board/basic/view.skin.php
@@ -186,18 +186,25 @@ $(window).load(function() {
view_image_resize();
});
+$(function() {
+ $("a.view_image").click(function() {
+ window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
+ return false;
+ });
+});
+
function view_image_resize()
{
- var $img = $('#bo_v_atc img');
- var img_wrap = $('#bo_v_atc').width();
+ var $img = $("#bo_v_atc img");
+ var img_wrap = $("#bo_v_atc").width();
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
- $(this).addClass('img_fix');
+ $(this).addClass("img_fix");
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
- $(this).removeClass('img_fix');
+ $(this).removeClass("img_fix");
}
});
}