묻고답하기
썸네일 안쓰고 이미지를 직접 호출하는 방법 부탁드립니다.
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 남기남 |
yeap |
쪽지 보내기가 사람에 따라서 보였다 안보였다가 합니다.
[8]
![]() | 2008.07.09 by yeap |
오제석 | 이해가 안가는부분,, [2] | 2008.07.09 by 띵야 |
seojungh | 질문들입니다.... [2] | 2008.07.09 by 띵야 |
코보 | 디비 환경설정파일은 [2] | 2008.07.09 by 띵야 |
after45 | 블로그 rss받아서 제로보드xe에서 출력이 가능합니까?? [2] | 2008.07.09 by after45 |
김병화999 |
제로보드 카운터 이거 맞나??? ㅋㅋㅋ
[6]
![]() | 2008.07.09 by Photoia |
조도명 | 이질문 아는분없는건가요 ㅠㅠ [1] | 2008.07.09 by Photoia |
김미영783 | 최신글 추출이요.. [1] | 2008.07.09 by 백성찬 |
Photoia | 현재접속자 알 수 있게 하는 위젯은? [5] [1] | 2008.07.09 by Photoia |
sbshs77 | 스크롤바와 에러.. [2] | 2008.07.09 by sbshs77 |
아즐란 | gallery 형에서 제목 글자수가 안 먹네요 -_-;; [2] | 2008.07.09 by 아즐란 |
davidyoo | DB관련 질문드려요~ [1] | 2008.07.09 by 띵야 |
낭만홀리님 | 탭 형식을 페이지로도 가능할까요? | |
물통 | 게시물 이나 댓글에 표시된 IP 안보이게.. [4] | 2008.07.09 by 물통 |
이규성 | 갤러리형에서 sort_index 가 이상한듯 [1] | 2008.07.10 by 덱스터 |
알고싶어요 | 본문 테두리선 문제 [1] | 2008.07.10 by 필로스 |
스포츠좋아 | 질문 드립니다. [2] | 2008.07.10 by 스포츠좋아 |
브람쓰 | xe_comments_list 테이블 구조정보좀 부탁드립니다. [3] | 2008.07.10 by 브람쓰 |
webbys |
동영상이 안되요 도와주세요
[1]
![]() | 2008.07.10 by 백성찬 |
조태영507 | 홈페이지가...흑흑 [1] | 2008.07.10 by 백성찬 |
저는 삽질해서 실현했습니다.
/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;
}
}