gga_photo_black 갤러리 질문 > 그누3질답

그누3질답

gga_photo_black 갤러리 질문 정보

gga_photo_black 갤러리 질문

본문

갤러리에서 이미지 클릭시 원본사진 뜨는게 비율이 바뀌어져서 나와요

gbview.skin.php 뷰페이지니깐 이쪽을 건들여야될거같은데 도대체 모르겠네요^^

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

include "$board_skin/config.skin.php";

if (!$skin_no) $skin_no = "02";
?>

<link rel='stylesheet' href='<?=$board_skin?>/style<?=$skin_no?>.css' type='text/css'>

<script language="JavaScript">
<!--
    function image_window2(src)
    {
        var img = src.src;
        var tmp_w = w = src.tmp_width;
        var tmp_h = h = src.tmp_height;

        winl = (screen.width-w)/2;
        wint = (screen.height-h)/3;

        if (w >= screen.width) {
            winl = 0;
            w = screen.width - 10;
            h = (parseInt)(w * (h / w));
        }

        if (h >= screen.height) {
            wint = 0;
            h = screen.height - 80;
            w = (parseInt)(h * (w / h));
        }

        var settings  ='width='+w+',';
            settings +='height='+h+',';
            settings +='top='+wint+',';
            settings +='left='+winl+',';
            settings +='scrollbars=no,';
            settings +='resizable=no,';
            settings +='status=no';

        win=window.open("","newWindow",settings);
        win.document.open();
        win.document.write ("<html><head><meta http-equiv='content-type' content='text/html; charset=euc-kr'>");
        win.document.write ("<title>이미지 보기</title></head>");
        win.document.write ("<body leftmargin=0 topmargin=0>");
        win.document.write ("<img src='"+img+"' width='"+w+"' height='"+h+"'border=0 onclick='window.close();' style='cursor:hand'>");
        win.document.write ("</body></html>");
        win.document.close();

        if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
    }
//-->
</script>


<link rel='stylesheet' href='<?=$board_skin?>/style<? if($itemtitle[1]) { echo "$itemtitle[1]"; }?>.css' type='text/css'>


<SCRIPT LANGUAGE='JavaScript'>
<!--
    var win= null;
    function center_window(img, w, h)
    {
        var winl = (screen.width-w)/2;
        var wint = (screen.height-h)/3;
        var settings  ='height='+h+',';
            settings +='width='+w+',';
            settings +='top='+wint+',';
            settings +='left='+winl+',';
            settings +='scrollbars=no,';
            settings +='resizable=no,';
            settings +='status=no';

        win=window.open("","newWindow",settings);
        win.document.open();
        win.document.write ("<html><head><title>이미지 보기</title></head>");
        win.document.write ("<body leftmargin=0 topmargin=0>");
        win.document.write ("<img src='"+img+"' border=0 onclick='window.close();' style='cursor:hand' title='클릭하면 닫혀요'>");
        win.document.write ("</body></html>");
        win.document.close();

        if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
    }
//-->
</SCRIPT>


<img name=main_table width='<?=$width?>' height=0 border=0>

<table width='<?=$width?>' align=center border=0 cellpadding=0 cellspacing=0>
<tr><td colspan="2" class=view_line1></td></tr>
<tr><td colspan="2" class=view_line2></td></tr>
<tr>
    <td class=ct>&nbsp;&nbsp;<b><? if ($is_category) echo "[$category_name] "; ?><?=$subject?></b></td>
<td align=right class=ct><?=$datetime?>&nbsp;&nbsp;</td>
</tr>
<tr>
<td height=25 class=pt>&nbsp;&nbsp;<?=$name?> &nbsp;(<?=$ip?>)</td>
<td align=right class=pt>조회 : <?=$hit?>&nbsp;&nbsp;<? if ($is_good) echo "<span class=wview>추천</span> : " . $good; ?>&nbsp;&nbsp;<? if ($is_nogood) echo "<span class=wview>비추천</span> : " . $nogood; ?>&nbsp;&nbsp;</td></tr>
<tr><td colspan="2" class=view_line1></td></tr>
<tr><td colspan="2" class=view_line2></td></tr>


