최신글에서 썸네일 이미지 확대 축소?

최신글에서 썸네일 이미지 확대 축소?

QA

최신글에서 썸네일 이미지 확대 축소?

답변 1

본문

 

갤러리형 최신글에서

원본이미지가 큰걸 최신글에서 작게해서 보여주는데요

 

이미지가 줄어들면서 전체적으로 표시가 안되고 잘려 나옵니다.

 

어느 부분을 수정해야 하나요??

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$thumb_width=116; //썸네일 가로사이즈
$thumb_height=135; //썸네일 세로사이즈
$img_cols =7 ; //썸네일 가로 개수
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
 
 
<table width="840" border="0" cellspacing="0" cellpadding="0" style="border:0px solid #d1dee2">
<tr>
<?php
for ($i=0; $i<count($list); $i++) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height);
if($thumb['src']) {
    $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
} else {
 $img_content = '<img src="'.$latest_skin_url.'/img/noimage.png" width="'.$thumb_width.'" height="'.$thumb_height.'">';
}
?>
<?php if ($i>0 && ($i % $img_cols == 0)) { ?>
</tr>
<tr>
    <td colspan="<?php echo $img_cols ?>" height="5"></td>
</tr>
<tr>
<?php } ?>
    <td align="center" valign="top" style="padding:0px">
        <table width="<?php echo $thumb_width ?>" cellspacing="0" cellpadding="0">
        <tr>
            <td><a href="<?php echo $list[$i]['href'] ?>"><?php echo $img_content ?></a></td>
        </tr>
        <tr>
            <td style="padding-top:0px"><a href="<?php echo $list[$i]['href'] ?>"><?//php echo $list[$i]['subject'] ?></a></td>
        </tr>
        </table>
    </td>
<?php } ?>
<? if (count($list) == 0) { echo "<td align=center height=50>게시물이 없습니다.</td>"; } ?>
</tr>
</table>

이 질문에 댓글 쓰기 :

답변 1

섬네일 이미지는 가로 사이즈에 맞게 자동으로 이미지를 축소시키기때문에

 

$thumb_width=116; //썸네일 가로사이즈
05$thumb_height=135; //썸네일 세로사이즈

 

가로나 세로를 0으로해보세요!

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로