답변 1개
채택된 답변
+20 포인트
9년 전
로그인 후 평가할 수 있습니다
답변에 대한 댓글 4개
�
단비비비
9년 전
�
마스타
9년 전
썸네일은 최신글 스킨파일에서 처리하면 될 텐데요.
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height);
이런 식으로요.
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height);
이런 식으로요.
�
단비비비
9년 전
현재 latest 파일에서 이용하고있는 소스입니다.
어디서 문제인건지 썸네일만 불러오지를 못하네요ㅠㅠ
확인한번 부탁드립니다.
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
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 = 158;
if (!$height) $height = 99;
if (!$content_length) $content_length = 66;
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
<ul class="latest-zinex"<?php if ($wrap_width) { echo ' style="width:'.$wrap_width.'px;"'; } ?>>
<?php for ($i=0; $i<count($list); $i++) {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px;"><img src="/images/main/noimage.gif" alt=""></span>';
}
?>
<li>
<a href="<?php echo $list[$i]['href']; ?>">
<?php echo $img_content; ?>
<h4><?php echo $list[$i]['subject']; ?></h4>
<p><?php echo cut_str(preg_replace("/ /", "", strip_tags($list[$i]['wr_content'])), $content_length); ?></p>
</a>
</li>
<?php
}
if (count($list) == 0) { //게시물이 없을 때 ?>
<li class="nodata">게시물이 없습니다.</li>
<?php } ?>
</ul>
어디서 문제인건지 썸네일만 불러오지를 못하네요ㅠㅠ
확인한번 부탁드립니다.
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
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 = 158;
if (!$height) $height = 99;
if (!$content_length) $content_length = 66;
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
?>
<ul class="latest-zinex"<?php if ($wrap_width) { echo ' style="width:'.$wrap_width.'px;"'; } ?>>
<?php for ($i=0; $i<count($list); $i++) {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px;"><img src="/images/main/noimage.gif" alt=""></span>';
}
?>
<li>
<a href="<?php echo $list[$i]['href']; ?>">
<?php echo $img_content; ?>
<h4><?php echo $list[$i]['subject']; ?></h4>
<p><?php echo cut_str(preg_replace("/ /", "", strip_tags($list[$i]['wr_content'])), $content_length); ?></p>
</a>
</li>
<?php
}
if (count($list) == 0) { //게시물이 없을 때 ?>
<li class="nodata">게시물이 없습니다.</li>
<?php } ?>
</ul>
�
마스타
9년 전
소스상으로는 별 문제 없어 보이는데요..
위 소스에서 실제로 width height 값이 얼마로 찍히는지 echo 를 한번 해 보세요.
width height 값이 양의 숫자가 아닌 문자나 0 이하의 값이 들어가면,
썸네일이 잘 못 만들어 집니다.
위 소스에서 실제로 width height 값이 얼마로 찍히는지 echo 를 한번 해 보세요.
width height 값이 양의 숫자가 아닌 문자나 0 이하의 값이 들어가면,
썸네일이 잘 못 만들어 집니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
최신글 옵션처리도 하며 갤러리형 게시판 읽어올수 있는 방법이 없을까요..???