latest 최신글에서 두번째 이미지 썸네일 사용하기
latest에서 두번째 또는 세번째... 첨부를 썸네일로 만들기 입니다
extend/user.config.php 또는 extend/default.config.php에 다음 함수를 넣으세요
function latest_thumb2($bo_table, $wr_id, $thumb_width, $thumb_height, $bf_no=1){
global $g5;
$file=sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = $wr_id and bf_no=$bf_no");
$filename = $file['bf_file'];
$filepath = "data/file/{$bo_table}";
$thumb_file2 = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, false, true);
$thumb2 = $filepath."/{$thumb_file2}";
return $thumb2;
}
============
기존 썸네일 만들기 코드 $thumb = get_list_thumbnail(~~~) <== 다음에 넣으세요
$bf_no=1; // 두번째 첨부화일 썸네일
$thumb2 = latest_thumb2($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, $bf_no);
============
<img src='<?php echo $thumb2;?>'>
댓글 5개
팁 감사합니다.
감사합니다
감사합니다 ^^
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4420 | ||
| 2394 | 1년 전 | 5051 | ||
| 2393 |
|
1년 전 | 1699 | |
| 2392 |
|
1년 전 | 1358 | |
| 2391 |
|
1년 전 | 1140 | |
| 2390 |
|
1년 전 | 1195 | |
| 2389 | 1년 전 | 1780 | ||
| 2388 | 1년 전 | 1327 | ||
| 2387 | 1년 전 | 1309 | ||
| 2386 |
투명한열정
|
1년 전 | 3074 | |
| 2385 |
|
1년 전 | 2345 | |
| 2384 | 1년 전 | 1670 | ||
| 2383 | 1년 전 | 1806 | ||
| 2382 | 1년 전 | 1455 | ||
| 2381 |
|
1년 전 | 1874 | |
| 2380 | 1년 전 | 1042 | ||
| 2379 | 1년 전 | 1385 | ||
| 2378 | 1년 전 | 919 | ||
| 2377 | 1년 전 | 2999 | ||
| 2376 | 1년 전 | 1564 | ||
| 2375 | 1년 전 | 1736 | ||
| 2374 |
네이비스택
|
1년 전 | 1117 | |
| 2373 | 1년 전 | 1550 | ||
| 2372 | 1년 전 | 1470 | ||
| 2371 |
goodman148
|
1년 전 | 2112 | |
| 2370 | 1년 전 | 1521 | ||
| 2369 |
|
1년 전 | 1033 | |
| 2368 | 1년 전 | 1836 | ||
| 2367 | 1년 전 | 1356 | ||
| 2366 |
|
1년 전 | 1214 | |
| 2365 | 1년 전 | 2145 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기