이미지 새창 띄우기가 잘 안되내요 정보
이미지 새창 띄우기가 잘 안되내요본문
이미지 새창 뛰우기가 잘 되자 않습니다.
다른 스킨에서는 새창 뛰우기가 잘 되는데 사용할려는 스킨에서만 안되는 것으로 보아
스킨 문제인거 같습니다. 코드를 볼줄 몰라 도움을 요청드립니다.
view 스킨의 내용은
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//길이 설정
// 이미지 가로 갯수
$mod = "5";
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<script type="text/javascript">
// 이미지뷰어
<!--
function view_photo(img_url)
{
window.open("<?=$board_skin_path?>/imgOpen.php?img_url=" + img_url, "photo", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes");
}
//-->
</script>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=80>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/modify.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_clean();
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>제목</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;'>
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:0 10 0 10px;" height="30"><?=$view['wr_subject']?></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td height="30"></td></tr>
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>이미지 (이미지를 클릭하면 원본 이미지를 볼 수 있어요.)</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:10 10 10 10px;">
<?
for ($i=0; $i<=count($view[file]); $i++) {
//썸네일 코드 시작
$data_path = $g4['path'] . "/data/file/{$bo_table}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbView';
$view_w = "160"; //썸네일 가로사이즈
$view_h = "120"; //썸네일 세로사이즈
$sch_q = "100"; //썸네일 퀼리티
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $view[file][$i][file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $view_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $view_h)
$dst = imagecreatetruecolor($view_w, $height);
else
$dst = imagecreatetruecolor($view_w, $view_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}
if (file_exists($thumb) && $filename) {
if ($i && $i%$mod==0) {
echo "<p>";
}
else if ($i > '0') {
echo " ";
}
echo "<IMG src='{$thumb}' onClick=\"view_photo('{$data_path}/{$filename}');\" style='CURSOR:hand; border:1px solid #CCCCCC;'>";
}
}
?></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td height="30"></td>
</tr>
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>전체 줄거리</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:10 10 10 10px;">
<span class="V_content">
<?=$view[content];?>
<?//echo $view[rich_content]; //
과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a></span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30"></td>
</tr>
</table>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr></table>
<script language="JavaScript">
function file_download(link, file) {
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
</script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}
</script>
<!-- 게시글 보기 끝 -->
이렇습니다. 그럼 즐거운 하루 보내세요.
다른 스킨에서는 새창 뛰우기가 잘 되는데 사용할려는 스킨에서만 안되는 것으로 보아
스킨 문제인거 같습니다. 코드를 볼줄 몰라 도움을 요청드립니다.
view 스킨의 내용은
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//길이 설정
// 이미지 가로 갯수
$mod = "5";
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<script type="text/javascript">
// 이미지뷰어
<!--
function view_photo(img_url)
{
window.open("<?=$board_skin_path?>/imgOpen.php?img_url=" + img_url, "photo", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes");
}
//-->
</script>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=80>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/modify.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_clean();
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>제목</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;'>
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:0 10 0 10px;" height="30"><?=$view['wr_subject']?></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td height="30"></td></tr>
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>이미지 (이미지를 클릭하면 원본 이미지를 볼 수 있어요.)</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:10 10 10 10px;">
<?
for ($i=0; $i<=count($view[file]); $i++) {
//썸네일 코드 시작
$data_path = $g4['path'] . "/data/file/{$bo_table}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbView';
$view_w = "160"; //썸네일 가로사이즈
$view_h = "120"; //썸네일 세로사이즈
$sch_q = "100"; //썸네일 퀼리티
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
$filename = $view[file][$i][file]; //파일명
$thumb = $thumb_path.'/'.$filename; //썸네일
if (!file_exists($thumb))
{
$file = $data_path.'/'.$filename; //원본
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $view_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $view_h)
$dst = imagecreatetruecolor($view_w, $height);
else
$dst = imagecreatetruecolor($view_w, $view_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
chmod($thumb_path.'/'.$filename, 0707);
}
}
if (file_exists($thumb) && $filename) {
if ($i && $i%$mod==0) {
echo "<p>";
}
else if ($i > '0') {
echo " ";
}
echo "<IMG src='{$thumb}' onClick=\"view_photo('{$data_path}/{$filename}');\" style='CURSOR:hand; border:1px solid #CCCCCC;'>";
}
}
?></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td height="30"></td>
</tr>
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/icon_check.gif"> <span class=v_tn>전체 줄거리</span></td>
</tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:10 10 10 10px;">
<span class="V_content">
<?=$view[content];?>
<?//echo $view[rich_content]; //

<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a></span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30"></td>
</tr>
</table>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr></table>
<script language="JavaScript">
function file_download(link, file) {
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
</script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}
</script>
<!-- 게시글 보기 끝 -->
이렇습니다. 그럼 즐거운 하루 보내세요.
댓글 전체
페이지 찾을 수 없다는 건 뻔한건데....
imgOpen.php <---이게 주범이 아닐까 싶네요...대문자 O와 화일명 소문자 o의 차이로...
imgOpen.php <---이게 주범이 아닐까 싶네요...대문자 O와 화일명 소문자 o의 차이로...
음 말씀해 주신대로 수정해 보았는데 변함이 없내요. 이쪽이 문제가 아닌거 같습니다 ㅠ
그렇다면 <?=$board_skin_path?>/imgOpen.php 에서 경로내에 imgOpen.php가 없거나
경로가 잘못 된 거 같은데요?
경로가 맞고 화일이 존재한다면 페이지 없다고 출력될 리가 없겠지요
경로가 잘못 된 거 같은데요?
경로가 맞고 화일이 존재한다면 페이지 없다고 출력될 리가 없겠지요
감사합니다 균이님. ^^
알려주신 대로 imgopen.php 파일이 어째 스킨 폴더에 없더라구요 ㅎ 그래서 새로 설치했더니
말끔하게 동작하내요. 다시 한번 감사드리고요. 즐거운 하루 되새요 ^^
알려주신 대로 imgopen.php 파일이 어째 스킨 폴더에 없더라구요 ㅎ 그래서 새로 설치했더니
말끔하게 동작하내요. 다시 한번 감사드리고요. 즐거운 하루 되새요 ^^