최신 게시물 소스 좀 봐주세요

최신 게시물 소스 좀 봐주세요

QA

최신 게시물 소스 좀 봐주세요

본문

최신게시물 이미지를

한가지로 통일 하고 싶은데요.

 

가로 세로 비율로 나오고 있습니다.

 

조언 좀 부탁드립니다.

 

감사합니다.

 

1888603148_1705833027.8597.jpg

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$thumb_width  = isset($options['thumb_width']) ? $options['thumb_width'] : $board['bo_gallery_width'];
$thumb_height = isset($options['thumb_height']) ? $options['thumb_height'] : $board['bo_gallery_height'];
$content_length = isset($options['content_length']) ? $options['content_length'] : 30;
?>
<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->
<div class="lt_gal">
    <strong class="lt_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject; ?></a></strong>
    <div class="lt_gal_box">
        <ul>
            <?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 = '<span style="width:'.$thumb_width.'px;height:'.$thumb_height.'px" class="no_img">no image</span>';
                }
            ?>
            <li>
                <a href="<?php echo $list[$i]['href']; ?>" class="lt_image"><?php echo $img_content; ?></a>
                <?php
                echo "<a href=\"".$list[$i]['href']."\" class=\"lt_tit\">";
                if ($list[$i]['is_notice'])
                    echo "<strong>".$list[$i]['subject']."</strong>";
                else
                    echo $list[$i]['subject'];
                echo "</a>";
                if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
                ?>
            </li>
            <?php }  ?>
        
            <?php if ($i == 0) { //게시물이 없을 때  ?>
                <li class="empty_li">게시물이 없습니다.</li>
            <?php }  ?>
        </ul>
    </div>
    <div class="lt_gal_more"><a href="<?php echo get_pretty_url($bo_table); ?>"><span class="sound_only"><?php echo $bo_subject ?></span>더보기</a></div>
</div>
<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->
 

 


@charset "utf-8";
/* 새글 갤러리 스킨 (latest)*/
.lt_gal {clear:both;position:relative;margin-bottom:45px}
.lt_gal:after {display:block;visibility:hidden;clear:both;content:""}
.lt_gal .lt_title {display:block;margin-bottom:15px;font-size:14px}
.lt_gal_box {border-top:1px solid #e8e8e8;padding-top:15px}
.lt_gal_box:after,
.lt_gal_box ul:after {display:block;visibility:hidden;clear:both;content:""}
.lt_gal_box ul li {list-style:none;float:left;width:170px;margin-right:10px;margin-right:7px \9}
.lt_gal_box ul li:last-child{margin-right:0px}
.lt_gal_box ul li.empty_li {width:100%;text-align:center;line-height:100px}
.lt_gal_box ul li .lt_image {display:inline-block;margin-bottom:10px;text-decoration:none}
.lt_gal_box ul li .no_img {text-align:center;display:block;line-height:145px;vertical-align:middle;text-transform:uppercase;font-weight:bold;color:#bbb;background:#eee}
.lt_gal_box ul li .lt_tit {display:inline-block;font-weight:bold;overflow:hidden;line-height:25px;vertical-align:middle}
.lt_gal_box ul li .lt_detail {display:inline-block;color:#989898;padding:4px 0;width:170px;height:30px;overflow:hidden;line-height:16px}
.lt_gal_more a {position:absolute;top:0;right:0;background:url("img/icon_more.gif") no-repeat top right;height:16px;position:absolute;top:0px;right:0px;padding-right:23px;color:#696969}
 

이 질문에 댓글 쓰기 :

답변 1


$thumb_height = isset($options['thumb_height']) ? $options['thumb_height'] : $board['bo_gallery_height'];

이 부분에서 최근게시물 불러오는 곳에서 $options['thumb_height'] 이부분이 어떻게 설정되어 있는지 보시고 
$board['bo_gallery_height'] 이 부분도 값을 확인해 보세요.

 


$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" style="width:'.$thumb_width.'px; height:'.$thumb_height.'px;">';

이와 같이 변경해 보세요

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

회원로그인

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