썸네일을 첫번째, 두번째, 세번째등 개별로 뽑아 보기
lib/thumbnail.lib.php
// 게시글리스트 썸네일 생성
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
{
global $g5, $config;
$filename = $alt = "";
$edt = false;
$sql = " select bf_file, bf_content from {$g5['board_file_table']}
where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit $option, 1 ";
$row = sql_fetch($sql);
skin/board/gallery/list.skin.php
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);
$thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content .= '<br><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content .= '<br><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content;
}
?>
이렇게 수정해서 사용해 보세요..
// 게시글리스트 썸네일 생성
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
{
global $g5, $config;
$filename = $alt = "";
$edt = false;
$sql = " select bf_file, bf_content from {$g5['board_file_table']}
where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit $option, 1 ";
$row = sql_fetch($sql);
skin/board/gallery/list.skin.php
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);
$thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content .= '<br><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content .= '<br><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content;
}
?>
이렇게 수정해서 사용해 보세요..
댓글 11개
10년 전
감사합니다 ^^
10년 전
글 보고 수정해 봣씁니다.
lib 파일과 list스킨 수정햇는데 썸네일 한개가 3개로 나오네요. 어떤 부분이 잘못된 것일까요?
lib 파일과 list스킨 수정햇는데 썸네일 한개가 3개로 나오네요. 어떤 부분이 잘못된 것일까요?
10년 전
, $option=0)
포인트는 $option 값입니다.
파일넘버를 불러오는 것입니다.
포인트는 $option 값입니다.
파일넘버를 불러오는 것입니다.
10년 전
그럼 옵션은 어디에 따로 써주는 건가요?
10년 전
http://gooddirectcar.com/bbs/board.php?bo_table=review&page= 요렇게 나와요~ 어떤 부분 수정하면 가능할까요? 부탁드립니다. 감사합니다.
10년 전
수정1
$um_value='80/0.5/3', $option=0)
수정2
bf_no limit $option, 1 ";
수정3
$thumb2 = ~~~ '80/0.5/3', 1);
수정4
$thumb3 = ~~~ '80/0.5/3', 2);
모두 정확히해보세요.썸네일 한번지워주시구요
$um_value='80/0.5/3', $option=0)
수정2
bf_no limit $option, 1 ";
수정3
$thumb2 = ~~~ '80/0.5/3', 1);
수정4
$thumb3 = ~~~ '80/0.5/3', 2);
모두 정확히해보세요.썸네일 한번지워주시구요
10년 전
답변감사드립니다.
제가 잘 볼줄 몰라서 ... 자꾸 답답한 소리하고 있나 봐요...
-----------$crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
-----------order by bf_no limit $option, 1 ";
list 에다가는
<li class="gall_href">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);
$thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2);
if($thumb['src']) {
$img_content = '<ul class="list_img"><li><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
$img_content .= '<li><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
$img_content .= '<li><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li></ul>';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content;
}
?>
</a>
</li>
요렇게 넣어줬는데요.
썸네일 정리하기 버튼 눌러서 정리도 했구요.
그런데 똑같아요... 혹시 제가 수정한 글중에 오타나 그런게 있어서 그럴까요?
제가 잘 볼줄 몰라서 ... 자꾸 답답한 소리하고 있나 봐요...
-----------$crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
-----------order by bf_no limit $option, 1 ";
list 에다가는
<li class="gall_href">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);
$thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2);
if($thumb['src']) {
$img_content = '<ul class="list_img"><li><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
$img_content .= '<li><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
$img_content .= '<li><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li></ul>';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content;
}
?>
</a>
</li>
요렇게 넣어줬는데요.
썸네일 정리하기 버튼 눌러서 정리도 했구요.
그런데 똑같아요... 혹시 제가 수정한 글중에 오타나 그런게 있어서 그럴까요?
혜민이아빠
10년 전
갤러리 첨부이미지 순서대로 뽑아오기는 썸네일립 파일에 옵션을 넣어서 뽑아오면 된다~! ^^
이주석님아
9년 전
감사합니다
sinbi
8년 전
좋은 팁 감사합니다. ^^
8년 전
감사합니다.^^
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4427 | ||
| 2664 |
선택과집중
|
4개월 전 | 574 | |
| 2663 |
|
4개월 전 | 626 | |
| 2662 |
|
4개월 전 | 582 | |
| 2661 |
선택과집중
|
4개월 전 | 512 | |
| 2660 | 4개월 전 | 588 | ||
| 2659 |
Modify
|
4개월 전 | 654 | |
| 2658 |
선택과집중
|
4개월 전 | 416 | |
| 2657 | 4개월 전 | 452 | ||
| 2656 |
|
5개월 전 | 965 | |
| 2655 |
선택과집중
|
5개월 전 | 549 | |
| 2654 | 5개월 전 | 405 | ||
| 2653 |
선택과집중
|
5개월 전 | 591 | |
| 2652 | 5개월 전 | 398 | ||
| 2651 | 5개월 전 | 447 | ||
| 2650 |
선택과집중
|
5개월 전 | 328 | |
| 2649 |
선택과집중
|
5개월 전 | 426 | |
| 2648 | 5개월 전 | 442 | ||
| 2647 |
welcome
|
5개월 전 | 545 | |
| 2646 |
디지털홍익인간
|
5개월 전 | 453 | |
| 2645 | 5개월 전 | 469 | ||
| 2644 |
선택과집중
|
5개월 전 | 515 | |
| 2643 | 5개월 전 | 459 | ||
| 2642 | 5개월 전 | 372 | ||
| 2641 | 5개월 전 | 361 | ||
| 2640 | 5개월 전 | 394 | ||
| 2639 | 5개월 전 | 1363 | ||
| 2638 |
|
5개월 전 | 517 | |
| 2637 |
세르반데스
|
5개월 전 | 402 | |
| 2636 |
선택과집중
|
6개월 전 | 571 | |
| 2635 |
선택과집중
|
6개월 전 | 687 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기