|
@@ -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 이상 입력하셔야 합니다.");
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index 4f8e67210..9fdfd4518 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -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}' ";
diff --git a/bbs/board_head.php b/bbs/board_head.php
index 7a33de9b0..2eea9533e 100644
--- a/bbs/board_head.php
+++ b/bbs/board_head.php
@@ -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 ' ';
}
+*/
// 게시판 관리의 상단 내용
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']);
}
?>
\ No newline at end of file
diff --git a/bbs/board_tail.php b/bbs/board_tail.php
index 58b326b6a..525e34fa0 100644
--- a/bbs/board_tail.php
+++ b/bbs/board_tail.php
@@ -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 ' ';
}
+*/
// 게시판 관리의 하단 파일 경로
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']);
}
?>
\ No newline at end of file
diff --git a/bbs/list.php b/bbs/list.php
index 0a80c3ec0..be5a04adc 100644
--- a/bbs/list.php
+++ b/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++;
diff --git a/install/gnuboard4s.sql b/install/gnuboard4s.sql
index fa93264ce..84e93d9f3 100644
--- a/install/gnuboard4s.sql
+++ b/install/gnuboard4s.sql
@@ -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',
|