최근게시물 문의드려요

최근게시물 문의드려요

QA

최근게시물 문의드려요

본문

사용중인 최근게시물 스킨엔데요 썸네일 1개가 나오고 다른글은 글씨만나오는데요 썸네일이 3개가 나오게하려면 어느부분을 수정해야하는지 문의드립니다 고수님들 도와주세욤~ㅠㅠ]

 

 2039845730_1695283088.2374.png

 

include_once(G5_LIB_PATH.'/thumbnail.lib.php');

$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);

if ($options)    list($width, $height, $wrap_width, $content_length) = explode(',', $options);
if (!$width) $width = 100;
if (!$height) $height = 65;
if (!$content_length) $content_length = 120;

add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
  <a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_titl">
    <?php echo $bo_subject ?> </a>
<div class="latest-zinez"<?php if ($wrap_width) { echo ' style="width:'.$wrap_width.'px;"'; } ?>>
    <ul>
<?php
for ($i=0; $i<count($list); $i++) {
    if ($i == 0) {
        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);

        if($thumb['src']) {
            $img_content = '<a href="'.$list[$i]['href'].'"><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img"></a>';
        } else {
            $img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px;">No image</span>';
        }
?>
        <li>
            <div class="title"><a href="<?php echo $list[$i]['href']; ?>"><?php echo $list[$i]['subject']; ?></a></div>
            <div class="thumb"><?php echo $img_content; ?></div>
            <div class="article" style="height:<?php echo $height; ?>px; margin-left:<?php echo $width+10; ?>px;">
            
                <p class="co"><a href="<?php echo $list[$i]['href']; ?>"><?php echo cut_str(preg_replace("/ /", "", strip_tags($list[$i]['wr_content'])), $content_length); ?></a></p>
            </div>
        </li>
<?php
    } else {
?>
        <li class="text_lin"><a href="<?php echo $list[$i]['href']; ?>"><?php echo $list[$i]['subject']; ?></a></li>
<?php
    }
}
if (count($list) == 0) { //게시물이 없을 때  ?>
        <li class="nodata">게시물이 없습니다.</li>
<?php }  ?>
    </ul>
</div>
 

이 질문에 댓글 쓰기 :

답변 1


include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
if ($options)    list($width, $height, $wrap_width, $content_length) = explode(',', $options);
if (!$width) $width = 100;
if (!$height) $height = 65;
if (!$content_length) $content_length = 120;
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_titl">
    <?php echo $bo_subject ?>
</a>
<div class="latest-zinez"<?php if ($wrap_width) { echo ' style="width:'.$wrap_width.'px;"'; } ?>>
    <ul>
<?php
for ($i=0; $i<count($list); $i++) {
    if ($i < 3 ) {
        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);
        if($thumb['src']) {
            $img_content = '<a href="'.$list[$i]['href'].'"><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img"></a>';
        } else {
            $img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px;">No image</span>';
        }
?>
        <li>
            <div class="title"><a href="<?php echo $list[$i]['href']; ?>"><?php echo $list[$i]['subject']; ?></a></div>
            <div class="thumb"><?php echo $img_content; ?></div>
            <div class="article" style="height:<?php echo $height; ?>px; margin-left:<?php echo $width+10; ?>px;">
            
                <p class="co"><a href="<?php echo $list[$i]['href']; ?>"><?php echo cut_str(preg_replace("/ /", "", strip_tags($list[$i]['wr_content'])), $content_length); ?></a></p>
            </div>
        </li>
<?php
    } else {
?>
        <li class="text_lin"><a href="<?php echo $list[$i]['href']; ?>"><?php echo $list[$i]['subject']; ?></a></li>
<?php
    }
}
if (count($list) == 0) { //게시물이 없을 때  ?>
        <li class="nodata">게시물이 없습니다.</li>
<?php }  ?>
    </ul>
</div>

 

3개만 나오게

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

회원로그인

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