첨부 그림파일 손모양 안 생기게 하는 방법 > 그누4 질문답변

그누4 질문답변

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

첨부 그림파일 손모양 안 생기게 하는 방법 정보

첨부 그림파일 손모양 안 생기게 하는 방법

본문

<?
/**
 * Bechu-Basic Skin for Gnuboard4
 *
 * Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  *** 개인정보보호를 위한 전화번호 노출방지 ***  USA
 */

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

include_once("$board_skin_path/mw.lib/mw.skin.basic.lib.php");

// 링크게시판
if ($mw_basic[cf_link_board] && !$is_admin) {
    goto_url("board.php?bo_table=$bo_table$qstr");
}

$prev_wr_subject = str_replace("\"", "'", $prev_wr_subject);
$next_wr_subject = str_replace("\"", "'", $next_wr_subject);

if ($is_admin && strstr($write[wr_option], "secret")) {
    // 잠금 해제 버튼
    $nosecret_href = "javascript:btn_nosecret();";
} else if ($is_admin) {
    // 잠금 버튼
    $secret_href = "javascript:btn_secret();";
}

// 파일로그
if ($mw_basic[cf_download_log] && $is_admin) {
    $download_log_href = "javascript:btn_download_log()";
}

// 로그버튼
if ($mw_basic[cf_post_history] && $member[mb_level] >= $mw_basic[cf_post_history_level]) {
    $history_href = "javascript:btn_history($wr_id)";
}

// 신고 버튼
if ($mw_basic[cf_singo]) {
    $singo_href = "javascript:btn_singo($wr_id, $wr_id)";
}

// 쓰기버튼 항상 출력
if ($mw_basic[cf_write_button])
    $write_href = "./write.php?bo_table=$bo_table";

// 글쓰기 버튼 공지
if ($write_href && $mw_basic[cf_write_notice]) {
    $write_href = "javascript:btn_write_notice('$write_href');";
}

// RSS 버튼
$rss_href = "";
if ($board[bo_use_rss_view])
    $rss_href = "./rss.php?bo_table=$bo_table";

// 파일 출력
ob_start();
for ($i=0; $i<=$view[file][count]; $i++) {
    if ($mw_basic[cf_img_1_noview] && $i==0) continue;
    if ($view[file][$i][view]) {
        if ($board[bo_image_width] < $view[file][$i][image_width]) { // 이미지 크기 조절
            $img_width = $board[bo_image_width];
        } else {
            $img_width = $view[file][$i][image_width];
        }
        $view[file][$i][view] = str_replace("<img", "<img width=\"{$img_width}\"", $view[file][$i][view]);

 if ($mw_basic[cf_exif]) {
     $view[file][$i][view] = str_replace("image_window(this)", "show_exif($i, this, event)", $view[file][$i][view]);
     $view[file][$i][view] = str_replace("title=''", "title='클릭하면 메타데이터를 보실 수 있습니다.'", $view[file][$i][view]);
 } else {
     $view[file][$i][view] = str_replace("onclick='image_window(this);'",
  "onclick='mw_image_window(this, {$view[file][$i][image_width]}, {$view[file][$i][image_height]});'", $view[file][$i][view]);
     // 제나빌더용 (그누보드 원본수정으로 인해 따옴표' 가 없음;)
     $view[file][$i][view] = str_replace("onclick=image_window(this);",
  "onclick='mw_image_window(this, {$view[file][$i][image_width]}, {$view[file][$i][image_height]});'", $view[file][$i][view]);
 }
        echo $view[file][$i][view] . "<br/><br/>";
    }
}
$file_viewer = ob_get_contents();
ob_end_clean();

