에디터로 첨부된 파일의 썸네일 클릭시 원본이미지 보기 추가
This commit is contained in:
@ -11,7 +11,7 @@ function it_img_thumb($filename, $filepath, $thumb_width, $thumb_height, $is_cre
|
||||
// 게시글보기 썸네일 생성
|
||||
function get_view_thumbnail($contents)
|
||||
{
|
||||
global $board;
|
||||
global $board, $config;
|
||||
$dvc_width = intval($_COOKIE['device_width']);
|
||||
|
||||
if(G4_IS_MOBILE && $dvc_width) {
|
||||
@ -81,6 +81,11 @@ function get_view_thumbnail($contents)
|
||||
$thumb_tag = str_replace($mh[0], str_replace($mh[1], $thumb_height, $mh[0]), $thumb_tag);
|
||||
}
|
||||
|
||||
// $img_tag에 editor 경로가 있으면 원본보기 링크 추가
|
||||
if(strpos($matchs[1][$i], 'data/editor') && preg_match("/\.({$config['cf_image_extension']})$/i", $filename)) {
|
||||
$thumb_tag = '<a href="'.G4_BBS_URL.'/view_image.php?fn='.urlencode($imgurl['path']).'" target="_blank" class="view_image">'.$thumb_tag.'</a>';
|
||||
}
|
||||
|
||||
$contents = str_replace($img_tag, $thumb_tag, $contents);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user