<?
// 링크 설정한 값만큼 출력
for ($i=1; $i<=$cfg[link_count]; $i++) {
 if ($link[$i][link]) { echo "<tr><td colspan=2 height=20 class=pt>&nbsp;&nbsp;<span class=wview>Link</span> : <a href='{$link[$i][href]}' target='$default[de_link_target]'>{$link[$i][link]}</a>, Hit:{$link[$i][hit]}</td></tr>"; }
}
?>

<?
// 파일 업로드 설정한 값만큼 출력
for ($i=1; $i<=$cfg[file_count]; $i++) {
if ($file[$i][source]) { echo "<tr><td colspan=2 height=20 class=pt>&nbsp;&nbsp;<span class=wview>Download</span> : <a href='{$file[$i][href]}'>{$file[$i][source]} ({$file[$i][size]})</a>, Down:{$file[$i][download]}</td></tr>"; }
}
?>
<tr>
    <td colspan=2>
        <table width=100% cellpadding=5>
        <tr>
            <td style='word-break:break-all;' class='lh' height=100>
<div align=center>

                <?
                for ($i=1; $i<=$cfg[file_count]; $i++) {
                    if ($file[$i][view]) { echo $file[$i][view]; }
                }
?>
</div>

                <!-- 내용 출력 -->
                <span class=content><?=$content?></span>

<?
                $td_width = (int)(100 / $file_mod);

                echo "<table width=100%>";
                echo "<tr>";
                $sql = " select * from $file_table
                          where wr_id = '$wr_id'
                          order by wf_id ";
                $result = sql_query($sql);
                for ($i=0; $row=mysql_fetch_array($result); $i++)
                {
                    if ($i%$file_mod==0 && $i)
                        echo "</tr><tr>";

                    $file_name = get_thumb_filename($wr_id, $row[wf_id]);

                    $file = "./data/file/$bo_table/{$file_name}_s.jpg";

                    if (file_exists($file))
                    {
                        $large = "./data/file/$bo_table/{$file_name}.jpg";
                        $size = getimagesize($large);
                        $image = "<a href=\"javascript:;\" onclick=\"center_window('$large', $size[0], $size[1]);\"><img src='$file' border=0></a>";
                    } else{}

                    echo "
                    <td width='$td_width%' valign=top>
                        <table width=100%>
                        <tr><td align=center>$image</td></tr>
                        <tr><td class=content style='text-align:justify;' align=center>$row[wf_cont]</td></tr>
                        </table>
                    </td>
                        ";
                }
                echo "</tr>";
                echo "</table>";
                ?>

    <?
    if($write[wr_1]) {
        $wr_1 = conv_content($write[wr_1], $write[wr_html]);
    ?>

<span class=content><?=$wr_1?></span>

<? } ?>

                <!-- 테러 태그 방지용 -->
                </xml></xmp><a href=""></a><a href=''></a>
            </td>
        </tr>
        <? if ($is_signature) { echo "<tr><td>$signature</td></tr>"; } // 서명 출력 ?>
        </table>
    </td>
</tr>
</table><br>