$view[rich_content] = preg_replace("/{이미지\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view[content]);

// 웹에디터 이미지 클릭시 원본 사이즈 조정
$data = $view[rich_content];
preg_match_all("/<img\s+name='target_resize_image\[\]' onclick='image_window\(this\)'.*src=\"(.*)\"/iUs", $data, $matchs);
for ($i=0; $i<count($matchs[1]); $i++) {
    $match = $matchs[1][$i];
    if (strstr($match, $g4[url])) { // 웹에디터로 첨부한 이미지 뿐 아니라 다양한 상황을 고려함.
        $path = str_replace($g4[url], "..", $match);
    } elseif (substr($match, 0, 1) == "/") {
        $path = $_SERVER[DOCUMENT_ROOT].$match;
    } else {
        $path = $match;
    }
    $size = @getimagesize($path);
    if ($size[0] && $size[1]) {
        $match = str_replace("/", "\/", $match);
        $match = str_replace(".", "\.", $match);
        $match = str_replace("+", "\+", $match);
        $pattern = "/(onclick=[\'\"]{0,1}image_window\(this\)[\'\"]{0,1}) (.*)(src=\"$match\")/iU";
        $replacement = "onclick='mw_image_window(this, $size[0], $size[1])' $2$3";
        if ($size[0] > $board[bo_image_width])
            $replacement .= " width=\"$board[bo_image_width]\"";
        $data = preg_replace($pattern, $replacement, $data);
    }
}
$view[rich_content] = $data;

// 추천링크 방지
$view[rich_content] = preg_replace("/bbs\/good\.php\?/i", "#", $view[rich_content]);

$view[rich_content] = mw_set_sync_tag($view[rich_content]);

// 조회수, 추천수, 비추천수 컴마
if ($mw_basic[cf_comma]) {
    $view[wr_hit] = number_format($view[wr_hit]);
    $view[wr_good] = number_format($view[wr_good]);
    $view[wr_nogood] = number_format($view[wr_nogood]);
}

// 컨텐츠샵
$mw_price = "";
if ($mw_basic[cf_contents_shop]) {
    if (!$view[wr_contents_price])
 $mw_price = "무료";
    else
 $mw_price = $mw_cash[cf_cash_name] . " " . number_format($view[wr_contents_price]).$mw_cash[cf_cash_unit];
}

// 상품이미지 (중)
$img = "{$view[file][0][path]}/{$view[file][0][file]}";
if (!file_exists($img) or trim($img) == "/")
    $img = "$board_skin_path/img/noimage.gif";
?>

<link rel="stylesheet" href="<?=$board_skin_path?>/style.common.css" type="text/css">

<? if ($mw_basic[cf_source_copy]) { // 출처 자동 복사 ?>
<? $copy_url = set_http("{$g4[url]}"); ?>
<script type="text/javascript" src="<?=$board_skin_path?>/mw.js/autosourcing.open.compact.js"></script>
<style type="text/css">
DIV.autosourcing-stub { display:none }
DIV.autosourcing-stub-extra { position:absolute; opacity:0 }
.board_button { width:100%; margin:5px 0 5px; 0; padding:0px; text-align:center; }
#gBtn7 a{display:block; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') left 0; float:left; font:11px 돋움; color:#555; padding-left:6px; text-decoration:none; height:27px; cursor:pointer; overflow:hidden; letter-spacing:-1px; margin-left:3px;}
#gBtn7 a:hover{background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') left -27px}
#gBtn7 a span{display:block; float:left; font:8pt 돋움; color:#555; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right 0; line-height:220%; padding-right:6px; height:27px; overflow:hidden}
#gBtn7 a span.btn_img{display:block; float:left; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right 0; line-height:220%; padding-top:4px; padding-right:6px; height:27px; overflow:hidden}
#gBtn7 a:hover span{background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right -27px; color:#000}
</style>
<script type="text/javascript">
AutoSourcing.setTemplate("<p style='margin:11px 0 7px 0;padding:0'> <a href='{link}' target='_blank'> [출처] {title} - {link}</a> </p>");
AutoSourcing.setString(<?=$wr_id?> ,"<?=$config[cf_title];//$view[wr_subject]?>", "<?=$view[wr_name]?>", "<?=$copy_url?>");
AutoSourcing.init( 'view_%id%' , true);
</script>
<? } ?>

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


<? include_once("$board_skin_path/mw.proc/mw.list.hot.skin.php"); ?>
<!-- 링크 버튼 -->
<?
ob_start();
?>

<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<!-- 제목, 글쓴이, 날짜, 조회, 추천, 비추천 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
    <td class=mw_basic_view_subject>
<!--- 아이템용 상단 --->

<table width="<?=$width?>" border="0" cellpadding="0" cellspacing="0" style="margin-top:20px; margin-bottom:20px;">
  <tr>
    <td rowspan="2" width="300" valign="middle" align="center">

        <div style="border:0px solid #dedede; padding:0px;">
        <img src="<?=$img?>" width=300 height=511 alt="<?=$view[wr_subject]?>">
        </div>
       
    </td>
    <td rowspan="2" width="10">
    <td width="<?=$width-370?>" height="20" bgcolor="#fafafa" style="border:2px solid #DDDDDD;">
   
    <div style="margin-left:10px; font-size:12px;">
                <? if ($view[link][2]) { ?><a href="<?=$view[link_href][2]?>" target=_blank style="text-decoration:none;"><? } ?>
                <span style="color:#00459f; font-weight:bold; font-size:14px; margin-left:8px;"><?=cut_hangul_last(get_text($view[wr_subject]))?> <?=$view[icon_secret]?></span>
                <? if ($view[link][2]) { ?></a><? } ?>
    </div>
   
    </td>
  </tr>
  <tr>
    <td valign="top">
   
    <table width="100%" border=0 cellpadding=0 cellspacing=0 style="margin:18px 0 0 5px;">
          <tr>
            <td height=26 style="padding-left:2px;" width="70"><img src="<?=$board_skin_path?>/img/view_dot.gif" align="absmiddle" border="0" />품종 :</td>
          <td height="26" style="color:#898989; font-weight:" width="350"> <span style="color:#00459f; font-weight:"><? if ($is_category) { echo ($category_name ? "$view[ca_name] " : ""); } ?></span> </td>
        </tr>
        <tr>
            <td height=26 style="padding-left:2px;"><img src="<?=$board_skin_path?>/img/view_dot.gif" align="absmiddle" border="0" />출생 :</td>
            <td height="26" style="color:#898989;"> <font size="2" color="#0066FF"><?=$view[wr_1]?>년</font> </td>
        </tr>
        <tr>
            <td height=26 style="padding-left:2px;"><img src="<?=$board_skin_path?>/img/view_dot.gif" align="absmiddle" border="0" />크기 :</td>
            <td height="26" style="color:#898989;"> <font size="2" color="#0066FF"><?=$view[wr_2]?>cm</font> </td>
        </tr>
        <tr>
            <td height=26 style="padding-left:2px;"><img src="<?=$board_skin_path?>/img/view_dot.gif" align="absmiddle" border="0" />수상 :</td>
            <td height="26" style="color:#898989;"> <font size="2" color="#0066FF"><?=$view[wr_3]?></font></td>
        </tr>


<?
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++) {
    if ($view[link][$i]) {
        $cnt++;
        $link = cut_str($view[link][$i], 50);
?>
<span style="color:#f45191; font-weight:bold;"><?=$link?></span>
<?
   }
 }
 ?>
        </td>
        </tr>
        <tr>
            <td height=26 style="padding-left:2px;">  </td>
            <td height="26" style="padding-left:2px;">
