썸네일에 생성시 두번째 인자에 썸네일 폭을 지정할수 있게함
This commit is contained in:
@ -73,11 +73,12 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 게시글보기 썸네일 생성
|
// 게시글보기 썸네일 생성
|
||||||
function get_view_thumbnail($contents)
|
function get_view_thumbnail($contents, $thumb_width=0)
|
||||||
{
|
{
|
||||||
global $board, $config;
|
global $board, $config;
|
||||||
$dvc_width = intval($_COOKIE['device_width']);
|
|
||||||
|
|
||||||
|
if (!$thumb_width) {
|
||||||
|
$dvc_width = intval($_COOKIE['device_width']);
|
||||||
if(G4_IS_MOBILE && $dvc_width) {
|
if(G4_IS_MOBILE && $dvc_width) {
|
||||||
// 썸네일 width 설정
|
// 썸네일 width 설정
|
||||||
$thumb_width = 320;
|
$thumb_width = 320;
|
||||||
@ -92,6 +93,7 @@ function get_view_thumbnail($contents)
|
|||||||
} else {
|
} else {
|
||||||
$thumb_width = $board['bo_image_width'];
|
$thumb_width = $board['bo_image_width'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// $contents 중 img 태그 추출
|
// $contents 중 img 태그 추출
|
||||||
$matchs = get_editor_image($contents);
|
$matchs = get_editor_image($contents);
|
||||||
|
|||||||
Reference in New Issue
Block a user