게시판 설정에 모바일관련 설정 추가

This commit is contained in:
chicpro
2013-03-26 16:20:51 +09:00
parent e65fb7c886
commit dcc3b7cd70
7 changed files with 114 additions and 15 deletions

View File

@ -63,7 +63,9 @@ $sql = " insert into {$g4['board_table']}
bo_use_list_content = '{$board[bo_use_list_content]}',
bo_table_width = '{$board[bo_table_width]}',
bo_subject_len = '{$board[bo_subject_len]}',
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
bo_page_rows = '{$board[bo_page_rows]}',
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
bo_new = '{$board[bo_new]}',
bo_hot = '{$board[bo_hot]}',
bo_image_width = '{$board[bo_image_width]}',
@ -73,6 +75,8 @@ $sql = " insert into {$g4['board_table']}
bo_include_tail = '{$board['bo_include_tail']}',
bo_content_head = '".addslashes($board['bo_content_head'])."',
bo_content_tail = '".addslashes($board['bo_content_tail'])."',
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
bo_gallery_cols = '{$board[bo_gallery_cols]}',
bo_gallery_width = '{$board[bo_gallery_width]}',

View File

@ -33,6 +33,18 @@ if (!isset($board['bo_gallery_width'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_cols` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_cols`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false);
}
if (!isset($board['bo_mobile_subject_len'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false);
}
if (!isset($board['bo_mobile_page_rows'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false);
}
if (!isset($board['bo_mobile_content_head'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false);
}
$required = "";
$readonly = "";
if ($w == '') {
@ -58,7 +70,9 @@ if ($w == '') {
$board['bo_mobile_gallery_height'] = 100;
$board['bo_table_width'] = 100;
$board['bo_page_rows'] = $config['cf_page_rows'];
$board['bo_mobile_page_rows'] = $config['cf_page_rows'];
$board['bo_subject_len'] = 60;
$board['bo_mobile_subject_len'] = 30;
$board['bo_new'] = 24;
$board['bo_hot'] = 100;
$board['bo_image_width'] = 600;
@ -755,6 +769,30 @@ $pg_anchor = "<ul class=\"anchor\">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_content_head">모바일 상단 내용</label></th>
<td>
<?=editor_html("bo_mobile_content_head", $board['bo_mobile_content_head']);?>
</td>
<td class="group_setting">
<input type="checkbox" name="chk_grp_mobile_content_head" value="1" id="chk_grp_mobile_content_head">
<label for="chk_grp_mobile_content_head">그룹적용</label>
<input type="checkbox" name="chk_all_mobile_content_head" value="1" id="chk_all_mobile_content_head">
<label for="chk_all_mobile_content_head">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_content_tail">모바일 하단 내용</label></th>
<td>
<?=editor_html("bo_mobile_content_tail", $board['bo_mobile_content_tail']);?>
</td>
<td class="group_setting">
<input type="checkbox" name="chk_grp_mobile_content_tail" value="1" id="chk_grp_mobile_content_tail">
<label for="chk_grp_mobile_content_tail">그룹적용</label>
<input type="checkbox" name="chk_all_mobile_content_tail" value="1" id="chk_all_mobile_content_tail">
<label for="chk_all_mobile_content_tail">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
<td>
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?=$board['bo_insert_content'] ?></textarea>
@ -779,7 +817,20 @@ $pg_anchor = "<ul class=\"anchor\">
<label for="chk_all_subject_len">전체적용</label>
</td>
</tr>
<tr>
<tr>
<th scope="row"><label for="bo_mobile_subject_len">모바일 제목 길이<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('목록에서의 제목 글자수. 잘리는 글은 … 로 표시')?>
<input type="text" name="bo_mobile_subject_len" value="<?=$board['bo_mobile_subject_len']?>" id="bo_mobile_subject_len" required class="required numeric frm_input" size="4">
</td>
<td class="group_setting">
<input type="checkbox" name="chk_grp_mobile_subject_len" value="1" id="chk_grp_mobile_subject_len">
<label for="chk_grp_mobile_subject_len">그룹적용</label>
<input type="checkbox" name="chk_all_mobile_subject_len" value="1" id="chk_all_mobile_subject_len">
<label for="chk_all_mobile_subject_len">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_page_rows">페이지당 목록 수<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_page_rows" value="<?=$board['bo_page_rows']?>" id="bo_page_rows" required class="required numeric frm_input" size="4">
@ -791,6 +842,18 @@ $pg_anchor = "<ul class=\"anchor\">
<label for="chk_all_page_rows">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_page_rows">모바일 페이지당 목록 수<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_mobile_page_rows" value="<?=$board['bo_mobile_page_rows']?>" id="bo_mobile_page_rows" required class="required numeric frm_input" size="4">
</td>
<td class="group_setting">
<input type="checkbox" name="chk_grp_mobile_page_rows" value="1" id="chk_grp_mobile_page_rows">
<label for="chk_grp_mobile_page_rows">그룹적용</label>
<input type="checkbox" name="chk_all_mobile_page_rows" value="1" id="chk_all_mobile_page_rows">
<label for="chk_all_mobile_page_rows">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_cols">갤러리 이미지 수<strong class="sound_only">필수</strong></label></th>
<td>
@ -1119,6 +1182,8 @@ function fboardform_submit(f)
{
<?=get_editor_js("bo_content_head");?>
<?=get_editor_js("bo_content_tail");?>
<?=get_editor_js("bo_mobile_content_head");?>
<?=get_editor_js("bo_mobile_content_tail");?>
if (parseInt(f.bo_count_modify.value) < 1) {
alert("원글 수정 불가 댓글수는 1 이상 입력하셔야 합니다.");

View File

@ -87,7 +87,9 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_use_email = '{$_POST['bo_use_email']}',
bo_table_width = '{$_POST['bo_table_width']}',
bo_subject_len = '{$_POST['bo_subject_len']}',
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
bo_page_rows = '{$_POST['bo_page_rows']}',
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
bo_new = '{$_POST['bo_new']}',
bo_hot = '{$_POST['bo_hot']}',
bo_image_width = '{$_POST['bo_image_width']}',
@ -97,6 +99,8 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_include_tail = '{$_POST['bo_include_tail']}',
bo_content_head = '{$_POST['bo_content_head']}',
bo_content_tail = '{$_POST['bo_content_tail']}',
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
bo_insert_content = '{$_POST['bo_insert_content']}',
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
bo_gallery_width = '{$_POST['bo_gallery_width']}',
@ -267,7 +271,9 @@ if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gal
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
@ -283,6 +289,8 @@ if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_he
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
@ -345,7 +353,9 @@ if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gal
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
@ -361,6 +371,8 @@ if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_he
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";