최신글 목록 오류 도움이 필요합니다!

최신글 목록 오류 도움이 필요합니다!

QA

최신글 목록 오류 도움이 필요합니다!

본문

초보다보니 요즘 질문을 많이 하게됩니다 가입한지 3일이안되서 답글이 안되니 감사인사도 못드리고 채택만 하게되는군요.

고수님들 덕분에 하나하나씩 성공해가면 홈페이지가 변하고있습니다. 댓글 남겨주신분들 다시한번 감사드립니다. (__

 

 

c31fe25c7f4cd4164f913243d4259b72_1406906604_486.png
 

제가 맘에 드는 최신글 스킨을 하나 받았는데요 ~

이미지가 없는 글을 출력하면 폰트로 no image 이렇게 나옵니다. 그래서 폰트배열과 사진정렬이 어긋나는데요

저 폰트 대신 썸네일의 같은 크기로 이미지를 하나 만들어서 대체하려고하는데 이미지는 최상단 /img 에 업로드 해놨는데

이미지 경로를 어디다 넣어야 할지 모르겠습니다.

 

제가 초보라 자세히 좀 알려주시기 바랍니다!

 




<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$thumb_width=50;
$thumb_height=50;


// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>


<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->
<div class="ltx">
    <strong class="lt_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject; ?></a></strong>
    <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 = '<img src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
            } else {
                $img = 'NO IMAGE';
            }?>


        <li>
            <div class="img"><a href="<?php echo $list[$i]['href'];?>"><span class="roll sports"></span><?php echo $img;?></a></div>
            <div class="inner"><p class="tit"><?php
            //echo $list[$i]['icon_reply']." ";
            echo "<a href=\"".$list[$i]['href']."\">";
            if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong>";
            else
                echo $list[$i]['subject'];


            if ($list[$i]['comment_cnt'])
                echo $list[$i]['comment_cnt'];


            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }


            if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new'];
             ?></a><br><?php echo cut_str(strip_tags($list[$i]['wr_content']),38);?></p>
            </div>
        </li>
    <?php }  ?>
    <?php if (count($list) == 0) { //게시물이 없을 때  ?>
    <li>게시물이 없습니다.</li>
    <?php }  ?>
    </ul>
<!--    <div class="lt_more"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><span class="sound_only"><?php echo $bo_subject ?></span><img src='<?php echo $latest_skin_url ?>/img/more.gif'></a></div> -->
</div>



이 질문에 댓글 쓰기 :

답변 2

 

for ($i=0; $i<count($list); $i++) {
22            $thumb = get_list_thumbnail($bo_table$list[$i]['wr_id'], $thumb_width$thumb_height);
23            if($thumb['src']) {
24                $img '<img src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
25            else {
26                $img 'NO IMAGE';
27            }?>

 

if($thumb['src']) {
24                $img '<img src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
25            else {
26                $img '<img src="경로/파일명" alt="'.$list[$i]['subject'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
27            }?>

 

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

회원로그인

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