웹마스터 팁
에디터 사용 옵션으로 처리하기[BOARD MODULE][ver 1.0.1][Page4-4]
2008.04.08 20:08
적용하시기전 먼저 http://www.zeroboard.com/16700971 반드시 읽어 주세요.
1. modules/board/board.admin.controller.php
line153 부분에 소스를 삽입한다.
$extra_vars->use_category = $args->use_category=='Y'?'+ '+ 'Y':'N';
$extra_vars->list_count = $args->list_count;
$extra_vars->search_list_count = $args->search_list_count;
$extra_vars->except_notice = $args->except_notice!='Y'?'N':'Y'+ ';
$extra_vars->consultation = $args->consultation!='Y'?'N':'Y';
$extra_vars->enable_editor = $args->enable_editor!='Y'?'N':'Y';
$extra_vars->enable_comment_editor = $args->enable_comment_editor!='Y'?'N':'Y';
$extra_vars->page_count = $args->page_count;line181 부분에 소스를 삽입한다.
// 기본 값외의 것들을 정리
$extra_var = delObjectVars(Context::getRequestVars(), $args);
if($extra_var->use_category!='Y') $extra_var->use_category = 'N';
if($extra_var->except_notice!='Y') $extra_var->except_notice = 'N';
if($extra_var->consultation!='Y') $extra_var->consultation = 'N';
if($extra_var->enable_editor!='Y'+ ') $extra_var->enable_editor = 'N';
if($extra_var->enable_comment_editor!='Y') $extra_var->enable_comment_editor = 'N';
unset($extra_var->act);
unset($extra_var->page);2.modules/board/tpl/board_insert.html
line 115 부분에 소스를 삽입한다.
<tr>
<th scope="row">{$lang->consultation}</th>
<td>
<input type="checkbox" name="consultation" value="Y" <!--@if($module_info->consultation=='Y')-->checked="checked"<!--@end--> />
<p>{nl2br($lang->about_consultation)}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->editor_option}</th>
<td>
<input type="checkbox" name="enable_editor" value="Y" <!--@if($module_info->enable_editor!='N')-->checked="checked"<!--@end-->id="fld_for_category" />
<label for="fld_for_category">{nl2br($lang->about_enable_editor)}</label>
<input type="checkbox" name="enable_comment_editor" value="Y" <!--@if($module_info->enable_comment_editor!='N')-->checked="checked"<!--@end-->id="fld_for_category" />
<label for="fld_for_category">{nl2br($lang->about_enable_comment_editor)}</label></td>
</tr>3. modules/board/tpl/board_info.html
line54 부분에 소스를 삽입한다.
<tr>
<th scope="row">{$lang->consultation}</th>
<td>{$module_info->consultation=='Y'?$lang->use:$lang->notuse}</td>
</tr>
<tr>
<th scope="row">{$lang->editor_option}</th>
<td>{$lang->about_enable_editor}({$module_info->enable_editor=='Y'?$lang->use:$lang->notuse})
{$lang->about_enable_comment_editor}({$module_info->enable_comment_editor=='Y'?$lang->use:$lang->notuse})
</td>
</tr>
<tr>
<th scope="row">{$lang->header_text}</th>
<td>{htmlspecialchars($module_info->header_text)} </td>
</tr>4. modules/board/tpl/filter/insert_board.xml
line 20 부분에 소스를 삽입한다.
<param name="consultation" target="consultation" />
<param name="enable_editor" target="enable_editor" />
<param name="enable_comment_editor" target="enable_comment_editor" />
<param name="page_count" target="page_count" />
<param name="is_default" target="is_default" />5. modules/board/lang/ko.lang.php
line 37 부분에 소스를 삽입한다.
$lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다.";
$lang->editor_option = '위지웍 에디터';
$lang->about_enable_editor = '게시물 에디터';
$lang->about_enable_comment_editor = '댓글 에디터';6. modules/board/skins/xe_board/view_document.html
line 171 부분에 소스를 삽입한다.
<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() && $module_info->enable_comment_editor !='N' )-->
<!--%import("filter/insert_comment.xml")-->7. modules/board/skins/xe_board/write_from.html
line 5 부분에 소스를 삽입한다.
<input type="hidden" name="mid" value="{$mid}" />
<!--@if($module_info->enable_editor !='N')-->
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
<!--@else-->
<input type="hidden" name="content" value=" " />
<!--@end-->
<input type="hidden" name="document_srl" value="{$document_srl}" />line 88 부분에 소스를 삽입한다.
<!--@if($module_info->extra_vars)-->
<table cellspacing="0" summary="" class="extraVarsList">
<col width="150" />
<col />
<!--@foreach($module_info->extra_vars as $key => $val)-->
<!--@if($val->name)-->
<tr>
<th scope="row">{$val->name} <!--@if($val->is_required=='Y')-->*<!--@end--></th>
<td><!--#include("./extra_var_form.html")--></td>
</tr>
<!--@end-->
<!--@end-->
</table>
<!--@end-->
<!--@if($module_info->enable_editor =='N' && $val->type=='image')--><div class="editor">{$oDocument->getExtra_vars_Editor()}</div><!--@end-->
<!--@if($module_info->enable_editor !='N')--><div class="editor">{$oDocument->getEditor()}</div><!--@end-->8. common/lang/ko.lang.php
line 224 부근에 부분추가.
$lang->column_type_list['image'] = '그림삽입(image)';9. modules/board/skins/xe_board/extra_var_form.html
line 56 부근 부분추가.
<!-- 날짜 입력 -->
<!--@elseif($val->type == 'date')-->
<input type="hidden" name="{$val->column_name}" id="date_{$val->column_name}" value="{$val->value}" />
<div class="fl inputTypeText w80" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
<a href="#" onclick="open_calendar('{$val->column_name}','{$val->value}');return false;" class="button"><span>{$lang->cmd_open_calendar}</span></a>
<!-- 그림입력 -->
<!--@elseif($val->type=='image')-->
<!--@if($val->value)-->
<div>
<img src="{$val->value}" /><br />
</div>
<!--@end-->
<input type="text" name="{$val->column_name}" value="{$val->value}" size="62" />
<!--@end-->
10. modules/board/skins/xe_board/extra_var_value.htmlline 58부근 부분추가.
<!-- 날짜 입력 -->
<!--@elseif($val->type == 'date')-->
{zdate($val->value,"Y-m-d")}
<!-- 그림 입력 -->
<!--@elseif($val->type=="image")-->
<!--@if($val->value)-->
<img src="{$val->value}" /><br />
<!--@end-->
<!--@end-->