답변 2개
채택된 답변
+20 포인트
10년 전
lib/thumbnail.lib.php 75라인 정도에 있는
하단 소스에서 이미지 alt값 자체를 삭제 처리 하면 됩니다.
if ($width) {
$thumb_tag = '<img src="'.G5_URL.str_replace($filename, $thumb_file, $data_path).'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'"/>';
} else {
$thumb_tag = '<img src="'.G5_URL.str_replace($filename, $thumb_file, $data_path).'" alt="'.$alt.'"/>';
}
이 부분에 alt값 삭제 / 하단 소스에서 093 ~ 097 라인
Copy
// 게시글보기 썸네일 생성function get_view_thumbnail($contents, $thumb_width=0){ global $board, $config; if (!$thumb_width) $thumb_width = $board['bo_image_width']; // $contents 중 img 태그 추출 $matches = get_editor_image($contents, true); if(empty($matches)) return $contents; for($i=0; $i\'\"]+[^>\'\"]+)/i", $img, $m); $src = $m[1]; preg_match("/style=[\"\']?([^\"\'>]+)/i", $img, $m); $style = $m[1]; preg_match("/width:\s*(\d+)px/", $style, $m); $width = $m[1]; preg_match("/height:\s*(\d+)px/", $style, $m); $height = $m[1]; preg_match("/alt=[\"\']?([^\"\']*)[\"\']?/", $img, $m); $alt = get_text($m[1]); // 이미지 path 구함 $p = parse_url($src); if(strpos($p['path'], '/'.G5_DATA_DIR.'/') != 0) $data_path = preg_replace('/^\/.*\/'.G5_DATA_DIR.'/', '/'.G5_DATA_DIR, $p['path']); else $data_path = $p['path']; $srcfile = G5_PATH.$data_path; if(is_file($srcfile)) { $size = @getimagesize($srcfile); if(empty($size)) continue; // jpg 이면 exif 체크 if($size[2] == 2 && function_exists('exif_read_data')) { $degree = 0; $exif = @exif_read_data($srcfile); if(!empty($exif['Orientation'])) { switch($exif['Orientation']) { case 8: $degree = 90; break; case 3: $degree = 180; break; case 6: $degree = -90; break; } // 세로사진의 경우 가로, 세로 값 바꿈 if($degree == 90 || $degree == -90) { $tmp = $size; $size[0] = $tmp[1]; $size[1] = $tmp[0]; } } } // 원본 width가 thumb_width보다 작다면 if($size[0]
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
10년 전
위의 소스 적용을 해도 변화가 없었고요.
다른방법으로 해결 되었습니다.
에디터 자체 문제인거 같더군요...
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인