묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
첨부파일 목록에서 이미지는 필터링하고 싶습니다.
2012.10.15 00:27
<!--// Files -->
<div cond="$oDocument->hasUploadedFiles()" id="files" class="rd_file clear">
<a class="file_btn" href="#" onclick="jQuery(this).next().toggle();return false">파일 <b>'{$oDocument->get('uploaded_count')}'</b></a>
<ul>
<li loop="$oDocument->getUploadedFiles()=>$key,$file"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
</ul>
</div>
현재 위와 같은 소스로 되어있는데 jpg, png, gif, bmp를 첨부파일에 나오지 않도록 필터링하려면 어떻게 해야 하나요?
스케치북 게시판에서는 기본 기능이라 설정하니까 정상작동하지만 모바일에서는 정상작동하지 않습니다.. ㅜ
모바일에서도 동작하도록 하고 싶습니다...
제대로 될지 안될지는 모르지만 아무도 답변 안해서 그냥 끄적여 봅니다.
<!--// Files --><div cond="$oDocument->hasUploadedFiles()"id="files"class="rd_file clear"><aclass="file_btn"href="#"onclick="jQuery(this).next().toggle();return false">파일 <b>'{$oDocument->get('uploaded_count')}'</b></a><ul><li loop="$oDocument->getUploadedFiles()=>$key,$file">{@
$image_filename = explode(".",$file->source_filename)
}
<block cond="$image_filename[1]!='jpg' && $image_filename[1]!='png' && $image_filename[1]!='gif' && $image_filename[1]!='bmp'">
<a
class="bubble"href="{getUrl('')}{$file->download_url}"title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{
$file->source_filename}</a>
<span
class="comma">,</span></block>
</li>
</ul></div>
혹시 되는지 한번 해보세요.