썸네일 생성시 클래스 태그 가져오기 > 기능 소개

본문 바로가기

Froala 기능

[이윰] 썸네일 생성시 클래스 태그 가져오기

본문

그누보드5에는 문제가 없으나,

이윰 같은경우 '썸네일' 생성 시 클래스(Class)값을 포함 안시키는걸 확인했습니다.


클래스를 가져오는 방법을 알려드립니다.


<이윰>

파일 위치 : /eyoom/class/bbs.class.php



수정 1. 1169번 줄


[수정 전]

            preg_match("/src=[\'\"]?([^>\'\"]+[^>\'\"]+)/i", $img, $m);
            $src = isset($m[1]) ? $m[1] : '';
            preg_match("/style=[\"\']?([^\"\'>]+)/i", $img, $m);
            $style = isset($m[1]) ? $m[1] : '';
            preg_match("/width:\s*(\d+)px/", $style, $m);
            $width = isset($m[1]) ? $m[1] : '';
            preg_match("/height:\s*(\d+)px/", $style, $m);
            $height = isset($m[1]) ? $m[1] : '';
            preg_match("/alt=[\"\']?([^\"\']*)[\"\']?/", $img, $m);
            $alt = isset($m[1]) ? get_text($m[1]) : '';


[수정 후]

            preg_match("/src=[\'\"]?([^>\'\"]+[^>\'\"]+)/i", $img, $m);
            $src = isset($m[1]) ? $m[1] : '';
            preg_match("/style=[\"\']?([^\"\'>]+)/i", $img, $m);
            $style = isset($m[1]) ? $m[1] : '';
            preg_match("/width:\s*(\d+)px/", $style, $m);
            $width = isset($m[1]) ? $m[1] : '';
            preg_match("/height:\s*(\d+)px/", $style, $m);
            $height = isset($m[1]) ? $m[1] : '';
            preg_match("/alt=[\"\']?([^\"\']*)[\"\']?/", $img, $m);
            $alt = isset($m[1]) ? get_text($m[1]) : '';
            preg_match("/class=[\"\']?([^\"\']*)[\"\']?/", $img, $m);
            $class = isset($m[1]) ? $m[1] : '';




수정 2. 1261번 줄


[수정 전]

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.'" />';
 }


[수정 후]

if ($width) {
$thumb_tag = '<img src="'.G5_URL.str_replace($filename, $thumb_file, $data_path).'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'" class="'.$class.'"/>';
 } else {
$thumb_tag = '<img src="'.G5_URL.str_replace($filename, $thumb_file, $data_path).'" alt="'.$alt.'" class="'.$class.'"/>';
 }


끝.

0
로그인 후 추천 또는 비추천하실 수 있습니다.

댓글목록0

등록된 댓글이 없습니다.
전체 8 건 - 1 페이지
번호
제목
글쓴이
게시판 전체검색