<p align="right"><a href="#" onClick="window.open('<?="$board_skin_path/print_view.php?bo_table=$bo_table&wr_id=$wr_id"?>', '', 'left=150, top=10, width=600, height=700, scrollbars=1');"><img src="<?=$board_skin_path?>/img/print00.gif" width="115" height="20" border="0" alt="click"></a>    <br>

<a href="http://www.acebedgreen.com/gnu4/bbs/write.php?bo_table=board" target="_self"><img src="<?=$board_skin_path?>/img/board00.gif" width="115" height="20" border="0" alt="click"></a>    </p>


</td>
        </tr>
        <tr><td height="50" colspan="2" align="center" valign="bottom">

        <div style="padding-top:10px;">

        <? if ($good_href) { echo "<a href='{$good_href}' target='hiddenframe'>
        <img src='{$board_skin_path}/img/item_good.gif' align=absmiddle border='0'></a>"; } ?>
        </div>
        </td>
        </tr>
     </table>
   
   
    </td>
  </tr>
</table>

<!--- 아이템용 상단end --->

</td>
</tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr>
    <td class=mw_basic_view_content>

        <div id=view_<?=$wr_id?>>

        <?=$mw_basic[cf_content_head]?>

        <div id=view_content>

        <img src="<?=$board_skin_path?>/img/shop_review.gif" border="0" align="absmiddle" style="margin-right:12px;" /><? echo $view[content]; // 내용출력?>

        </div>

        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>

        <?=$mw_basic[cf_content_tail]?>

        </div>
    </td>
</tr>

</table>
<BR />

<div class="board_button">

<!-----------------------------
   <div style="float:left;" id="gBtn7">
        <? echo "<a href=\"$g4[bbs_path]/board.php?bo_table={$bo_table}&sca={$view[ca_name]}\" id=\"btn_list\"><span>Total list  </span></a> "; ?>
  <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\" id=\"btn_list\"><span>  이전글  </span></a> "; } ?>
  <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\" id=\"btn_list\"><span>  다음글  </span></a> "; } ?>
 </div>

