베스트이미지스킨제작에 도움좀 부탁드립니다.

베스트이미지스킨제작에 도움좀 부탁드립니다.

QA

베스트이미지스킨제작에 도움좀 부탁드립니다.

답변 2

본문

베스트스킨이  텍스트로만 출력이 되서 이미지형으로 만들자 하는데 썸네일 이미지가 출력이 안되네요.

베스트스킨은 아래주소의 스킨을 기본으로 해서 이미지(갤러리형)최신글스킨 에서  썸네일 코드를 추가 했습니다.
https://sir.kr/g5_skin/6948?sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&sfl=wr_subject%7C%7Cwr_content&stx=%EB%B2%A0%EC%8A%A4%ED%8A%B8

latest.skin.php파일은 아래와 같이 수정했습니다.

include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// 스넵이미지 생성함수

$w = 110;  //썸네일 가로 크기 700
$h = 110; //썸네일 세로 크기
?>
<style type="text/css">
.subject {width:212px;padding:2px 0 0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}
.subject img {vertical-align:bottom;}
</style>
<table width="212" cellpadding="0" cellspacing="0" style="padding:2px 0 0;">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan="4">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td height="22" valign="bottom" class="subject"><img src="../skin/latest/best10/img/btn<?=$titles?>_<?=$i+1?>.gif" align="top">
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}' target=_parent>";
            if ($list[$i]['is_notice'])
                echo $list[$i]['subject'];
            else
                echo $list[$i]['subject'];
            echo "</a>";

            //if ($list[$i]['comment_cnt']) //
                //echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; '>{$list[$i]['comment_cnt']}</span></a>";//

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

            ?></td>
<td>
<?php
$n_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $w, $h); //게시판1개인경우사용
                          //$n_thumb = get_list_thumbnail($list[$i]['bo_table'], $list[$i]['wr_id'], $w, $h); //그룹용으로사용
// 스넵이미지 생성하고 뷰어 시킨다.
$n_noimg = "$latest_skin_url/img/noimg.gif";
// 이미지가 없을경우의 이미지 위치
if($n_thumb['src']) {
$img_content = '<img src="'.$n_thumb['src'].'" width="'.$w.'" height="'.$h.'" alt="'.$list[$i]['subject'].'" title="" class="file-img"/>';
} else {
$img_content = '<img src="'.$n_noimg.'" width="'.$w.'" height="'.$h.'" alt="이미지없음" title="" class="file-img"/>';
}
echo $img_content;
?>


</td>
</tr>
       
        </table>
</td>
</tr>

<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50>게시물이 없습니다.</a></td></tr><? } ?>
</table>

-----

그리고 출력코드는

<?php echo izen_group("theme/best11", "", "'B11'", wr_hit,  10, 20,300);?>

로 일단 한개의 게시판 베스트로 했습니다.


썸네일이 나와야 하는 위치에 썸네일이 안나오고 noimg만 출력이 됩니다.

어떻게 해야 썸네일이 정상적으로 출력이 될지 조언좀 부탁드립니다.

이 질문에 댓글 쓰기 :

답변 2

$n_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $w, $h); //게시판1개인경우사용

여기에 보면 $bo_table이라는 변수가 있는데 이거 echo로 찍어 보면 값 나오나요?

그리고

print_r($n_thumb);

이렇게 했을 때 값이 정상적으로 나오는지도 확인해 보셔야 하겠네요. 

답변을 작성하시기 전에 로그인 해주세요.
전체 2
© SIRSOFT
현재 페이지 제일 처음으로