Tip&Tech/Zeroboard2007.01.06 02:47
1. 아래와 같은 파일(view_image.php)을 하나 만들어 제로보드(bbs)폴더에 업로드합니다.
<html>
<head>
<title>Screen Shot</title>
<meta http-equiv=Content-Type content=text/html; charset=EUC-KR>
</head>
<script language="javascript">
function processKey()
{
        if( (event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) ||
        (event.keyCode >= 112 && event.keyCode <= 123) || event.keyCode == 8)
            {
        event.keyCode = 0;
        event.cancelBubble = true;
        event.returnValue = false;
            }
}
document.onkeydown = processKey;
</script>

<script language="javascript">
var isNav4, isIE4;
var windowX, windowY;
var bLargeImage = 0;
var x,y;
if (parseInt(navigator.appVersion.charAt(0)) >= 4)
{
    isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
    isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize()
{
    if (isNav4) {
        window.innerWidth = document.layers[0].document.images[0].width;
        window.innerHeight = document.layers[0].document.images[0].height;
    }
    if (isIE4) {
        window.resizeTo(500, 500);
        width = 500 - (document.body.clientWidth -  document.images[0].width);
        height = 500 - (document.body.clientHeight -  document.images[0].height)
        windowX = (window.screen.width-width)/2;
        windowY = (window.screen.height-height)/2;
        if(width>screen.width){
            width = screen.width;
            windowX = 0;
            bLargeImage = 1;
        }
        if(height>screen.height-50){
            height = screen.height-50;
            windowY = 0;
            bLargeImage = 1;
        }
        x = width/2;
        y = height/2;
        window.moveTo(windowX,windowY);
        window.resizeTo(width, height);
    }
}
function move()
{
    if(bLargeImage)
    window.scroll(window.event.clientX - 50,window.event.clientY -50);
}
</script>
<body onLoad="fitWindowSize()" onmousemove="move();" leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>
<A href=# onclick=window.close()><img src=<?=$filename?> border=0></a>
</body>
</html>


2. 다음의 수정을 합니다.
2.1. 수정해야 되는 파일
/제로보드 설치폴더/include/list_check.php

2.2. 수정해야 되는 부분
수정전
$upload_image1=$upload_image2="";
if(eregi("\.jpg",$file_name1)||eregi("\.gif",$file_name1)||eregi("\.png",$file_name1)) $upload_image1="<img src=$data[file_name1]
border=0 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src)><br>";
if(eregi("\.jpg",$file_name2)||eregi("\.gif",$file_name2)||eregi("\.png",$file_name2)) $upload_image2="<img src=$data[file_name2]
border=0 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src)><br>";


수정후
if(eregi("\.jpg",$file_name1)||eregi("\.gif",$file_name1)||eregi("\.png",$file_name1)) $upload_image1="<img src=$data[file_name1]
border=0 name=zb_target_resize style=\"cursor:hand\"
onclick=window.open('view_image.php?filename=$data[file_name1]','screenshot1','width=$image_info[0], height=$image_info[1],scrollbars=no,toolbars=no')><br>";

if(eregi("\.jpg",$file_name2)||eregi("\.gif",$file_name2)||eregi("\.png",$file_name2)) $upload_image2="<img src=$data[file_name2]
border=0 name=zb_target_resize style=\"cursor:hand\"
onclick=window.open('view_image.php?filename=$data[file_name2]','screenshot2','width=$image_info[0], height=$image_info[1],scrollbars=no,toolbars=no')><br>";

신고

이 글은 새로운 정보가 추가될 때마다 업데이트됩니다. 추천으로 아래 숫자에 1을 더해보세요. :)
RSS구독을 하시면 포스트를 배달해 드립니다. ▷ 한RSS 구독하기, 구글리더 구독하기

댓글을 달아 주세요


티스토리 툴바