1. 아래와 같은 파일(view_image.php)을 하나 만들어 제로보드(bbs)폴더에 업로드합니다.
2. 다음의 수정을 합니다.
2.1. 수정해야 되는 파일
/제로보드 설치폴더/include/list_check.php
2.2. 수정해야 되는 부분
수정전
수정후
<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>
<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(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>";
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>";
'Tip&Tech > Zeroboard' 카테고리의 다른 글
제로보드XE 에 발 담그다! (2) | 2007.10.29 |
---|---|
[팁] 제로보드에서 사용자가 로그인을 했는지 여부를 확인할 수 있는 방법 (0) | 2007.08.04 |
제로보드 최근 게시물 새글 작성시 New이미지 뜨게 하는 방법! (0) | 2007.01.10 |
이미지 크기 자동 리사이징 하기 (0) | 2007.01.06 |
이미지 링크시 본문에 해당이미지 보여주기 (0) | 2007.01.06 |