썸네일 함수 > 그누보드5 팁자료실

그누보드5 팁자료실

썸네일 함수 정보

썸네일 함수

본문

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];
}



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

댓글 2개

© SIRSOFT
현재 페이지 제일 처음으로