바로 전의 게시물인 "업로드된 그림 자동 출력" 소스를 이용하여 특정게시판에서 업로드된 그림을 자동으로 출력하는 방법입니다.

1. zbxe설치폴더/moudles/board/skins/xe_board/skin.xml파일의 ine 92아래줄에 소스를 삽입한다. <var name="auto_img_insert" type="select">
<title xml:lang="ko">본문 자동 이미지삽입</title>
<title xml:lang="jp">본문 자동 이미지삽입</title>
<title xml:lang="zh-CN">본문 자동 이미지삽입</title>
<title xml:lang="en">본문 자동 이미지삽입</title>
<default>N</default>
<default>Y</default>
<description xml:lang="ko">
첨부파일이 이미지 파일이면 자동으로 본문에 삽입하시겠습니까?
</description>
</var>
2. zbxe설치폴더/moudles/board/skins/xe_board/view_document.html파일의 line 105의 {$oDocument->getContent()}를 지우고 아래의 소스를 삽입한다. **** 이부분은 상단의 조건식만 제외하고 소마세월님의 "업로드된 그림 자동 출력" 소스 소스입니다***** <!--@if($module_info->auto_img_insert!='N')-->
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<!--@foreach($uploaded_list as $key => $file)-->
{@$file_explode=explode(".",strtoupper($file->source_filename))}
<!--@if($file_explode[1]=="GIF" || $file_explode[1]=="JPG" || $file_explode[1]=="PNG" || $file_explode[1]=="BMP")-->
{@$picture.="<p align=center><img src='".$file->uploaded_filename."' style='' editor_component='image_link' /><br /></p>"}
<!--@end-->
<!--@end--> <!--@if($picture)-->
{@ $cont=$oDocument->get('content')}
{@ $oDocument->add('content',$cont.$picture)}
<!--@end--> {$oDocument->getContent()}
<!--@else-->
{$oDocument->getContent()}
<!--@end--> 3. 1.과2.의 과정을 수행하시고 게시판 설정에 가시면
((-------IMAGE-------))
본문 자동 이미지 삽입 에 "Y"로 하시면 첨부파일이 그림파일이면 자동으로 본문에 그림이 삽입됩니다.
by Anna 안나 2008. 4. 5. 22:38