본문 에서 이미지 삽입시 클릭하면 팝업으로 이미지가 뜨는데... > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

본문 에서 이미지 삽입시 클릭하면 팝업으로 이미지가 뜨는데... 정보

본문 에서 이미지 삽입시 클릭하면 팝업으로 이미지가 뜨는데...

본문

게시판을 일반 html 스킨으로 사용하고 있는데...
 
본문에서 이미지를 첨부한다거나 (뭐 이건 크게 상관은 없지만) 이미지를 링크시키면,,,
 
이미지 클릭시 팝업으로 이미지가 뜨는데요... 해당 스킨만 이미지가 팝업으로 안뜨게 하려면...
 
 
아래 그림을 누르면 팝업으로 뜨는데 그건 없애려고 하는 겁니다. 해당스킨만요...
 
 
01.jpg

댓글 전체

기존 VIEW.SKIN.PHP


<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
    if ($view[file][$i][view])
        echo $view[file][$i][view] . "<p>";
}
?>

------------------------------------------------------------------------

수정후 VIEW.SKIN.PHP

<?
 // 파일 출력
 for ($i=0; $i<=count($view[file]); $i++) {
 if($view[file][$i][view])
 //이미지 링크를 없앤다.....유료이미지 일때...아니면 회원 일때..
 $view[file][$i][view] =
 str_replace("onclick='image_window(this);' style='cursor:pointer;'","",$view[file][$i][view]); 
 echo $view[file][$i][view] . "<p>";         
 }
 ?> 

------------------------------------------------------------------------


이렇게 수정을 했는데... 여전히 창이 잘뜨네요.. 회원 비회원 상관없이요.

아예 없애는 방법 없을까요? 다시 문의 드립니다. 뭐가 잘못 된 걸까요...
VIEW.SKIN.PHP 내용 입니다.
-------------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>




<table width="100%" cellspacing="0" cellpadding="0">
<!--tr><td>

<table cellspacing=0 cellpadding=0 width=100%>
<tr><td colspan=3 height=15></td></tr>
<tr>
<td width=4></td>
<td>
<img src="<?=$board_skin_path?>/img/icon.gif" align=absmiddle> <SPAN STYLE=FONT-SIZE:11PT><STRONG><?=$view[subject]?></STRONG></SPAN></H>
</td>
<td align=right> <SPAN STYLE=FONT-SIZE:8PT;color:#333333>현재위치: 홈 > <?=$board[bo_subject] ?> > <?=$view[subject]?></SPAN></td>
<td width=10></td>
</tr>
<tr><td colspan=4 height=5></td></tr>
</table>

</td></tr-->


<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++)
{
    if ($view[file][$i][source] && !$view[file][$i][view])
    {
        $cnt++;
        //echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
        echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
    }
}

// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
    if ($view[link][$i])
    {
        $cnt++;
        $link = cut_str($view[link][$i], 70);
        echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle> <a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a></td></tr>";
    }
}
?>


<tr>
    <td height="150">
        <?
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view])
                echo $view[file][$i][view] . "<p>";
        }
        ?>

        <span class="ct"><?=$view[content];?></span>
       
        <?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
       
        <? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
</table>

<?
//include_once("./view_comment.php");
?>

<!-- 링크 버튼 -->
<?
ob_start();
?>

<? if ($admin_href) { ?>
<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 ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.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 ($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 ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.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>&nbsp;"; } ?>
        <? 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>&nbsp;"; } ?>
    </td>
</tr>
</table>

<?}?>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>

</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;

    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);
        }
    }
}

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>
<!-- 게시글 보기 끝 -->
<IMG  name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' style="WIDTH: 600px; HEIGHT: 450px" src="http://sir.co.kr/data/cheditor/0608/01.jpg" >
여기서

str_replace("onclick='image_window(this);' style='cursor:pointer;'","",$view[file][$i][view]); 


를 가지고 onclick 이벤트와 마우스 커서를 없애는 겁니다.
어떤 이유던지 안 된다면


        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view])
                echo $view[file][$i][view] . "<p>";
        }
        ?>



        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view])
                echo "<p><img src='".$view[file][$i][path] .'/'.$view[file][$i][file] "'></p>";
        }
        ?>

로 바꿔 보시는 것은 어떨까요?
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT