그누보드 에디터 높이 설정[관리자 > 환경설정 - 에디터 높이] > 그누보드5 스킨

그누보드5 스킨

좋은 댓글과 좋아요는 제작자에게 큰힘이 됩니다.

그누보드 에디터 높이 설정[관리자 > 환경설정 - 에디터 높이] 정보

레이아웃 그누보드 에디터 높이 설정[관리자 > 환경설정 - 에디터 높이]

첨부파일

g5.zip (44.9K) 15회 다운로드 2021-11-03 16:56:40 포인트 차감10
테스트한 버전5.4.16
호환 가능 버전5.4

본문

그누보드 에디터 높이설정
에디터 : cheditor5, smarteditor2
수정된 파일 : 
[관리자-기본환경설정]
/adm/config_form.php

/adm/config_form_update.php
[관리자-게시판별 높이설정]

/adm/board_form.php

/adm/board_form_update.php
[게시판]
/bbs/write.php
[플러그인]

/plugin/editor/cheditor5/editor.lib.php

/plugin/editor/smarteditor2editor.lib.php
 

1. 관리자 > 환경설정 - 에디터 높이 추가 

설정파일 : /adm/config_form.php

31line cf_editor 아래에 아래 코드 추가

if(!isset($config['cf_editor_height'])) {
    sql_query(" ALTER TABLE `{$g5['config_table']}`
                    ADD `cf_editor_height` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_editor` ", true);
}
507line 에디터 선택 아래에 아래 코드 추가

<tr>
    <th scope="row"><label for="cf_editor">에디터 높이</label></th>
    <td colspan="3">
        <?php echo help('에디터 높이(기본:300px)') ?>
        <input type="text" name="cf_editor_height" value="<?php echo (int) $config['cf_editor_height']; ?>" id="cf_editor_height" required class="required frm_input" size="5"> px
    </td>
</tr>

2. 관리자 > 환경설정 - 에디터 높이 반영
설정파일 : /adm/config_form_update.php
25line $check_keys > cf_editor_height 추가

274line cf_editor = '{$_POST['cf_editor']}', 아래에 아래 코드 추가

cf_editor = '{$_POST['cf_editor']}',

3. 관리자 - 게시판 수정 - 에디터 높이 추가

설정파일 : /adm/board_form.php
86line 아래코드 추가

if (!isset($board['bo_select_editor_height'])) {
    sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_select_editor_height` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_select_editor` ", false);
}
106line 아래코드추가
'bo_select_editor_height'=>'',
568line 아래코드 추가

<tr>
    <th scope="row"><label for="bo_select_editor_height">게시판 에디터 높이</label></th>
    <td>
        <?php echo help('에디터 기본높이 300px') ?>
        <input type="text" name="bo_select_editor_height" value="<?php echo $board['bo_select_editor_height'] ?>" id="bo_select_editor_height" class="numeric frm_input" size="10"> px
    </td>
    <td class="td_grpset">
        <input type="checkbox" name="chk_grp_select_editor_height" value="1" id="chk_grp_select_editor">
        <label for="chk_grp_select_editor_height">그룹적용</label>
        <input type="checkbox" name="chk_all_select_editor_height" value="1" id="chk_all_select_editor">
        <label for="chk_all_select_editor_height">전체적용</label>
    </td>
</tr>

4. 관리자 - 게시판 수정 - 에디터 높이 반영
설정파일 : /adm/board_form_update.php
132line 아래코드 추가

$bo_select_editor_height = isset($_POST['bo_select_editor_height']) ? clean_xss_tags($_POST['bo_select_editor_height'], 1, 1) : '';
189line 아래코드 추가

bo_select_editor_height    = '{$bo_select_editor_height}',
379line 아래코드 추가

if (is_checked('chk_grp_select_editor_height')) $grp_fields .= " , bo_select_editor_height = '{$bo_select_editor_height}' ";
470line 아래코드 추가

if (is_checked('chk_all_select_editor_height')) $all_fields .= " , bo_select_editor_height = '{$bo_select_editor_height}' ";

5-1. 플러그인 에디터 설정파일 수정
[cheditor5]
파일경로 : /plugin/editor/cheditor5/editor.lib.php
23line 아래에 아래 코드 수정
기존 : $height = isset($editor_height) ? $editor_height : "250px";
수정 : $height = isset($editor_height) ? $editor_height : "300px";

[smarteditor]
파일경로 : /plugin/editor/smarteditor2/editor.lib.php
6line 아래에 아래 코드 추가

global $editor_width, $editor_height;
22line 아래에 아래 코드 추가

$width  = isset($editor_width)  ? $editor_width  : "100%";
$height = isset($editor_height) ? $editor_height : "300px";


5-2. 플러그인 에디터 설정파일 수정
[cheditor5]
추가 수정사항 없음
 
[smarteditor]
파일경로 : /plugin/editor/smarteditor2/editor.lib.php

54line 아래에 아래 코드 수정
height:300px -> height:{$editor_height}px 으로 수정
[기존 코드]

$html .= "n<textarea id="$id" name="$id" class="$smarteditor_class" maxlength="65536" style="width:100%;height:300px">$content</textarea>";
[수정 코드]

$html .= "n<textarea id="$id" name="$id" class="$smarteditor_class" maxlength="65536" style="width:{$width};height:{$height}">$content</textarea>";

6. 게시판 글쓰기 에디터 높이 설정
파일경로 : /bbs/write.php
2line 아래 코드 수정
기존

include_once(G5_EDITOR_LIB);
수정

$bo_select_editor_height = $board['bo_select_editor_height'];
$editor_height = ($bo_select_editor_height)?$bo_select_editor_height.'px':$config['cf_editor_height'].'px';
include_once(G5_EDITOR_LIB);
추천
16

댓글 전체

에디터를 게시판 및 내용관리에 분리해서 사용하기 버그 신고에 제보 했는데 이게 기획이랑 상관없다고해서.. 그냥 제 스스로 만들었습니다.. (그냥 그렇다고 댓글올려봅니다..)
전체 2,423 |RSS
그누보드5 스킨 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT