묻고답하기

계속 같은데서 답을 못찾고 있네요..방법을 모르겠어요.ㅠㅠ

 

하나의 문서에서 여러개 에디터를 사용할때

document_srl은 하나의 값이고, editor_sequence값은 순차적으로 부여되는 것같습니다.

그러면 첨부파일을 각각 에디터에 업로드하더라도

계속 upload_target_srl값은 같아서 한 폴더에 함께 (files/attach/images/222/333)이런 식으로 한 폴더로 들어가서 해쉬코드만 다르게 붙여질수있나요?

즉, 두개의 에디터로 각각 첨부한 파일이 같은 upload_target_srl에 저장되게 할 수있는건가요?

 

제가 에디터 두개를 불러와서 파일을 각각 첨부해보니

upload_target_srl이 각각 따로 붙여져 들어가더군요... 하나의 upload_target_srl에 들어가게 하고싶은데요..가능한가요?

DB에는 document_srl값은 한개만 저장되고 upload_target_srl값은 두 에디터의 값 모드 들어갑니다..

한개의 문서에서 두개의 에디터를 사용했어도 같은 문서라면 upload_target_srl 값이 한개여 하는거 아닌가요.ㅠ

 

우선 게시판의 wirte_form.html에서


 <div class="editor">{$test_editor}</div>
 <div class="editor">{$test2_editor}</div>

설정해준 에디터 두개를 불러왔구요, 이 에디터의 설정은 board.view.php에서

 

function setTestEditor($document_srl = 0, $height = 100) {
            Context::set('document_srl', $document_srl);

            // 에디터 모듈의 getEditor를 호출하여 세팅
            $oEditorModel = &getModel('editor');
            $option->primary_key_name = 'document_srl';
            $option->content_key_name = 'content';
            $option->allow_fileupload = true;
            $option->enable_autosave = false;
            $option->enable_default_component = false;
            $option->enable_component = false;
            $option->resizable = true;
            $option->height = $height;
            $test_editor = $oEditorModel->getEditor($document_srl, $option);
            Context::set('test_editor', $test_editor);
        }
  function setTestEditor2($document_srl = 0, $height = 100) {
            Context::set('document_srl', $document_srl);

            // 에디터 모듈의 getEditor를 호출하여 세팅
            $oEditorModel = &getModel('editor');
            $option->primary_key_name = 'document_srl';
            $option->content_key_name = 'content';
            $option->allow_fileupload = true;
            $option->enable_autosave = false;
            $option->enable_default_component = false;
            $option->enable_component = false;
            $option->resizable = true;
            $option->height = $height;
            $test2_editor = $oEditorModel->getEditor($document_srl, $option);
            Context::set('test2_editor', $test2_editor);
        }

 

 

이렇게 선언해주고 가져다 사용하였습니다.. 왜 두개의 upload_target_srl값이 나오는지 모르겠습니다.ㅠㅠ

 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
온니다이브센터에서놀기 메인화면에 게시판 최근글 출력하기 [2] 2014.06.10 by DoorWeb
돌돌이433 제로보드 해외 해킹 문제 [3] 2014.06.10 by 돌돌이433
레논 제로보드 xe를 이용해서 홈페이지 제작사업이 가능한가요? [2] 2014.06.10 by 쮸야282
ForcePlane 자바스크립트로 시간표 테이블을 제어를 하고 싶습니다!  
blamebae xpressengine 회원가입 동작이상  
운명같은사람 쉬운설치가 안되서 수동으로 깔았는데 표시가 안나네요? file  
파워뭉치 이홈페이지도 xe로 이전가능할까요? [6] 2014.06.10 by 파워뭉치
궁금24 솔직하게 [3] 2014.06.10 by Double'U'
Harry 위젯페이지 수정시 에러 발생  
전재영722 스케치북 레이아웃 사용 중 푸터에서 카피라이트, 만든이 질문입니다. [5] file 2014.06.10 by Double'U'
공돌이3 갑자기 에러가 발생하였습니다. [6] 2014.06.10 by 유샤인
유샤인 Embed 의 자동시작 코드가 새 버젼(1.7.5.1)에서 안 들어 먹는 것 같은 데요... [2] 2014.06.10 by 유샤인
adfsdf23 쿡레빗 프로필 사진변경이 적용이 안됩니다.  
아이돌1972 1.2.4 -> 최신버젼 업그레이드? [2] 2014.06.10 by Luatic™
슈니슈니 작성글보기 권한을 제한하고 싶어요 [2] 2014.06.10 by 슈니슈니
CPD보드 신디케이션 연동승인됬다가 제가 따로 연동 일시중지 신청해서 보류조치되있는데  
키르엘 비밀글 클릭 시 페이지 이동 관련 [2] 2014.06.10 by 키르엘
레토나 스팸등록시 스팸단어 안뜨게 할수있나요?  
또별 소셜XE에서 네이버 ID로 로그인 할수 없나요? [1] 2014.06.09 by sejin7940
앙290 네이버 포토에디터 가져오기 5개 이상하려면 [8] 2014.06.09 by 앙290