묻고답하기

댓글에 파일 첨부를 할때 댓글과 업로드 파일을 연결하는 방법은 어떻게 되는지 궁금합니다.

{$oComment->getEditor()} 을 사용하지 않고 제작하고 있는데요....

 

현재까지 구할수 있는 건 아래와 같이

 

{@

$upload_target_srl = Context::get('upload_target_srl');

}

<!--@if(!$upload_target_srl)-->

{@$upload_target_srl = getNextSequence();}

<!--@end-->

{@

$comment_srl = Context::get('comment_srl');

$oFileModel = &getModel('file');

$uploaded_list = $oFileModel->getFiles($upload_target_srl);

}

 

comment_srl와 upload_target_srl의 uploaded_list를 연결하는 방법을 알수가 없네요.

바쁘시더라도 고수님의 조언 부탁드립니다.

 

 

 

<!--// 이미지 업로드 -->

<div id="mUpload">

<div class="bg_f_f9 clear">

<strong class="fl">{$lang->edit->upload_file}</strong> <button type="button" class="bd_btn fr" onclick="jQuery('#Filedata').click()">{$lang->upload_file}</button>

</div>

<ul id="files" class="clear">

<block cond="$oComment->hasUploadedFiles()" loop="$oComment->getUploadedFiles()=>$key,$file">

{@

$ext = substr($file->source_filename, -4);

$ext = strtolower($ext);

$type = 'etc';

if(in_array($ext,array('.jpg','jpeg','.gif','.png'))) $type = 'img';

if(in_array($ext,array('.mp3','.wav','.ogg','.aac'))) $type = 'music';

if(in_array($ext,array('webm','.mp4','.ogv','.avi','.mov','.mkv'))) $type = 'media';

}

<li id="file_{$file->file_srl}" class="success"><button type="button" data-file="{$file->uploaded_filename}" data-type="img" title="{$file->source_filename}" style="background-image:url({$file->uploaded_filename})" onclick="jQuery(this).parent().toggleClass('select')"><b>✔</b></button><a class="delete_file" href="#" onclick="delete_file({$file->file_srl});return false;"><b>X</b></a><a class="insert_file" href="#" onclick="insert_file({$file->file_srl});return false;"><i class="fa fa-arrow-up"></i></a></li>

<li cond="$type!='img'" id="file_{$file->file_srl}" class="success type2 {$type}"><small>{$file->source_filename}</small><button type="button" data-file="{$file->uploaded_filename}" data-type="{$type}" data-dnld="{$file->download_url}" onclick="jQuery(this).parent().toggleClass('select')"><b>✔</b></button><a class="delete_file" href="#" onclick="delete_file({$file->file_srl});return false;"><b>X</b></a><a class="insert_file" href="#" onclick="insert_file({$file->file_srl});return false;"><i class="fa fa-arrow-up"></i></a></li>

</block>

<li id="loading"></li>

<li class="info clear<!--@if($oComment->hasUploadedFiles())--> is_img<!--@end-->">

<span>{$lang->no_files}</span>

 

<div>

<p><i class="tx_ico_chk">✔</i>{$lang->select_files_to_insert}</p>

<input type="radio" name="m_img_upoad" id="m_img_upoad_1" checked="checked" /><label for="m_img_upoad_1">{$lang->m_img_upoad_1}</label>

<input type="radio" name="m_img_upoad" id="m_img_upoad_2" /><label for="m_img_upoad_2">{$lang->m_img_upoad_2}</label>

</div>

</li>

</ul>

</div>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
손주사랑 게시물 검색에 대하여 질문 드림니다 [2] 2018.08.10 by 손주사랑
케레인 글자를 그림으로 넣고 검색 시에 텍스트로 보이게 하는 방법이 있나요? [2] 2018.08.10 by DoorWeb
맘스퀸톡톡 슬라이드 이미지 속도전환 [1] 2018.08.10 by DoorWeb
ㄱㄱㄱ 개인 홈페이지 만들기를 찾다가 여기까지 왔는데요 [2] 2018.08.10 by DoorWeb
에이트 CKEditor 붙여넣기 한 후 되돌리기 안되는 문제  
tohappy Context 로 메뉴설명을 가져올 수 있나요?  
나루토fc9de 최초 메인 화면이 이상해요. 로그인 하면 메인화면이 정상입니다. 왜요? [1] file 2018.08.09 by DoorWeb
더로드 관리자 로그인시에만 화면이 제대로 나오는데... [2] file 2018.08.09 by 나루토fc9de
호돌이옆집아저씨 니코 위젯스타일 제목 색상을 바꾸고 싶어요?  
파파베어 유튜브 라이브 스트림 임베드 주소 채널주소로 이제안되나요?  
흑묘백묘 sketchbook5 게시판스킨 PC화면에서 빵조각 사라집니다. [2] file 2018.08.08 by 흑묘백묘
해해 xe 게시판 비밀 댓글 설정 하는법..... [2] 2018.08.08 by 해해
좋은사람임 외부페이지로 내용 구성시 관리자만 볼수 있도록 할려면 어떤 코드를 어디에다가 삽입해야되나요? [4] 2018.08.08 by 좋은사람임
dikafryo 코어 자동업데이트하고 홈페이지 404 에러 ㅠㅠ [1] 2018.08.08 by dikafryo
검푸 테이블 레이아웃 모바일로 변환 하는 방법 [2] 2018.08.08 by DoorWeb
rail_man 메뉴은 어떻게 노출이 되는지요...?????? file  
초보덕 타사이트 게시글 퍼오는 모듈/프로그램 관련 [2] 2018.08.07 by NEX
신라면 상업용 홈페이지 만들기 vs 게임 중에서 고민입니다. [1] 2018.08.07 by DoorWeb
신비의불 xe core1.9.x 업데이트 준비 [4] 2018.08.06 by 기타치는목수
빈티지 httrack 웹사이트 소스를 긁어오는 소스  
아러다아 페이지 모듈을 제작하려고 하는데 꺼집니다. [1] file 2018.08.06 by pmacsoft
두비두바 검색 폼을 만들려고 합니다 도움 부탁드려요ㅠㅠ [1] 2018.08.06 by pmacsoft
금붕어 버전 1.9.6 업데이트 방법문의 [2] 2018.08.05 by 금붕어
코코넛61088 write_form 관련된 질문입니다. [2] file 2018.08.05 by 코코넛61088
ti**** 개인정보보호를 위한 보안서버 구축 안내 - 메일 [4] file 2018.08.03 by ti****
ti**** 리다이렉션  
근바 fatal 오류 ... [1] 2018.08.03 by Luatic™
에이비이 my sql에서 table 컬럼 삭제했을때 복구할수있는 방법 [1] 2018.08.02 by sejin7940
댑펑 도와주세요 무슨 이유인지.. [1] 2018.08.02 by Luatic™
댑펑 추가 질문드립니다. 서버 접속 문제 [1] 2018.08.02 by Luatic™