웹마스터 팁

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

1
2
3
4
5
// 이미지외의 경우는 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=\"\" />");
            }
            */
1
위에 부분을 아래와 같은 구문으로 변경 
1
2
3
4
            // 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


1
2
3
4
// 이미지외의 경우는 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;
            }



제목 글쓴이 날짜
검색 로봇 막기 (검색 bot 막기) jiom 2013.12.05
누리CMS 에디터 잡 버그 있으신 분들 보세요. [2] explode 2013.12.03
XE 지식인 모듈에서 일반 게시판처럼 검색하기 [3] explode 2013.12.02
XE 1.7 에서 사이트맵에서 '메뉴 노출 대상' 설정할때 복수 그룹 선택시 에러 수정법 [1] sejin7940 2013.12.01
소셜 XE 페이스북 로그인 에러 해결 방법 file 신평 2013.11.30
라르게덴님의 Xpresseditor + AXISJ AXUpload5(HTML5)와 mex_default 스킨 [5] 투씨 2013.11.29
팝업묘듈/팝업애드온 사용시 창이동 안될때.. [2] 착한악마 2013.11.29
cafeXE 위젯 설정에서 대상모듈 저장이 안 되는 경우 투씨 2013.08.02
레이아웃을 불려오지 않게 하는 코드 [4] 착한악마 2013.11.13
multimedia file 첨부 시 자동으로 jw player 로 설정 더뿌 2013.11.27
디자인을 위한 팁...Adobe Generator for Photoshop CC [7] kj1212_ 2013.11.26
도트 이모티콘 생성기 [21] 예뜨락 2006.10.30
1.4.2 -> 1.4.3 업데이트 후 화면 백지 상태 해결방법 [2] 니오티 2010.07.25
댓글창 배경이미지 클릭시 사라지게 만들기 [2] 귀머거리하늘 2013.11.23
'본문내 이미지 조절 애드온' 이 페이지모듈에서는 자동으로 작동 안 하게 하는 방법 sejin7940 2013.11.23
요즘 만들고 있는 사이트에 적용한 것(모바일 확장변수) [4] 유니눅스 2012.07.30
Content 확장위젯2 에서 권한설정 안되던 버그 xe1.7 garnecia 2013.11.18
그누보드 > XE 이전툴 이용하여 이전하는 방법 [4] 개터리 2013.04.26
XE1.7 사이트맵에서 권한설정시 특정그룹을 선택해 등록하면 권한이 등록 안 되는 버그 수정법 (추가) sejin7940 2013.10.30
다운로드 랭킹 위젯 simulz 님 스킨 단락 흐트러짐 문제 해결 [2] socialskyo 2013.11.14