4.x 버젼의 cheditor에서는 이 기능을 지원하지 않습니다.
용량 제한을 하는게 cheditor에 없거든요.
===
lib/cheditor4.lib.php에서 아래 코드를 추가 합니다.
function cheditor2($id, $content='')
{
global $g4, $board;
{
global $g4, $board;
return "
<textarea name='{$id}' id='tx_{$id}' style='display:none;'>{$content}</textarea>
<script type='text/javascript'>
ed_{$id}.config.boTable = '$board[bo_table]';
ed_{$id}.config.allowedMaxImgSize = '{$g4[cheditor_uploadsize]}';
ed_{$id}.run();
</script>";
}
<textarea name='{$id}' id='tx_{$id}' style='display:none;'>{$content}</textarea>
<script type='text/javascript'>
ed_{$id}.config.boTable = '$board[bo_table]';
ed_{$id}.config.allowedMaxImgSize = '{$g4[cheditor_uploadsize]}';
ed_{$id}.run();
</script>";
}
config.php에 용량을 제한하는 설정을 추가 합니다.
// cheditor의 이미지 업로드 사이즈는 바이트로 줘야 합니다.
// 예) 5 * 1000 * 1000; // 크기 단위 바이트, 기본값 0 (제한 없음)
$g4['cheditor_uploadsize'] = 0;
// 예) 5 * 1000 * 1000; // 크기 단위 바이트, 기본값 0 (제한 없음)
$g4['cheditor_uploadsize'] = 0;
- opencode.co.kr -