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.의 과정을 수행하시고 게시판 설정에 가시면
본문 자동 이미지 삽입 에 "Y"로 하시면 첨부파일이 그림파일이면 자동으로 본문에 그림이 삽입됩니다.[멀티미디어+이미지파일 자동 출력]임마누엘 시카고님<!--@else-->{@ $uplist = $oDocument->getUploadedFiles() }{@ $_count = 1 }<!--@foreach($uplist as $key => $file)-->{@ $filen=$file->uploaded_filename }<!--@if(eregi("\.(wma|mp3|asf)$",$filen))--><div id="movie1"><embed src="{$filen}" id="mediaplayer1" width="320px" height="45px" autostart=<!--@if($_count==1)-->"True"<!--@else-->"False"<!--@end--> autosize="true" autoresize="true" showcontrols="true" stretchtofit="true" /></div>{@ $_count += 1 }<!--@elseif(eregi("\.(wmv|mpg)$",$filen))--><div id="movie1"><OBJECT id="mediaplayer1" width="450px" height="396px"CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"type="application/x-oleobject"><PARAM NAME="URL" VALUE="{$filen}"><PARAM NAME="SendPlayStateChangeEvents" VALUE="True"><PARAM NAME="AutoStart" VALUE=<!--@if($_count==1)-->"True"<!--@else-->"False"<!--@end-->><param name="AutoSize" value="true"><param name="AutoResize" value="true"><param name="ShowControls" value="true"><PARAM NAME="StretchtoFit" Value="true"></OBJECT><!--@if(eregi("firefox",$_SERVER['HTTP_USER_AGENT']))--><embed src="{$filen}" id="mediaplayer1" width="450px" height="382px" autostart=<!--@if($_count==1)-->"True"<!--@else-->"False"<!--@end--> autosize="true" autoresize="true" showcontrols="true" stretchtofit="true" /><!--@end--></div>{@ $_count += 1 }<!--@elseif(eregi("\.(gif|jpg|jpeg|png|GIF|JPG|JEPG|PNG)$",$filen))-->
<div id="img1">
<img src="{$filen}">
</div>
{@ $_count += 1 }<!--@end--><!--@end-->{$oDocument->getContent()}<!--@end-->
Tip이 도움이 되었다면 댓글과 평가 부탁합니다.
Tip에 대한 궁금한 점은 댓글로 남겨 주시면 성심껏 답변 드립니다.