|
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index bea127247..79a882870 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -114,6 +114,7 @@ $sql_common = " gr_id = '{$gr_id}',
bo_use_file_content = '{$_POST['bo_use_file_content']}',
bo_use_secret = '{$_POST['bo_use_secret']}',
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
+ bo_select_editor = '{$_POST['bo_select_editor']}',
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
bo_use_good = '{$_POST['bo_use_good']}',
bo_use_nogood = '{$_POST['bo_use_nogood']}',
@@ -301,6 +302,7 @@ if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sidevi
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
+if (is_checked('chk_grp_select_editor')) $grp_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
@@ -390,6 +392,7 @@ if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sidevi
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
+if (is_checked('chk_all_select_editor')) $all_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
diff --git a/common.php b/common.php
index e1a00b2ba..4423de19b 100644
--- a/common.php
+++ b/common.php
@@ -260,10 +260,6 @@ if( $config['cf_cert_use'] || (defined('G5_YOUNGCART_VER') && G5_YOUNGCART_VER)
define('G5_HTTP_BBS_URL', https_url(G5_BBS_DIR, false));
define('G5_HTTPS_BBS_URL', https_url(G5_BBS_DIR, true));
-if ($config['cf_editor'])
- define('G5_EDITOR_LIB', G5_EDITOR_PATH."/{$config['cf_editor']}/editor.lib.php");
-else
- define('G5_EDITOR_LIB', G5_LIB_PATH."/editor.lib.php");
define('G5_CAPTCHA_DIR', !empty($config['cf_captcha']) ? $config['cf_captcha'] : 'kcaptcha');
define('G5_CAPTCHA_URL', G5_PLUGIN_URL.'/'.G5_CAPTCHA_DIR);
@@ -461,12 +457,22 @@ if ($bo_table) {
}
}
}
+
+ // 게시판에서
+ if (isset($board['bo_select_editor']) && $board['bo_select_editor']){
+ $config['cf_editor'] = $board['bo_select_editor'];
+ }
}
if ($gr_id && !is_array($gr_id)) {
$group = get_group($gr_id);
}
+if ($config['cf_editor']) {
+ define('G5_EDITOR_LIB', G5_EDITOR_PATH."/{$config['cf_editor']}/editor.lib.php");
+} else {
+ define('G5_EDITOR_LIB', G5_LIB_PATH."/editor.lib.php");
+}
// 회원, 비회원 구분
$is_member = $is_guest = false;
@@ -655,7 +661,6 @@ include_once(G5_BBS_PATH.'/visit_insert.inc.php');
// 일정 기간이 지난 DB 데이터 삭제 및 최적화
include_once(G5_BBS_PATH.'/db_table.optimize.php');
-
// common.php 파일을 수정할 필요가 없도록 확장합니다.
$extend_file = array();
$tmp = dir(G5_EXTEND_PATH);
diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql
index 81c8645df..61b3e72af 100644
--- a/install/gnuboard5.sql
+++ b/install/gnuboard5.sql
@@ -47,6 +47,7 @@ CREATE TABLE IF NOT EXISTS `g5_board` (
`bo_use_file_content` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_secret` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_dhtml_editor` tinyint(4) NOT NULL DEFAULT '0',
+ `bo_select_editor` varchar(50) NOT NULL DEFAULT '',
`bo_use_rss_view` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_good` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_nogood` tinyint(4) NOT NULL DEFAULT '0',
|