웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
multimedia file 첨부 시 자동으로 jw player 로 설정
2013.11.27 17:38
simple_jw component 사용하는 내용입니다.
이미지를 제외한 Multimedia file 을 upload 시 default component 를 simple_jw(jwplayer6)로 변경하는 tip입니다.
모바일 & PC 에서 동영상 재생을 쉽게 하기 위함.
1. 기본적으로 쉬운설치에서 editor component simple_jw 설치
2. modules/editor/tpl/js/upload.js 파일 수정
(Default 변경 지정 부분)
upload.js
// 이미지외의 경우는 multimedia_link 컴포넌트 연결 /* } else { text.push("<img src=\"common/img/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+file.download_url+"\" width=\"400\" height=\"320\" style=\"display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />"); } */
위에 부분을 아래와 같은 구문으로 변경
// simple_jw 연결 부분 } else { text.push("<img src=\"common/img/blank.gif\" editor_component=\"simple_jw\" simple_jw_src=\""+file.download_url+"\" width=\"700\" height=\"500\" style=\"display:block;width:700px;height:500px;border:2px dotted #4371B9;background:url(./modules/editor/components/simple_jw/tpl/simple_jw_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />"); }
AXISJ AXUpload5(HTML5) editor 사용시에는 아래와 같이 Default를 변경 할 수 있다.
-Editor Skin 내 파일 수정
Axupload5fornuri.js
// 이미지외의 경우는 multimedia_link 컴포넌트 연결 } else { text.push("<img src=\"common/img/blank.gif\" editor_component=\"simple_jw\" simple_jw_src=\""+this.download_url+"\" width=\"400\" height=\"320\" style=\"display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/simple_jw/tpl/simple_jw_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />"); }
이렇게 하면 multimedia 파일 삽입 시 default 로 simple_jw으로 Component Defalut가 변경.
그리고 업로드를 mp4 파일을 업로드 시킬경우에 Mobile, PC 에서 본문 삽입만으로도 동영상을 재생 가능함.
Mobile 의 경우 simple_jw 에서 mobile size 를 제한하고 있어서, 그부분도 상황에 맞게 수정이 필요할듯 함.
/modules/editor/components/simple_jw/simple_jw.class.php
60 61 62 63 64 65 66 67 68 | preg_match_all( '/(width|height)([^[:digit:]]+)([0-9]+)/i' ,$style,$matches); $width = trim($matches[3][0]); $height = trim($matches[3][1]); if (!$width) $width = 400; if (!$height) $height = 300; if (Mobile::isMobileCheckByAgent()){ $width = 350; $height = 220; } |
댓글 0
제목 | 글쓴이 | 날짜 |
---|---|---|
회원 순위 공동순위 표시해서 뽑기(원리만 소개) | 라르게덴 | 2009.02.13 |
주민등록번호 입력 폼 추가 (1.1.5 기준) [39] | 개돌 | 2009.02.16 |
TortoiseSVN에서 특정 리비전 영역만 추출하기 [1] | ◀CGlink▶ | 2009.02.19 |
IIS에서 XE 설치 시 FTP 정보 등록에서 오류 조치 [4] | impre | 2009.02.20 |
플래너 최근문서(위젯)에 카테고리색 적용, Dday 적용, 지난 일정 출력 여부 조절 [7] | 주상태 | 2009.02.21 |
20메가 업로드 용량제한에 대한 이야기 ^^ [9] | 만쓰별(정만) | 2009.02.22 |
textarea 에디터를 사용하는 리플에서 태그 막기 [2] | 老姜君 | 2009.02.22 |
확장변수전용 권한설정 게시판스킨 미권한자에게 출력 (''깜박''오류?) 보고 | 0su | 2009.02.25 |
테스트용 아이디 탈퇴 막기 [1] | SMaker | 2009.02.26 |
lighttpd 에서 XE rewrite 기능 (.htaccess) 사용하기 [2] | msl2246 | 2009.02.28 |
첨부파일의 외부 무단 링크 차단하기(XE) 게시판설정 [7] | 왕초보왕따 | 2009.03.02 |
윈도우, 리눅스, 맥서버에서 이슈트래커 동작가능하게 하기 [1] | 뽀여니 | 2009.03.02 |
2003 + RWAPM + faceOff + IE7 = rewrite mod 에러 | neotec | 2009.03.03 |
Smarty 한글 메뉴얼 공개합니다. [1] | 미니미 | 2009.03.04 |
이슈 트래커 소유자 변경 시 그룹별 선택 기능 | 개돌 | 2009.03.05 |
사진이 떳다 사라지는 문제 해결법 [2] | 현진 | 2009.03.07 |
게시판 가로사이즈 줄이기....[초보만 클릭] [4] | 유팔복 | 2009.03.07 |
svn 업으로 xe 최신본 유지하기 [2] | e~세상쉼터 | 2009.03.08 |
Faceoff 버젼에서 확장변수 마음대로 배치하기 ^^ | 파파민 | 2009.03.13 |
게시물 가운데 정렬 문제 임시해결법 | 한신일 | 2009.03.15 |