html로 작성된 게시물 이미지 새창 안띠울려면?? 정보
html로 작성된 게시물 이미지 새창 안띠울려면??본문
html로 작성된 게시물을 올리면 게시물안에 편집된 이미지가 링크가걸려 새창으로 뜹니다,
새창으로 안띄울려면 어떻게 하는지요..
view.skin.php 는 이렇게 되어 있습니다,,
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<? if ($member[mb_level] >= 8) { ?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<?
ob_start();
?>
<? if ($member[mb_level] >= 8) { ?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_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/btn_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/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<? } ?>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="150" valign="top" style='word-break:break-all; padding:10px;'>
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<span class="ct lh"><?=$view[content];?></span>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
</td>
</tr>
</table>
</td></tr></table>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_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/btn_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/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<? } ?>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="150" valign="top" style='word-break:break-all; padding:10px;'>
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<span class="ct lh"><?=$view[content];?></span>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
</td>
</tr>
</table>
</td></tr></table>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
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>
<!-- 게시글 보기 끝 -->
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
어느부분을 고쳐야 하는지 고수님들 자세하게좀 가르쳐 주시기 바랍니다.
댓글 전체
그누보드 이미지 등록시 링크가 되어 팝업으로 뜨는 것은 view.skin.php 에 소스가 포함되어져 있는게 아니라
그누보드 lib 폴더 안에 common.lib.php 파일이 있습니다. 그 파일을 에디터로 열어보시면 주석으로
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상) 라고 표시되어져 있는 function view_file_link() 함수가
있습니다. 라인수로는 870라인 이고요 그 함수 보시면 898번 라인에 img 소스가 있을 거에요.
return "<img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'>";
위와 같은 코드를 찾으셨으면 그곳에서 onclick='image_window(this);' style='cursor:pointer;' 부분을 삭제해
주시면 팝업이 뜨지 않을 겁니다 그럼 수고하세요~
그누보드 lib 폴더 안에 common.lib.php 파일이 있습니다. 그 파일을 에디터로 열어보시면 주석으로
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상) 라고 표시되어져 있는 function view_file_link() 함수가
있습니다. 라인수로는 870라인 이고요 그 함수 보시면 898번 라인에 img 소스가 있을 거에요.
return "<img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'>";
위와 같은 코드를 찾으셨으면 그곳에서 onclick='image_window(this);' style='cursor:pointer;' 부분을 삭제해
주시면 팝업이 뜨지 않을 겁니다 그럼 수고하세요~
comet님 답변 감사합니다..하지만 위의 방법으로 수정햇는데 안되네요.
다시한번 검색을 해보니 저와 똑같은 경우가 있었내요.
http://sir.co.kr/bbs/tb.php/g4_qa/24791 여기방법 대로 하니 이미지가 새창으로
뜨지는 않으나 이미지에 마우스를대면 마우스커서가 링크모양으로는 여전히 변화내요
이것도좀 해결 됬으면 좋겠는데...
comet님 답변 감사 했습니다^^
다시한번 검색을 해보니 저와 똑같은 경우가 있었내요.
http://sir.co.kr/bbs/tb.php/g4_qa/24791 여기방법 대로 하니 이미지가 새창으로
뜨지는 않으나 이미지에 마우스를대면 마우스커서가 링크모양으로는 여전히 변화내요
이것도좀 해결 됬으면 좋겠는데...
comet님 답변 감사 했습니다^^
음... 테스트해보고 한건데 이상하네여 ^^; 죄송...
마우스 링크 모양은 style='cursor:pointer;' 이 태크로 인해서 생기는 거니까 이 태그를 한번 찾아보세요~
마우스 링크 모양은 style='cursor:pointer;' 이 태크로 인해서 생기는 거니까 이 태그를 한번 찾아보세요~