웹마스터 팁
특정 게시판, 업로드된 그림 자동으로 본문에 출력하기
2008.02.03 16:45
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"로 하시면 첨부파일이 그림파일이면 자동으로 본문에 그림이 삽입됩니다.
- [2008/02/13] 웹마스터 팁 특정게시판, 비밀글로 작성하기 *19