List에 썸네일 출력 > Gnuboard

본문 바로가기

사이트 내 전체검색

뒤로가기 Gnuboard

강좌 List에 썸네일 출력

본문

http://sir.co.kr/qa/?wr_id=46397#answer_46407






skin/board/basic/list.skin.php

include_once(G5_LIB_PATH.'/thumbnail.lib.php');
상단에 썸네일 함수 삽입




<th style="width:60px"></th>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col"><?php echo subject_sort_link('wr_datetime', $qstr2, 1) ?>날짜</a></th>
<th scope="col"><?php echo subject_sort_link('wr_hit', $qstr2, 1) ?>조회</a></th>
<?php if ($is_good) { ?><th scope="col"><?php echo subject_sort_link('wr_good', $qstr2, 1) ?>추천</a></th><?php } ?>
<?php if ($is_nogood) { ?><th scope="col"><?php echo subject_sort_link('wr_nogood', $qstr2, 1) ?>비추천</a></th><?php } ?>
상단 목록 줄의 '제목' 위에

<th style="width:60px"></th>
삽입

<td class="td_subject">
리스트의 제목 위에 아래 소스 삽입

<td>
    <?php
    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], "50", "50");
    if($thumb['src']) {
        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="50" height="50">';
    } else {
        $img_content = '<span style="display:inline-block;width:50px;height:50px;text-align:center;color:#ccc;line-height:2.0em">no<br>image</span>';
    }
    echo $img_content;
    ?>
</td>

왕초보입니다. 많은 지도편달 부탁드립니다~^^

자주 가는 곳 : SIR

추천0 비추천 0

댓글목록 0

등록된 댓글이 없습니다.

전체 187건 7 페이지
게시물 검색
internationale.kr. All wrongs reserved.
PC 버전으로 보기