테스트 사이트 - 개발 중인 베타 버전입니다

썸네일 함수

· 9년 전 · 6108 · 2
function g5_thumb($bo_table, $wr_id, $width = "", $height = "") {
include_once(G5_LIB_PATH.'/thumbnail.lib.php');

if ($width == "" || $height == "") {
$board = sql_fetch("select * from g5_board where bo_table='$bo_table'");
if ($width == "") $width = $board[bo_gallery_width];
if ($height == "") $height = $board[bo_gallery_height];
}

$thumb = get_list_thumbnail($bo_table, $wr_id, $width, $height);
if (!$thumb) return ""; // 여기에 noimage 넣으면 굿
return $thumb[src];
}



목록 페이지가 아닌 곳에서 썸네일을 쓰고 싶을 때,
기본 너비와 높이를 모를 때,
그럴 때 쓰면 편리합니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

8년 전
감사합니다~~~~^^
좋은정보감사합니다

게시글 목록

번호 제목
24318
24317
24315
24309
24294
24293
24277
24262
24260
24253
24251
24236
24233
24228
24226
24221
24214
24203
24201
24199
24196
24195
24194
24192
24191
24187
24185
24183
24172
24168