-------------------------->

    <div style="float:right;" id="gBtn7">
  <? //if ($copy_href) { echo "<a href=\"$copy_href\" id=\"btn_list\"><span>  복사  </span></a> "; } ?>
  <? if ($move_href) { echo "<a href=\"$move_href\" id=\"btn_list\"><span>  이동  </span></a> "; } ?>
        <? //if ($search_href) { echo "<a href=\"$search_href\" id=\"btn_list\"><span>검색목록</span></a> "; } ?>
  <? if ($update_href) { echo "<a href=\"$update_href\" id=\"btn_list\"><span>  수정  </span></a> "; } ?>
  <? if ($delete_href) { echo "<a href=\"$delete_href\" id=\"btn_list\"><span>  삭제  </span></a> "; } ?>
  <? //if ($reply_href) { echo "<a href=\"$reply_href\" id=\"btn_list\"><span>  답변  </span></a> "; } ?>

  </div>
</div>

<?=$link_buttons?>
</td></tr></table>

<? if ($mw_basic[cf_exif]) { ?>
<script type="text/javascript">
function show_exif(no, obj, event) {
    var url = "<?=$board_skin_path?>/mw.proc/mw.exif.show.php";
    var param = "bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>&bf_no=" + no;
    var myAjax = new Ajax.Request(url,
    {
        method: 'post',
        asynchronous: false,
        parameters: param,
        onComplete: function (req)
        {
     if (g4_is_ie) {
  x = window.event.clientX;
  y = window.event.clientY + document.body.scrollTop;
     } else {
  x = event.clientX;
  y = event.clientY + document.body.scrollTop;
     }
            var exif = document.getElementById("exif-info");
            exif.style.left = x;
            exif.style.top = y;
            exif.style.display = "block";
            exif.innerHTML = req.responseText;
            exif.onclick = function () { this.style.display = "none"; }
        }
    });
}
</script>
<style type="text/css">
#exif-info { display:none; position:absolute; width:300px; height:150px; background-color:#1f1f1f; border:1px solid #000; }
#exif-info { cursor:pointer; color:#bfbfbf; padding:10px; }
#exif-info td { color:#bfbfbf; height:20px; }
</style>

<div id="exif-info" title='클릭하면 창이 닫힙니다.'></div>
<? } ?>

<? if ($download_log_href) { ?>
<script type="text/javascript">
function btn_download_log() {
    win_open("<?=$board_skin_path?>/mw.proc/mw.download.log.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>", "mw_download_log", "width=500, height=300, scrollbars=yes");
}
</script>
<? } ?>

