웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
썸네일 특정 파일로 불러오기
2014.01.21 16:54
파일 첨부시 파일 이름이 thumbnail일 경우 이 파일을 썸네일로 보여주는 방법입니다.
modules/document/document.item.php 763번째줄
if($this->get('uploaded_count')) { $oFileModel = &getModel('file'); $file_list = $oFileModel->getFiles($this->document_srl, array(), 'file_srl', true); if(count($file_list)) { foreach($file_list as $file) { if($file->direct_download!='Y') continue; if(!preg_match("/^thumbnail\.(jpg|png|jpeg|gif|bmp)$/i",$file->source_filename)) continue; $source_file = $file->uploaded_filename; if(!file_exists($source_file)) $source_file = null; else break; } if (!$source_file) { foreach($file_list as $file) { if($file->direct_download!='Y') continue; if(!preg_match("/\.(jpg|png|jpeg|gif|bmp)$/i",$file->source_filename)) continue; $source_file = $file->uploaded_filename; if(!file_exists($source_file)) $source_file = null; else break; } } } }
댓글 18
제목 | 글쓴이 | 날짜 |
---|---|---|
썸네일 특정 파일로 불러오기 [18] | Lansi | 2014.01.21 |
유챗 팝업창으로 만들기
[1]
![]() | oscarmike | 2014.04.26 |
모바일 이미지축소모드 | kdp | 2015.05.07 |
모바일 이미지 제거모드 | kdp | 2015.05.07 |
게시판의 MP3파일 갯수 표시하기
![]() | kdp | 2015.05.07 |
[서버운영] 웹 재요청 방지 및 트래픽 감소를 위한 방법 | 마루디자인 | 2015.05.06 |
member 모듈 업데이트가 계속 나오는 경우 | 고니고니 | 2015.05.06 |
속도관련 나노팁. [5] | 1052 | 2015.05.04 |
익명게시판에서 임시저장된 글을 불러와 등록하면 익명처리되지 않고 글쓴이 정보가 기록되는 버그 수정 [1] | sejin7940 | 2015.01.23 |
팝업모듈에서 jQuery 충돌 해결 - 팝업창이 안뜰때.
[5]
![]() | 똑디 | 2013.03.22 |
xe설치시 퍼미션 문제나 DB엑세스 문제 해결하기 | 길가던분 | 2015.05.01 |
[애매모호]스케치북 게시판을 뭔가 큼직큼직하게 눈에 잘들어오게 바꾸기 [10] | socialskyo | 2014.01.03 |
PC에서 모바일화면 보는방법 [2] | 빅스타 | 2015.04.29 |
스케치북 게시판 추천+등록 버튼 만들기 (수정)
[8]
![]() | 숭숭군 | 2012.09.22 |
양력을 음력으로... [7] | pupstar | 2001.08.14 |
[초간단 자바스크립트!] 이미지 드래그하기..~~ [8] | ∑Ztxy | 2003.11.02 |
간편 css 압축 | Ansi™ | 2015.04.21 |
XE 1.5 이상으로 DB 이전시 일부 DB가 빠질 경우 - 내용추가(0203) [7] | sejin7940 | 2012.02.02 |
정렬을 사용자정의값으로 한 경우 저장이 안 되는 현상 수정 [1] | sejin7940 | 2015.01.06 |
프리 반응형 템플릿(html/css/js) 다운받을 수 있는 곳 [1] | jhsongsh | 2014.10.28 |