게시글 글자수 제한 해제하는법 부탁드립니다
본문
생초보입니다.^^
게시글 작성시 본문 글자수 제한방법좀 부탁드립니다.
db의 wr_content에는 longtext로 되어있는것 같습니다?.
테이블 구조 `g5_write_test5`
--
CREATE TABLE IF NOT EXISTS `g5_write_test5` (
`wr_id` int(11) NOT NULL auto_increment,
`wr_num` int(11) NOT NULL default '0',
`wr_reply` varchar(10) NOT NULL,
`wr_parent` int(11) NOT NULL default '0',
`wr_is_comment` tinyint(4) NOT NULL default '0',
`wr_comment` int(11) NOT NULL default '0',
`wr_comment_reply` varchar(5) NOT NULL,
`ca_name` varchar(255) NOT NULL,
`wr_option` set('html1','html2','secret','mail') NOT NULL,
`wr_subject` varchar(255) NOT NULL,
`wr_content` longtext NOT NULL,
`wr_link1` text NOT NULL,
`wr_link2` text NOT NULL,
`wr_link1_hit` int(11) NOT NULL default '0',
`wr_link2_hit` int(11) NOT NULL default '0',
`wr_hit` int(11) NOT NULL default '0',
그리고 검색해서 /bbs/write_update.php는
$wr_content = '';
if (isset($_POST['wr_content'])) {
$wr_content = trim($_POST['wr_content']);
$wr_content = substr(trim($_POST['wr_content']),0,4294967294);
$wr_content = preg_replace("#[\\\]+$#", "", $wr_content);
}
list.skin.php는
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
//wr_content 의 데이타 타입을 변경한다. 한번 실행후 아래 쿼리문을 주석처리하세요.
sql_query(" ALTER TABLE `{$write_table}` CHANGE `wr_content` `wr_content` LONGTEXT NOT NULL ", true);
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css" media="screen">', 0);
으로 수정했는데 맞는지 모르겠습니다.
어째든 결과는 65535이상 작성이 안됩니다.
틀린부분이나 추가 수정부분 아시면 답변부탁드립니다.
답변 1
bbs > write.php 를 수정해서 아래와 같이 해주세요.
<?php
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
sql_query(" alter table `$write_table` change `wr_content` `wr_content ` LONGTEXT ", false);