웹마스터 팁

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;
            }



제목 글쓴이 날짜
SSL 적용시 작은 iframe 없애기 [1] file explode 2013.11.28
multimedia file 첨부 시 자동으로 jw player 로 설정 더뿌 2013.11.27
추천/비추천/신고시 확인(메시지 창 띄우기)하기 [21] explode 2013.11.27
phpMyAdmin 사용시 주의 사항 [2] explode 2013.11.27
메시지톡 버튼 게시판에 넣기 [18] file 착한악마 2013.11.26
디자인을 위한 팁...Adobe Generator for Photoshop CC [7] kj1212_ 2013.11.26
[수정] 댓글 삭제 간략화하기 [9] XE만세 2013.11.26
[수정]알림센터 Lite에 메일발송 기능을 추가하기 [11] file 매실茶 2013.11.25
AXISJ AXUpload5(HTML5) 파일첨부란 높이 조정하는 방법 [6] 착한악마 2013.11.25
에디터 "입력창 크기 자동조절" 체크를 기본으로 하기 [8] 투씨 2013.11.24
댓글창 배경이미지 클릭시 사라지게 만들기 [2] 귀머거리하늘 2013.11.23
'본문내 이미지 조절 애드온' 이 페이지모듈에서는 자동으로 작동 안 하게 하는 방법 sejin7940 2013.11.23
롤링 배너 이해하는데 도움이 될것 같아 올립니다 [4] file 예뜨락 2013.11.22
도메인이 바뀐후 기본 URL을 바꿨지만 2차메뉴의 링크는 바뀌지 않은 경우. [9] Ryuj 2013.11.20
모바일 게시판 사용시 글 수정 / 댓글 수정 누르면 <br/> 태그가 뜰때 팁 [12] 사쿠냥ㅋ 2013.11.19
Content 확장위젯2 에서 권한설정 안되던 버그 xe1.7 garnecia 2013.11.18
다운로드 랭킹 위젯 simulz 님 스킨 단락 흐트러짐 문제 해결 [2] socialskyo 2013.11.14
레이아웃을 불려오지 않게 하는 코드 [4] 착한악마 2013.11.13
본문 링크 새창으로 띄우기.. [9] 멀티비타민 2013.11.11
복권 모듈 가운데 긁었을때 반응하게 하기 [6] file 귀머거리하늘 2013.11.09