<? if ($history_href) { ?>
<script type="text/javascript">
function btn_history(wr_id) {
    win_open("<?=$board_skin_path?>/mw.proc/mw.history.list.php?bo_table=<?=$bo_table?>&wr_id=" + wr_id, "mw_history", "width=500, height=300, scrollbars=yes");
}
</script>
<? } ?>

<? if ($singo_href) { ?>
<script type="text/javascript">
function btn_singo(wr_id, parent_id) {
    if (confirm("이 게시물을 정말 신고하시겠습니까?")) {
        hiddenframe.location.href = "<?=$board_skin_path?>/mw.proc/mw.btn.singo.php?bo_table=<?=$bo_table?>&wr_id=" + wr_id + "&parent_id=" + parent_id;
    }
}
</script>
<? } ?>

<? if ($secret_href || $nosecret_href) { ?>
<script type="text/javascript">
function btn_secret() {
    if (confirm("이 게시물을 비밀글로 설정하시겠습니까?")) {
        hiddenframe.location.href = "<?=$board_skin_path?>/mw.proc/mw.btn.secret.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>";
    }
}
function btn_nosecret() {
    if (confirm("이 게시물의 비밀글 설정을 해제하시겠습니까?")) {
        hiddenframe.location.href = "<?=$board_skin_path?>/mw.proc/mw.btn.secret.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>&flag=no";
    }
}

</script>
<? } ?>

<? if ($is_admin) { ?>
<script type="text/javascript">
function btn_now() {
    if (confirm("이 게시물의 작성시간을 현재로 변경하시겠습니까?")) {
 hiddenframe.location.href = "<?=$board_skin_path?>/mw.proc/mw.time.now.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>";
    }
}
function btn_intercept(mb_id) {
    win_open("<?=$board_skin_path?>/mw.proc/mw.intercept.php?mb_id=" + mb_id, "intercept", "width=500,height=300,scrollbars=yes");
}
function btn_ip(ip) {
    win_open("<?=$board_skin_path?>/mw.proc/mw.whois.php?ip=" + ip, "whois", "width=700,height=600,scrollbars=yes");
}
</script>
<? } ?>

<script type="text/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 type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script type="text/javascript" src="<?="$board_skin_path/mw.js/mw_image_window.js"?>"></script>

<? if ($mw_basic[cf_write_notice]) { ?>

<script type="text/javascript">
// 글쓰기버튼 공지
function btn_write_notice(url) {
    var msg = "<?=$mw_basic[cf_write_notice]?>";
    if (confirm(msg))
 location.href = url;
}
</script>

<? } ?>

<? if ($mw_basic[cf_link_blank]) { // 본문 링크를 새창으로 ?>
<script type="text/javascript">
if (document.getElementById('view_content')) {
    var target = '_blank';
    var link = document.getElementById('view_content').getElementsByTagName("a");
    for(i=0;i<link.length;i++) {
        link[i].target = target;
    }
}
</script>
<? } ?>

<? if ($mw_basic[cf_source_copy]) { // 출처 자동 복사 ?>
<script type="text/javascript">
function mw_copy()
{
    if (window.event)
    {
        window.event.returnValue = true;
        window.setTimeout('mw_add_source()', 10);
    }
}
function mw_add_source()
{
    if (window.clipboardData) {
        txt = window.clipboardData.getData('Text');
        txt = txt + "\r\n[출처 : <?=$g4[url]?>]\r\n";
        window.clipboardData.setData('Text', txt);
    }
}
//document.getElementById("view_content").oncopy = mw_copy;
</script>
<? } ?>

<style type="text/css">
<?=$mw_basic[cf_css]?>
</style>


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
위 내용은 view.skin.php 파일입니다.
첨부된 이미지에 손모양이 생기면서 클릭이 되고 클릭을 하면 이미지가 뜨는데
그것 안 되게 하고 싶습니다. 손모양조차도 안 생기게끔 하고 싶어요.
어디를 고쳐야 하는지 알려주시면 참 고마운 일입니다.

  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로