게시판 설정에 모바일관련 설정 추가
This commit is contained in:
@ -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]}',
|
||||
|
||||
@ -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 이상 입력하셔야 합니다.");
|
||||
|
||||
@ -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}' ";
|
||||
|
||||
@ -1,21 +1,25 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
// 게시판 관리의 상단 파일 경로
|
||||
if ($board['bo_include_head']) {
|
||||
@include ($board['bo_include_head']);
|
||||
@include ($board['bo_include_head']);
|
||||
}
|
||||
|
||||
// 게시판 관리의 상단 이미지 경로
|
||||
if ($board['bo_image_head']) {
|
||||
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
|
||||
}
|
||||
*/
|
||||
|
||||
// 게시판 관리의 상단 내용
|
||||
if (G4_IS_MOBILE) {
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once('./_head.php');
|
||||
} else if ($board['bo_content_head']) {
|
||||
echo stripslashes($board['bo_content_head']);
|
||||
echo stripslashes($board['bo_mobile_content_head']);
|
||||
} else {
|
||||
@include ($board['bo_include_head']);
|
||||
echo stripslashes($board['bo_content_head']);
|
||||
}
|
||||
?>
|
||||
@ -1,21 +1,25 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
// 게시판 관리의 하단 내용
|
||||
if ($board['bo_content_tail']) {
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
}
|
||||
|
||||
// 게시판 관리의 하단 이미지 경로
|
||||
if ($board['bo_image_tail']) {
|
||||
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
|
||||
}
|
||||
*/
|
||||
|
||||
// 게시판 관리의 하단 파일 경로
|
||||
if (G4_IS_MOBILE) {
|
||||
echo stripslashes($board['bo_mobile_content_tail']);
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once('./_tail.php');
|
||||
} else if ($board['bo_include_tail']) {
|
||||
@include ($board['bo_include_tail']);
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
@include ($board['bo_include_tail']);
|
||||
}
|
||||
?>
|
||||
20
bbs/list.php
20
bbs/list.php
@ -52,9 +52,15 @@ if ($sca || $stx) {
|
||||
$total_count = $board['bo_count_write'];
|
||||
}
|
||||
|
||||
$total_page = ceil($total_count / $board['bo_page_rows']); // 전체 페이지 계산
|
||||
if(G4_IS_MOBILE) {
|
||||
$page_rows = $board['bo_mobile_page_rows'];
|
||||
} else {
|
||||
$page_rows = $board['bo_page_rows'];
|
||||
}
|
||||
|
||||
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
|
||||
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $board['bo_page_rows']; // 시작 열을 구함
|
||||
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
|
||||
|
||||
// 관리자라면 CheckBox 보임
|
||||
$is_checkbox = false;
|
||||
@ -90,9 +96,9 @@ if ($sst) {
|
||||
}
|
||||
|
||||
if ($sca || $stx) {
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, {$board['bo_page_rows']} ";
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
|
||||
} else {
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, {$board['bo_page_rows']} ";
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, $page_rows ";
|
||||
}
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -111,7 +117,7 @@ if (!$sca && !$stx) {
|
||||
|
||||
if (!$row['wr_id']) continue;
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, $board['bo_subject_len']);
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G4_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
$list[$i]['is_notice'] = true;
|
||||
|
||||
$i++;
|
||||
@ -126,12 +132,12 @@ while ($row = sql_fetch_array($result))
|
||||
if ($sca || $stx)
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, $board['bo_subject_len']);
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G4_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
if (strstr($sfl, 'subject')) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
$list[$i]['is_notice'] = false;
|
||||
$list[$i]['num'] = $total_count - ($page - 1) * $board['bo_page_rows'] - $k;
|
||||
$list[$i]['num'] = $total_count - ($page - 1) * $page_rows - $k;
|
||||
|
||||
$i++;
|
||||
$k++;
|
||||
|
||||
@ -59,7 +59,9 @@ CREATE TABLE IF NOT EXISTS `g4s_board` (
|
||||
`bo_use_list_content` tinyint(4) NOT NULL default '0',
|
||||
`bo_table_width` int(11) NOT NULL default '0',
|
||||
`bo_subject_len` int(11) NOT NULL default '0',
|
||||
`bo_mobile_subject_len` int(11) NOT NULL default '0',
|
||||
`bo_page_rows` int(11) NOT NULL default '0',
|
||||
`bo_mobile_page_rows` int(11) NOT NULL default '0',
|
||||
`bo_new` int(11) NOT NULL default '0',
|
||||
`bo_hot` int(11) NOT NULL default '0',
|
||||
`bo_image_width` int(11) NOT NULL default '0',
|
||||
@ -70,7 +72,9 @@ CREATE TABLE IF NOT EXISTS `g4s_board` (
|
||||
`bo_include_head` varchar(255) NOT NULL default '',
|
||||
`bo_include_tail` varchar(255) NOT NULL default '',
|
||||
`bo_content_head` text NOT NULL,
|
||||
`bo_mobile_content_head` text NOT NULL,
|
||||
`bo_content_tail` text NOT NULL,
|
||||
`bo_mobile_content_tail` text NOT NULL,
|
||||
`bo_insert_content` text NOT NULL,
|
||||
`bo_gallery_cols` int(11) NOT NULL default '0',
|
||||
`bo_gallery_width` int(11) NOT NULL default '0',
|
||||
|
||||
Reference in New Issue
Block a user