게시물에 이미지가 있을경우 클릭하면 팝업으로 뜨는데

게시물에 이미지가 있을경우 클릭하면 팝업으로 뜨는데

QA

게시물에 이미지가 있을경우 클릭하면 팝업으로 뜨는데

본문

글읽기 할경우 이미지 클릭하면 팝업으로 뜨는데 클릭이 안되게 하거나 팝업이 안뜨게 하는 방법이 있을까요?

아래 소스가 이미지 출력해 주는 부분 같은데 여기에서는 방법이 없는거 같은데 어디서 해줘야 할까요?

view.skin.php 소스 일부분 입니다.

<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
    if ($view[file][$i][source] && !$view[file][$i][view]) {
        $cnt++;
        echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
        echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
 //       echo " <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
        echo "<span style=\"color:#888; font-size:11px;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span></a>";
        echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
        echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
        echo "</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=30 background=\"$board_skin_path/img/view_dot.gif\">";
        echo "  <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle border='0'>";
        echo "<a href='{$view[link_href][$i]}' target=_blank>";
        echo " <span style=font-size:8pt;><span style=\"color:#888;\">{$link}</span>";
        //echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[link_hit][$i]}]</span>";
        echo "</a></td></tr>";
    }
}
?>

 <!-- 내용 출력 -->
<tr><td><br> <span id="writeContents"><?=$view[content];?></span></td></tr>
<tr> 
    <td height="200" valign="top" align="center" style="word-break:break-all; padding:20px 0 20px 0;">
        <? 
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view]) 
                echo $view[file][$i][view] . "<p>";
        }
        ?>
        
        <?//echo $view[rich_content]; // view_image($view, '0', '') 과 같은 코드를 사용할 경우?>
        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
        <? if ($nogood_href) {?>
        <div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
        <div style="color:#888; margin:7px 0 5px 0;">비추천 : <?=number_format($view[wr_nogood])?></div>
        <div><a href="<?=$nogood_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align="absmiddle"></a></div>
        </div>
        <? } ?>
        <? if ($good_href) {?>
        <div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
        <div style="color:#888; margin:7px 0 5px 0;"><span style='color:crimson;'>추천 : <?=number_format($view[wr_good])?></span></div>
        <div><a href="<?=$good_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align="absmiddle"></a></div>
        </div>
        <? } ?>

이 질문에 댓글 쓰기 :

답변 3

lib/common.lib.php 파일에서

 

펑션 view_file_link 에 내용중에 (약1400번줄?)


    if (preg_match("/\.({$config['cf_image_extension']})$/i", $file) && isset($board['bo_table'])) {
        //$attr_href = run_replace('thumb_view_image_href', G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($file), $file, $board['bo_table'], $width, $height, $content);
        //$img = '<a href="'.$attr_href.'" target="_blank" class="view_image">';
        $img .= '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'" '.$attr.'>';
        //$img .= '</a>';
        return $img;
    }

a태그로 감싼부분을 주석처리해주세요

 

bbs/view.php 파일에 보시면


$view[content] = preg_replace("/(\<img )([^\>]*)(\>)/i", "\\1 name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' \\2 \\3", $view[content]);

이 부분에서 onclick='image_window(this)' 을 삭제해보세요.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,662 | RSS
QA 내용 검색

회원로그인

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