<? if ($is_comment) { ?>
<!-- 코멘트 내용 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<a name='c<?=$list[$i][wr_id]?>'></a>
<table width='<?=$width?>' border=0 align=center cellpadding=0 cellspacing=0>
<tr><td colspan="2" class=line_comment></td></tr>
<tr><td colspan="2" class=line_comment1></td></tr>
<tr>
<td style='padding-top:3px;padding-bottom:3px;'>
            <table width=100%>
            <col width=100 align=center></col>
            <col width=5></col>
            <col width=5></col>
            <col width=4></col>
            <col width=''></col>
            <col width=99></col>
            <tr>
                <td valign=top style='word-break:break-all;' align=left class=pt><?=$list[$i][name]?></td>
                <td></td>
                <td bgcolor=#a1a1a1></td>
                <td></td>
                <td valign=top style='word-break:break-all; text-align:justify;' class='content lh'><?=$list[$i][content]?></td>
                <td valign=top align=right class=pt>
                    <?=$list[$i][datetime]?><br>
                    <?=$list[$i][ip]?><br>
                    <? if ($list[$i][is_del]) { echo "{$list[$i][del_href]}<img src='$board_skin/img/com_del.gif' border=0 alt='삭제' ></a>"; } ?>
                </td>
            </tr>
            </table>
        </td>
</tr>
</table>
<? } // for ?>


    <? if ($is_comment_write) { ?>
    <!-- 코멘트 쓰기 -->
    <table width='<?=$width?>' align=center border=0 cellpadding=0 cellspacing=0>
<tr><td colspan="2" class=line_comment></td></tr>
<tr><td colspan="2" class=line_comment1></td></tr>
    </table>

    <table width='<?=$width?>' align=center border=0 cellpadding=3 cellspacing=1>
    <tr>
        <td>
            <table width=100% cellpadding=3 cellspacing=0>
            <form name=fgbview method=post action='<?="./?doc=bbs/gbupdate.php"?>'>
            <input type=hidden name=w        value='c'>
            <input type=hidden name=bo_table value='<?=$bo_table?>'>
            <input type=hidden name=sselect  value='<?=$sselect?>'>
            <input type=hidden name=stext    value='<?=$stext?>'>
            <input type=hidden name=wr_id    value='<?=$wr_id?>'>
            <input type=hidden name=page    value='<?=$page?>'>
            <input type=hidden name=spart  value='<?=$spart?>'>
            <col width=110 align=center></col>
            <col width='' align=center></col>
            <col width=70 align=center></col>
            <tr>
                <td align=left class=pt>
                    이름<br><?=$c_name?><br>
                    <? if (!$member[mb_id]) { ?>비밀번호<br><input type=password name=wr_passwd size=10 class=input required itemname='비밀번호'><? } ?>
                </td>
                <td><textarea name=wr_content rows=5 style='width:100%; line-height:150%;' required itemname='내용' class=input></textarea></td>
                <td>&nbsp;&nbsp;<input type=submit value=' 확 인 ' class=comment onfocus="this.blur()"></td>
            </tr>
            </form>
            </table>
        </td>
    </tr>
    </table>
    <? } // if ?>
<? } // if ?>


<!-- 링크 -->
<table width=<?=$width?> align=center border=0 cellpadding=0 cellspacing=0>
<tr><td colspan="2" class=line_comment></td></tr>
<tr><td colspan="2" class=line_comment1></td></tr>
<tr>
    <td width=80% height=30>
        <? if ($search_href) { echo "<a href=\"$search_href\">검색목록</a>"; } ?>
        <? echo "<a href=\"$list_href\">목록보기</a>"; ?>
        <? if ($write_href) { echo "<a href=\"$write_href\">글쓰기</a>"; } ?>
        <? if ($reply_href) { echo "<a href=\"$reply_href\">답글쓰기</a>"; } ?>
        <? if ($update_href) { echo "<a href=\"$update_href\">글수정</a>"; } ?>
        <? if ($delete_href) { echo "<a href=\"$delete_href\">글삭제</a>"; } ?>
        <? if ($good_href) { echo "<a href=\"$good_href\">추천</a>"; } ?>
        <? if ($nogood_href) { echo "<a href=\"$nogood_href\">비추천</a>"; } ?>
        <? if ($copy_href) { echo "<a href=\"$copy_href\">복사</a>"; } ?>
        <? if ($move_href) { echo "<a href=\"$move_href\">이동</a>"; } ?>
    </td>
    <td width=20% align=right>
<? if ($next_href) { echo "<a href=\"$next_href\">이전글</a>"; } ?>
        &nbsp;&nbsp;<? if ($prev_href) { echo "<a href=\"$prev_href\">다음글</a>"; } ?>
    </td>
</tr>
</table>



<script language="JavaScript">
<!--
    // HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
    // 제로보드 참고
    function resize_image()
    {
        var target = document.getElementsByName('target_resize_image[]');
        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 > document.main_table.width)
                target[i].width = document.main_table.width;
        }
    }
    window.onload = resize_image;
//-->
</script>

<br><br>
  • 복사

댓글 전체

아마도 g3버전 자체 문제일 겁니다.
스킨을 basic으로 바꿔서 한번 해보세요.
마찬가지 결과일 겁니다.
결론은......
저도 그 문제를 해결하려 했으나 원본을 수정하지 않고는 해결하지 못하겠더군요.
다만 세로 이미지의 경우 사이즈를 세로 640픽셀 이하로 하면 별 문제 없을겁니다.
어쩌면 640보다 더 작을수도 있겠군요.
© SIRSOFT
현재 페이지 제일 처음으로