묻고답하기
썸네일 안쓰고 이미지를 직접 호출하는 방법 부탁드립니다.
2009.08.31 16:55
안녕하세요?
최근 이미지 출력 위젯을 사용하는데 움직이는 Gif 파일들이 썸네일 때문에 Jpg로 변환되어서 의도와 다르게 움직이지 않네요.
그래서 썸네일을 안쓰고 직접 호출 하는 방법 좀 부탁드립니다.
<div class="thumbnail"><a href="./{getUrl(",'document_srl',$oDocument->document_srl)}"><img src="./{$oDocument->getThumbnail($widget_info->thumbnail_width,$widget_info->thumbnail_height,$widget_info->thumbnail_type)}" border="0" alt="" class="thumbnail" /></a></div>
읽어 주셔서 감사합니다.
댓글 3
-
버전따라 틀릴수 있습니다.
-
코리아선비
2009.08.31 21:06
답변 감사드립니다.
일단 버전이 다른지 위 내용이 없네요. (1.2.4)
제가 원하는건 최근 이미지 위젯에서 xe_official를 사용하고 있는데 widgets/newest_images/skins/xe_official/list.html 내용중에서
<img src="./{$oDocument->getThumbnail($widget_info->thumbnail_width,$widget_info->thumbnail_height,$widget_info->thumbnail_type)}" border="0" alt="" class="thumbnail" />
수정 하면 될꺼 같은데 문법을 전혀 잘 몰라서 어렵네요.
원하는 답은 아니지만 댓글 감사드립니다.
글쓴이 | 제목 | 최종 글 |
---|---|---|
XE | 공지 글 쓰기,삭제 운영방식 변경 공지 [16] | 2019.03.05 by 남기남 |
초보^^ | 게시판에 첨부파일 이름 안뜨게 하는 방법 알려주세요. [2] | 2009.08.31 by 초보^^ |
위젯 | 웹에디터로 페이지를 만든경우 최근게시물 위젯사용은 불가한가요 [2] | 2009.08.31 by 위젯 |
워나트 | php if else 구문 [6] | 2009.08.31 by 워나트 |
ㅁㅁ | files>cache>optimized 질문 [4] | 2009.08.31 by ㅁㅁ |
핑크형준 | 오류............ㅠㅠ | |
kangta | 다른사이트의 기능하나를 실현하려구 합니다 [3] | 2009.08.31 by 金东峰 |
쥐엉 | 위젯에서 list.html파일 관련입니다. [1] | 2009.08.31 by 金东峰 |
헤헤 | 자기소개 등의 내용만들때요~ [1] | 2009.08.31 by mc뷰 |
Master Snake | 업데이트를 한뒤 발생한 문제 [2] | 2009.08.31 by Master Snake |
마리아플 |
제로보드 xe 글자입력칸이 클릭이 않됩니다..
[1]
![]() | 2009.08.31 by 코리아선비 |
제로카 | 한국인터넷진흥원 시정 | |
마에야히 |
div에 스크롤이 있는데도 자꾸 내용이 넘쳐요ㅜㅜ(사진첨부)
![]() | |
왜만지냐 | php "count"는 xe에서 어떻게 적으면 되나요?? [2] | 2009.08.31 by 왜만지냐 |
퐁퐁퐁퐁 | 국기 이미지 클릭시 해당언어로 바뀌는방법?? [2] | 2009.08.31 by 퐁퐁퐁퐁 |
쥐엉 | 위젯에서 list.html파일 관련 질문입니다. | |
데인Dain | 질문있슴돠 | |
천성민 | 글 쓸 때 로그인 안 하였을 경우, | |
마에야히 | iframe안에 위젯 어떻게 넣나요? [3] | 2009.08.31 by 마에야히 |
달리자 | 첫페이지의 레이아웃처럼 그림 추가는 어떻게하나요? [2] | 2009.08.31 by 달리자 |
뉴클리어 | 이런 위젯없나요.. [4] | 2009.08.31 by mc뷰 |
저는 삽질해서 실현했습니다.
/modules/document/document.item.php
function getThumbnail( 부분
// 첨부파일이 있는지 확인하고 있으면 썸네일 만듬
$oFile = &getModel('file');
$file_list = $oFile->getFiles($this->document_srl);
if(count($file_list)) {
foreach($file_list as $file) {
if($file->direct_download!='+ '+ 'Y') continue;
if(!preg_match("/(jpg|png|jpeg|gif)$/i",$file->source_filename)) continue;
$filename = $file->uploaded_filename;
if(!file_exists($filename)) continue;
// gif 対応 2008.07.09
//이부분을 추가했습니다.
$pathvar = pathinfo($filename);
if ($pathvar['extension'] == 'gif') {
$thumbnail_file = sprintf('%sthumbnail_%dx%d_%s.jpg', $document_path, $width, $height, $thumbnail_type);
copy($filename,$thumbnail_file);
//FileHandler::createImageFile($filename, $thumbnail_file, $width, $height, 'gif', $thumbnail_type);
} else {
FileHandler::createImageFile($filename, $thumbnail_file, $width, $height, 'jpg', $thumbnail_type);
}
if(file_exists($thumbnail_file)) return Context::getRequestUri().$thumbnail_file;
}
}