11.Nas_1


불당썸, 에디터 사용시 썸네일 생성 에러 근본적인 해결방법




컨텐츠 정보


본문

불당썸, 에디터 사용시 썸네일 생성 에러 근본적인 해결방법 \r\n
\r\n
  • 리리치요 \r\n
  • 작성일시 2013.01.25 18:41:15 \r\n
  • 조회 91 \r\n
  • 댓글 0
\r\n

본문

\r\n
불당썸, 에디터 사용시 썸네일 생성 에러 근본적인 해결방법입니다
보통 크롬으로 글쓸때 이런 오류가 발생하던데요..
img 태그 순서때문에 발생한 오류 인데요
저의 경우를 예로 들자면
크롬에서올릴때는

<img src="http://uani.wowip.kr/data/cheditor4/1301/fbd52e0c2c7b61a501bf424960aecd3f_6wLR6duQjfSSZFKrF.png" width="171" height="200" alt="유애니.png" style="border: none" />

이렇게 src,width,height,alt,style 순으로 나와버려서
리스트에서 $list[$i]["wr_content"] 이걸로 사진을 뽑을때 이미지 주소가
http://uani.wowip.kr/data/cheditor4/1301/fbd52e0c2c7b61a501bf424960aecd3f_6wLR6duQjfSSZFKrF.png" width="171" height="200" alt="유애니.png"
이렇게 나와서 오류가 나버리죠

익스플로러에서 이미지를 올리면
<img width="171" height="200" style="border: currentColor" alt="유애니.png" src="http://uani.wowip.kr/data/cheditor4/1301/fbd52e0c2c7b61a501bf424960aecd3f_yaF3ccsWuEzjMtUNduT.png" />

width,height,style,alt,src 순으로나와서 썸생성이 가능해지죠
그런데 사실 알고보니 익스플로러에서 오류로 썸이 생성되는 거더라구요

cheditor5/cheditor.js에서 2030번째줄 부근을 보면

img.setAttribute('src', attr.src);
img.setAttribute('width', attr.width);
img.setAttribute('height', attr.height);
img.setAttribute('alt', attr.alt ? attr.alt : attr.info.origName);
img.style.border = 'none';

이렇게 되잇어요 순서가 크롬에서 올라가는 순서(src,width,height,alt,style) 그대로죠?
그래서 크롬의 오류가 아니라 익스플로러의 오류로 썸이 생성되는 거라는 걸 알앗어요..
정말.. 싫네요 익스플로러는 하여튼 저걸 순서를 바꿔서

img.setAttribute('width', attr.width);
img.setAttribute('height', attr.height);
img.setAttribute('alt', attr.alt ? attr.alt : attr.info.origName);
img.setAttribute('src', attr.src);
img.style.border = 'none';

이렇게 수정해주면(img.setAttribute('src', attr.src); 이게 4번째 줄로 이동)
width,height,alt,src,style 순으로 배열이 오류가 안나겟죠

이상 php초보의 불당썸, 에디터 사용시 썸네일 생성 에러 해결방법이엇습니다~
\n
[이 게시물은 관리자님에 의해 2013-11-18 21:29:50 11.H_BBS에서 이동 됨]
뷰PDF add1,add2



관련자료

댓글 0
등록된 댓글이 없습니다.


전체 1,749 / 9 페이지
전체 1,749 / 9 페이지



♥간단_메모글♥


최근글


새댓글



PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
▶ 2024-05-20 14:48:04

오늘의 홈 현황


  • 현재 접속자♨ 71(1) 명
  • 오늘 가입자※ 3 명
  • 어제 가입자※ 2 명
  • 주간 가입자※ 12 명
  • 오늘 방문자 819 명
  • 어제 방문자 1,215 명
  • 최대 방문자 13,042 명
  • 전체 방문자 4,332,021 명
  • 전체 게시물※ 8,585 개
  • 전체 댓글수※ 24,629 개
  • 전체 회원수 10,978 명

QR코드


☞ QR코드 스캔은 kakao앱 자체 QR코드

알림 0








최신글↑