묻고답하기
page_full_width">
게시판에 이미지 첨부파일 목록 안보이게 하려면요
2015.06.13 13:35
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!-- // 첨부 파일 출력 // --> < dl class = "attachedFile" cond="$oDocument->hasUploadedFiles() && $module_info->display_file !='N'"> < dt > < img src = "./img/common/iconFiles.gif" width = "27" height = "11" alt="{$lang->uploaded_file}" /> < button type = "button" class = "fileToggle" onclick = "jQuery(this).parents('dl.attachedFile').toggleClass('open');return false;" >{$lang->uploaded_file} ({$oDocument->get('uploaded_count')})</ button > </ dt > < dd > < ul class = "files" > {@ $uploaded_list = $oDocument->getUploadedFiles() } < li loop="$uploaded_list=>$key, $file">< a href="{getUrl('')}{$file->download_url}">{$file->source_filename} < span class = "bubble" >[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]</ span ></ a ></ li > </ ul > </ dd > </ dl > |
이곳을 수정해야 하는데 어떻게 하면 될지 도움좀 주세요
댓글 11
-
안된다면 &&를 ||로 바꿔보세요
예전에 송동우님이 답변해주신걸 참고했습니다.
-
착한동구
2015.06.13 14:06
감사합니다 저렇게 바꿔주니 오류가 생기네요
Parse error: syntax error, unexpected '{' in /host/home2/chken/html/files/cache/template_compiled/d85310b34d0aa6488ebaa5819850a985.compiled.php on line 98
-
해당 오류는 문법 오류입니다
제가 잘못적었거나 잘못 옮겨 적은신 경우 일겁니다
제가 따로 테스트는 해볼상황이 아니라..
송동우님 코드를 거의 그대로 가져온곳이기 때문에 별문제는 없을텐데요. -
착한동구
2015.06.13 14:50
감사합니다 잘못 적은게 아니고 게시판이 달라서 그런것같습니다
-
ehii
2015.06.13 17:06
123456789101112131415161718192021<!-- // 첨부 파일 출력 // -->
<dl class="attachedFile" cond="$oDocument->hasUploadedFiles() && $module_info->display_file !='N'">
<block loop="$oDocument->getUploadedFiles()=>$key,$file">
{@ $filelist_cond = !preg_match('/\.jp(e)?g$|\.gif$|\.bmp$|\.tif$|\.png$/i',$file->source_filename);}
<block cond="$filelist_cond">
{@ $filecount +=1;}
</block>
</block>
<dt>
<img src="./img/common/iconFiles.gif" width="27" height="11" alt="{$lang->uploaded_file}" />
<button type="button" class="fileToggle" onclick="jQuery(this).parents('dl.attachedFile').toggleClass('open');return false;">{$lang->uploaded_file} ({$filecount})</button>
</dt>
<dd>
<ul class="files">
<block loop="$oDocument->getUploadedFiles()=>$key,$file">
{@ $filelist_cond = !preg_match('/\.jp(e)?g$|\.gif$|\.bmp$|\.tif$|\.png$/i',$file->source_filename);}
<li cond="$filelist_cond"><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} <span class="bubble">[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]</span></a></li>
</block>
</ul>
</dd>
</dl>
이렇게 해보세요.
-
간단하게 생각해보면
10번줄을
<li loop="$uploaded_list=>$key, $file" cond="$file->direct_download != 'Y'">
이렇게 바꿧으면 됬을거 같은데요.
-
ehii
2015.06.13 17:31
direct_download의 경우 이미지파일 외에 mp3나 swf 등의 경우에도 Y 로 지정됩니다 ㅜㅠ
-
아..
-
착한동구
2015.06.13 20:49
감사합니다 첨부는 나오는데 () 다운은 숨겨져서 나오네요 용량 작은 exe파일 올려보니 첨부(1)나오고요 첨부가 사라진건 아니지만 비슷한 방법 응용해 볼수 있겠군요 아직 실력이 없어서 안되겠지만 감사합니다
-
착한동구
2015.06.13 20:57
direct_download 부분이 없네요 업로드를 플래쉬로 사용하기 때문 아닐까 합니다
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<li loop="$uploaded_list=>$key, $file"><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} <span class="bubble">[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]</span></a></li>
</ul>
이거를
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<ul>
<!--@foreach($uploaded_list as $key => $file)-->
{@
$file_ext = substr($file->source_filename,-4);
$file_ext = strtolower($file_ext);
}
<!--@ if( $file_ext != ".jpg" && $file_ext != ".gif" && $file_ext != ".png" )-->
<li><a href="{getUrl()}{$file->download_url}">{$file->source_filename}({FileHandler::filesize($file->file_size)})({number_format($file->download_count)})</li>
<!--@ end--></a>
<!--@end-->
</ul>
로 바꿔보세요