[이윰] 이윰빌더 최신글 본문 추출시 엔터, 띄어쓰기 태그를 스페이스(한 칸 띄우기)로 바꾸기

페이지 정보

shadow2fox 1,900 2018.07.12 18:48

평점

본문

이윰빌더 최신글 본문 추출시 엔터, 띄어쓰기 태그를 스페이스(한 칸 띄우기)로 바꾸기
최신글 본문 추출시 에디터를 통해 작성된 게시글일 경우 이윰빌더는 엔터, 띄어쓰기, & n b s p; 태그를 아예 제거해 추출된 본문이 의도치 않게 다닥다닥 붙어버린다.
위와 같은 문제를 해결하기 위해 그누보드5/eyoom/classes/eyoom.class.php를 열어 public function remove_editor_code($content) {를 검색하여 다음과 같이 수정한다.

수정 전

    public function remove_editor_code($content) {
        $content = preg_replace("/\\n/","",$content);
        $content = preg_replace("/\s{2,}/","",$content);
수정 후

    public function remove_editor_code($content) {
        //$content = preg_replace("/\\n/","",$content);
        //$content = preg_replace("/\s{2,}/","",$content);
        $content = str_replace(array("\R", "<br />", "<br/>", "<br>", " ")," ", $content);        // 본문 추출시 enter로 만든 태그, & n b s p; 스페이스 하나로
        $content = preg_replace("/\s{2,}/"," ",$content);
추천인
  • 추천해 주세요
10
shadow2fox - 회원등급 : 자연/Level 142 - 포인트 : 2,539,715
레벨 142
경험치 3,033,314

Progress Bar 71%

- 가입일 : 2015-03-10 12:21:44
- 서명 : 인간에게 가장 큰 선물은 자기 자신에게 기회를 주는 것이다. - 크리스 가드너, Chris Gardner -
- 자기소개 : There's never a shortcut to happiness.

댓글

첫 번째 댓글을 남겨 주세요